diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index a0038344..a410db3f 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -22,9 +22,9 @@ runs: # # NOTE: Keep this list updated as new deps are introduced. opt_deps=( - cjson # for github.com/goplus/llgo/c/cjson - sqlite # for github.com/goplus/llgo/c/sqlite - python@3.12 # for github.com/goplus/llgo/py + cjson # for github.com/goplus/lib/c/cjson + sqlite # for github.com/goplus/lib/c/sqlite + python@3.12 # for github.com/goplus/lib/py ) brew install "${opt_deps[@]}" - name: Install Ubuntu dependencies @@ -41,8 +41,8 @@ runs: # # NOTE: Keep this list updated as new deps are introduced. opt_deps=( - libcjson-dev # for github.com/goplus/llgo/c/cjson - libsqlite3-dev # for github.com/goplus/llgo/c/sqlite - python3.12-dev # for github.com/goplus/llgo/py + libcjson-dev # for github.com/goplus/lib/c/cjson + libsqlite3-dev # for github.com/goplus/lib/c/sqlite + python3.12-dev # for github.com/goplus/lib/py ) sudo apt-get install -y "${opt_deps[@]}" diff --git a/.github/actions/test-helloworld/action.yml b/.github/actions/test-helloworld/action.yml index 07b0f9fb..76b92a70 100644 --- a/.github/actions/test-helloworld/action.yml +++ b/.github/actions/test-helloworld/action.yml @@ -23,7 +23,7 @@ runs: package main import ( "fmt" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { fmt.Println("Hello, LLGo!") diff --git a/.github/codecov.yml b/.github/codecov.yml index 9944f8e4..6b77c4a6 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -1,9 +1,9 @@ coverage: ignore: - - "compiler/chore" - - "compiler/cmd/internal" - - "compiler/internal/build" - - "compiler/internal/llgen" - - "compiler/internal/mockable" - - "compiler/internal/packages" - - "compiler/internal/typepatch" + - "chore" + - "cmd/internal" + - "internal/build" + - "internal/llgen" + - "internal/mockable" + - "internal/packages" + - "internal/typepatch" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bd2c4bfc..c8c3b8ae 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,13 +17,3 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" - - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/compiler/" # Location of package manifests - schedule: - interval: "daily" - - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/runtime/" # Location of package manifests - schedule: - interval: "daily" diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml index d4a385e3..74b37271 100644 --- a/.github/workflows/fmt.yml +++ b/.github/workflows/fmt.yml @@ -19,7 +19,7 @@ jobs: - name: Check formatting run: | - for dir in . compiler runtime; do + for dir in . runtime; do pushd $dir if [ -n "$(go fmt ./...)" ]; then echo "Some files are not properly formatted. Please run 'go fmt ./...'" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7c17724a..8806c3e5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,9 +19,6 @@ jobs: - ubuntu-24.04 llvm: [19] runs-on: ${{matrix.os}} - defaults: - run: - working-directory: compiler steps: - uses: actions/checkout@v4 - name: Install dependencies diff --git a/.github/workflows/llgo.yml b/.github/workflows/llgo.yml index 104d741b..3da9a6c9 100644 --- a/.github/workflows/llgo.yml +++ b/.github/workflows/llgo.yml @@ -34,7 +34,7 @@ jobs: - macos-latest - ubuntu-24.04 llvm: [19] - go: ["1.20.14", "1.21.13", "1.22.12", "1.23.6", "1.24.0"] + go: ['1.21.13', '1.22.12', '1.23.6', '1.24.0'] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 @@ -50,8 +50,8 @@ jobs: - name: Install further optional dependencies for demos run: | py_deps=( - numpy # for github.com/goplus/llgo/py/numpy - torch # for github.com/goplus/llgo/py/torch + numpy # for github.com/goplus/lib/py/numpy + torch # for github.com/goplus/lib/py/torch ) pip3.12 install --break-system-packages "${py_deps[@]}" @@ -61,7 +61,6 @@ jobs: go-version: "1.24.0" - name: Install - working-directory: compiler run: | go install ./... echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV @@ -71,26 +70,11 @@ jobs: with: go-version: ${{matrix.go}} - - name: Verify Go version - run: | - go_version=$(go version | cut -d' ' -f3 | sed 's/go//') - if [[ "$go_version" != "${{matrix.go}}"* ]]; then - echo "Expected Go version ${{matrix.go}}, but got $go_version" - exit 1 - fi - echo "Using Go version: $go_version" - - name: _xtool build tests run: | cd _xtool llgo build -v ./... - - name: LLGO tests - if: ${{!startsWith(matrix.os, 'ubuntu')}} - run: | - echo "Test result on ${{matrix.os}} with LLVM ${{matrix.llvm}}" > result.md - bash ./.github/workflows/test_llgo.sh - - name: Test demos run: | # TODO(lijie): force python3-embed to be linked with python-3.12-embed @@ -109,7 +93,6 @@ jobs: - name: LLDB tests if: ${{startsWith(matrix.os, 'macos')}} - working-directory: compiler run: | echo "Test lldb with llgo plugin on ${{matrix.os}} with LLVM ${{matrix.llvm}}" bash _lldb/runtest.sh -v @@ -133,8 +116,8 @@ jobs: - name: Install further optional dependencies for demos run: | py_deps=( - numpy # for github.com/goplus/llgo/py/numpy - torch # for github.com/goplus/llgo/py/torch + numpy # for github.com/goplus/lib/py/numpy + torch # for github.com/goplus/lib/py/torch ) pip3.12 install --break-system-packages "${py_deps[@]}" @@ -144,7 +127,6 @@ jobs: go-version: "1.24.0" - name: Install - working-directory: compiler run: | go install ./... echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV @@ -154,15 +136,6 @@ jobs: with: go-version: ${{matrix.go}} - - name: Verify Go version - run: | - go_version=$(go version | cut -d' ' -f3 | sed 's/go//') - if [[ "$go_version" != "${{matrix.go}}"* ]]; then - echo "Expected Go version ${{matrix.go}}, but got $go_version" - exit 1 - fi - echo "Using Go version: $go_version" - - name: run llgo test run: | llgo test ./... @@ -175,7 +148,7 @@ jobs: matrix: os: [ubuntu-24.04, macos-latest] llvm: [19] - go: ["1.20.14", "1.21.13", "1.22.12", "1.23.6", "1.24.0"] + go: ['1.21.13', '1.22.12', '1.23.6', '1.24.0'] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 @@ -190,7 +163,6 @@ jobs: go-version: "1.24.0" - name: Install llgo - working-directory: compiler run: | go install ./... echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV @@ -200,13 +172,6 @@ jobs: with: go-version: ${{matrix.go}} - - name: Test Hello World with go.mod 1.20 - if: startsWith(matrix.go, '1.20') || startsWith(matrix.go, '1.21') || startsWith(matrix.go, '1.22') || startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24') - uses: ./.github/actions/test-helloworld - with: - go-version: ${{matrix.go}} - mod-version: "1.20" - - name: Test Hello World with go.mod 1.21 if: startsWith(matrix.go, '1.21') || startsWith(matrix.go, '1.22') || startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24') uses: ./.github/actions/test-helloworld diff --git a/.github/workflows/test_llgo.sh b/.github/workflows/test_llgo.sh deleted file mode 100644 index a1b97fe3..00000000 --- a/.github/workflows/test_llgo.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -set -e - -testcmd=/tmp/test -llgo build -o $testcmd ./c/bdwgc/_test -cases=$($testcmd) -total=$(echo "$cases" | wc -l | tr -d ' ') -failed=0 -failed_cases="" - -for idx in $(seq 1 $((total))); do - case=$(echo "$cases" | sed -n "${idx}p") - case_name=$(echo "$case" | cut -d',' -f2) - echo "=== Test case: $case_name" - set +e - out=$("$testcmd" "$((idx-1))" 2>&1) - exit_code=$? - set -e - if [ "${exit_code:-0}" -ne 0 ]; then - echo "failed: $out" - failed=$((failed+1)) - failed_cases="$failed_cases\n* :x: $case_name" - else - echo "passed" - fi -done -echo "=== Done" -echo "$((total-failed))/$total tests passed" - -if [ "$failed" -ne 0 ]; then - echo ":bangbang: Failed llgo cases:" | tee -a result.md - echo -e "$failed_cases" | tee -a result.md - exit 1 -else - echo ":white_check_mark: All llgo tests passed" | tee -a result.md -fi diff --git a/.gitmodules b/.gitmodules index 04ff355d..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "c/llama2/llama2.c"] - path = c/llama2/llama2.c - url = https://github.com/karpathy/llama2.c.git diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4008e4fa..6a75141a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,14 +16,13 @@ before: builds: - id: llgo-darwin-amd64 - dir: compiler main: ./cmd/llgo binary: bin/llgo flags: - -tags=darwin,amd64,byollvm ldflags: - - -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}} - - -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}} + - -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}} + - -X github.com/goplus/llgo/internal/env.buildTime={{.Date}} - -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/local/opt/llvm@19/bin/llvm-config env: - CC=o64-clang @@ -34,14 +33,13 @@ builds: - darwin_amd64 mod_timestamp: "{{.CommitTimestamp}}" - id: llgo-darwin-arm64 - dir: compiler main: ./cmd/llgo binary: bin/llgo flags: - -tags=darwin,arm64,byollvm ldflags: - - -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}} - - -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}} + - -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}} + - -X github.com/goplus/llgo/internal/env.buildTime={{.Date}} - -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/opt/homebrew/opt/llvm@19/bin/llvm-config env: - CC=oa64-clang @@ -52,14 +50,13 @@ builds: - darwin_arm64 mod_timestamp: "{{.CommitTimestamp}}" - id: llgo-linux-amd64 - dir: compiler main: ./cmd/llgo binary: bin/llgo flags: - -tags=linux,amd64,byollvm ldflags: - - -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}} - - -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}} + - -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}} + - -X github.com/goplus/llgo/internal/env.buildTime={{.Date}} - -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/lib/llvm-19/bin/llvm-config env: - CC=x86_64-linux-gnu-gcc @@ -70,14 +67,13 @@ builds: - linux_amd64 mod_timestamp: "{{.CommitTimestamp}}" - id: llgo-linux-arm64 - dir: compiler main: ./cmd/llgo binary: bin/llgo flags: - -tags=linux,arm64,byollvm ldflags: - - -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}} - - -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}} + - -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}} + - -X github.com/goplus/llgo/internal/env.buildTime={{.Date}} - -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/lib/llvm-19/bin/llvm-config env: - CC=aarch64-linux-gnu-gcc diff --git a/README.md b/README.md index f44eb768..9b0ae2db 100644 --- a/README.md +++ b/README.md @@ -31,19 +31,19 @@ LLGo is compatible with C and Python through the language's **Application Binary You can import a C/C++ standard library in LLGo! -* [c](https://pkg.go.dev/github.com/goplus/llgo/c) -* [c/syscall](https://pkg.go.dev/github.com/goplus/llgo/c/syscall) -* [c/sys](https://pkg.go.dev/github.com/goplus/llgo/c/sys) -* [c/os](https://pkg.go.dev/github.com/goplus/llgo/c/os) -* [c/math](https://pkg.go.dev/github.com/goplus/llgo/c/math) -* [c/math/cmplx](https://pkg.go.dev/github.com/goplus/llgo/c/math/cmplx) -* [c/math/rand](https://pkg.go.dev/github.com/goplus/llgo/c/math/rand) -* [c/pthread](https://pkg.go.dev/github.com/goplus/llgo/c/pthread) -* [c/pthread/sync](https://pkg.go.dev/github.com/goplus/llgo/c/pthread/sync) -* [c/sync/atomic](https://pkg.go.dev/github.com/goplus/llgo/c/sync/atomic) -* [c/time](https://pkg.go.dev/github.com/goplus/llgo/c/time) -* [c/net](https://pkg.go.dev/github.com/goplus/llgo/c/net) -* [cpp/std](https://pkg.go.dev/github.com/goplus/llgo/cpp/std) +* [c](https://pkg.go.dev/github.com/goplus/lib/c) +* [c/syscall](https://pkg.go.dev/github.com/goplus/lib/c/syscall) +* [c/sys](https://pkg.go.dev/github.com/goplus/lib/c/sys) +* [c/os](https://pkg.go.dev/github.com/goplus/lib/c/os) +* [c/math](https://pkg.go.dev/github.com/goplus/lib/c/math) +* [c/math/cmplx](https://pkg.go.dev/github.com/goplus/lib/c/math/cmplx) +* [c/math/rand](https://pkg.go.dev/github.com/goplus/lib/c/math/rand) +* [c/pthread](https://pkg.go.dev/github.com/goplus/lib/c/pthread) +* [c/pthread/sync](https://pkg.go.dev/github.com/goplus/lib/c/pthread/sync) +* [c/sync/atomic](https://pkg.go.dev/github.com/goplus/lib/c/sync/atomic) +* [c/time](https://pkg.go.dev/github.com/goplus/lib/c/time) +* [c/net](https://pkg.go.dev/github.com/goplus/lib/c/net) +* [cpp/std](https://pkg.go.dev/github.com/goplus/lib/cpp/std) Here is a simple example: @@ -52,7 +52,7 @@ Here is a simple example: ```go package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" func main() { c.Printf(c.Str("Hello world\n")) @@ -112,7 +112,7 @@ Or put it into a package (see [c/math](c/math/math.go)): ```go package main -import "github.com/goplus/llgo/c/math" +import "github.com/goplus/lib/c/math" func main() { println("sqrt(2) =", math.Sqrt(2)) @@ -126,18 +126,18 @@ You can import a Python library in LLGo! And you can import any Python library into `llgo` through a program called `llpyg` (see [Development tools](#development-tools)). The following libraries have been included in `llgo`: -* [py](https://pkg.go.dev/github.com/goplus/llgo/py) (abi) -* [py/std](https://pkg.go.dev/github.com/goplus/llgo/py/std) (builtins) -* [py/sys](https://pkg.go.dev/github.com/goplus/llgo/py/sys) -* [py/os](https://pkg.go.dev/github.com/goplus/llgo/py/os) -* [py/math](https://pkg.go.dev/github.com/goplus/llgo/py/math) -* [py/json](https://pkg.go.dev/github.com/goplus/llgo/py/json) -* [py/inspect](https://pkg.go.dev/github.com/goplus/llgo/py/inspect) -* [py/statistics](https://pkg.go.dev/github.com/goplus/llgo/py/statistics) -* [py/numpy](https://pkg.go.dev/github.com/goplus/llgo/py/numpy) -* [py/pandas](https://pkg.go.dev/github.com/goplus/llgo/py/pandas) -* [py/torch](https://pkg.go.dev/github.com/goplus/llgo/py/torch) -* [py/matplotlib](https://pkg.go.dev/github.com/goplus/llgo/py/matplotlib) +* [py](https://pkg.go.dev/github.com/goplus/lib/py) (abi) +* [py/std](https://pkg.go.dev/github.com/goplus/lib/py/std) (builtins) +* [py/sys](https://pkg.go.dev/github.com/goplus/lib/py/sys) +* [py/os](https://pkg.go.dev/github.com/goplus/lib/py/os) +* [py/math](https://pkg.go.dev/github.com/goplus/lib/py/math) +* [py/json](https://pkg.go.dev/github.com/goplus/lib/py/json) +* [py/inspect](https://pkg.go.dev/github.com/goplus/lib/py/inspect) +* [py/statistics](https://pkg.go.dev/github.com/goplus/lib/py/statistics) +* [py/numpy](https://pkg.go.dev/github.com/goplus/lib/py/numpy) +* [py/pandas](https://pkg.go.dev/github.com/goplus/lib/py/pandas) +* [py/torch](https://pkg.go.dev/github.com/goplus/lib/py/torch) +* [py/matplotlib](https://pkg.go.dev/github.com/goplus/lib/py/matplotlib) Note: For third-party libraries (such as pandas and pytorch), you still need to install the library files. @@ -149,9 +149,9 @@ Here is an example: package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/math" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/math" + "github.com/goplus/lib/py/std" ) func main() { @@ -181,9 +181,9 @@ Let's look at a slightly more complex example. For example, we use `numpy` to ca package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/numpy" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/numpy" + "github.com/goplus/lib/py/std" ) func main() { @@ -225,20 +225,20 @@ LLGo can easily import any libraries from the C ecosystem. Currently, this impor The currently supported libraries include: -* [c/bdwgc](https://pkg.go.dev/github.com/goplus/llgo/c/bdwgc) -* [c/cjson](https://pkg.go.dev/github.com/goplus/llgo/c/cjson) -* [c/clang](https://pkg.go.dev/github.com/goplus/llgo/c/clang) -* [c/ffi](https://pkg.go.dev/github.com/goplus/llgo/c/ffi) -* [c/libuv](https://pkg.go.dev/github.com/goplus/llgo/c/libuv) -* [c/llama2](https://pkg.go.dev/github.com/goplus/llgo/c/llama2) -* [c/lua](https://pkg.go.dev/github.com/goplus/llgo/c/lua) -* [c/neco](https://pkg.go.dev/github.com/goplus/llgo/c/neco) -* [c/openssl](https://pkg.go.dev/github.com/goplus/llgo/c/openssl) -* [c/raylib](https://pkg.go.dev/github.com/goplus/llgo/c/raylib) -* [c/sqlite](https://pkg.go.dev/github.com/goplus/llgo/c/sqlite) -* [c/zlib](https://pkg.go.dev/github.com/goplus/llgo/c/zlib) -* [cpp/inih](https://pkg.go.dev/github.com/goplus/llgo/cpp/inih) -* [cpp/llvm](https://pkg.go.dev/github.com/goplus/llgo/cpp/llvm) +* [c/bdwgc](https://pkg.go.dev/github.com/goplus/lib/c/bdwgc) +* [c/cjson](https://pkg.go.dev/github.com/goplus/lib/c/cjson) +* [c/clang](https://pkg.go.dev/github.com/goplus/lib/c/clang) +* [c/ffi](https://pkg.go.dev/github.com/goplus/lib/c/ffi) +* [c/libuv](https://pkg.go.dev/github.com/goplus/lib/c/libuv) +* [c/llama2](https://pkg.go.dev/github.com/goplus/lib/c/llama2) +* [c/lua](https://pkg.go.dev/github.com/goplus/lib/c/lua) +* [c/neco](https://pkg.go.dev/github.com/goplus/lib/c/neco) +* [c/openssl](https://pkg.go.dev/github.com/goplus/lib/c/openssl) +* [c/raylib](https://pkg.go.dev/github.com/goplus/lib/c/raylib) +* [c/sqlite](https://pkg.go.dev/github.com/goplus/lib/c/sqlite) +* [c/zlib](https://pkg.go.dev/github.com/goplus/lib/c/zlib) +* [cpp/inih](https://pkg.go.dev/github.com/goplus/lib/cpp/inih) +* [cpp/llvm](https://pkg.go.dev/github.com/goplus/lib/cpp/llvm) Here are some examples related to them: @@ -339,7 +339,7 @@ Here are the Go packages that can be imported correctly: ## Dependencies -- [Go 1.20+](https://go.dev) +- [Go 1.21+](https://go.dev) - [LLVM 18](https://llvm.org) - [Clang 18](https://clang.llvm.org) - [LLD 18](https://lld.llvm.org) @@ -347,7 +347,7 @@ Here are the Go packages that can be imported correctly: - [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/) - [OpenSSL 3.0+](https://www.openssl.org/) - [zlib 1.2+](https://www.zlib.net) -- [Python 3.12+](https://www.python.org) (optional, for [github.com/goplus/llgo/py](https://pkg.go.dev/github.com/goplus/llgo/py)) +- [Python 3.12+](https://www.python.org) (optional, for [github.com/goplus/lib/py](https://pkg.go.dev/github.com/goplus/lib/py)) ## How to install @@ -413,9 +413,9 @@ cd llgo * [pydump](_xtool/pydump): It's the first program compiled by `llgo` (NOT `go`) in a production environment. It outputs symbol information (functions, variables, and constants) from a Python library in JSON format, preparing for the generation of corresponding packages in `llgo`. * [pysigfetch](https://github.com/goplus/hdq/tree/main/chore/pysigfetch): It generates symbol information by extracting information from Python's documentation site. This tool is not part of the `llgo` project, but we depend on it. -* [llpyg](compiler/chore/llpyg): It is used to automatically convert Python libraries into Go packages that `llgo` can import. It depends on `pydump` and `pysigfetch` to accomplish the task. -* [llgen](compiler/chore/llgen): It is used to compile Go packages into LLVM IR files (*.ll). -* [ssadump](compiler/chore/ssadump): It is a Go SSA builder and interpreter. +* [llpyg](chore/llpyg): It is used to automatically convert Python libraries into Go packages that `llgo` can import. It depends on `pydump` and `pysigfetch` to accomplish the task. +* [llgen](chore/llgen): It is used to compile Go packages into LLVM IR files (*.ll). +* [ssadump](chore/ssadump): It is a Go SSA builder and interpreter. How do I generate these tools? @@ -423,11 +423,11 @@ How do I generate these tools? ```sh git clone https://github.com/goplus/llgo.git -cd llgo/compiler +cd llgo go install -v ./cmd/... go install -v ./chore/... # compile all tools except pydump -export LLGO_ROOT=$PWD/.. -cd ../_xtool +export LLGO_ROOT=$PWD +cd ./_xtool llgo install ./... # compile pydump go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch ``` @@ -436,6 +436,6 @@ go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch Below are the key modules for understanding the implementation principles of `llgo`: -* [ssa](https://pkg.go.dev/github.com/goplus/llgo/compiler/ssa): It generates LLVM IR files (LLVM SSA) using the semantics (interfaces) of Go SSA. Although `LLVM SSA` and `Go SSA` are both IR languages, they work at completely different levels. `LLVM SSA` is closer to machine code, which abstracts different instruction sets. While `Go SSA` is closer to a high-level language. We can think of it as the instruction set of the `Go computer`. `llgo/ssa` is not just limited to the `llgo` compiler. If we view it as the high-level expressive power of `LLVM`, you'll find it very useful. Prior to `llgo/ssa`, you had to operate `LLVM` using machine code semantics. But now, with the advanced SSA form (in the semantics of Go SSA), you can conveniently utilize `LLVM`. -* [cl](https://pkg.go.dev/github.com/goplus/llgo/compiler/cl): It is the core of the llgo compiler. It converts a Go package into LLVM IR files. It depends on `llgo/ssa`. -* [internal/build](https://pkg.go.dev/github.com/goplus/llgo/compiler/internal/build): It strings together the entire compilation process of `llgo`. It depends on `llgo/ssa` and `llgo/cl`. +* [ssa](https://pkg.go.dev/github.com/goplus/llgo/ssa): It generates LLVM IR files (LLVM SSA) using the semantics (interfaces) of Go SSA. Although `LLVM SSA` and `Go SSA` are both IR languages, they work at completely different levels. `LLVM SSA` is closer to machine code, which abstracts different instruction sets. While `Go SSA` is closer to a high-level language. We can think of it as the instruction set of the `Go computer`. `llgo/ssa` is not just limited to the `llgo` compiler. If we view it as the high-level expressive power of `LLVM`, you'll find it very useful. Prior to `llgo/ssa`, you had to operate `LLVM` using machine code semantics. But now, with the advanced SSA form (in the semantics of Go SSA), you can conveniently utilize `LLVM`. +* [cl](https://pkg.go.dev/github.com/goplus/llgo/cl): It is the core of the llgo compiler. It converts a Go package into LLVM IR files. It depends on `llgo/ssa`. +* [internal/build](https://pkg.go.dev/github.com/goplus/llgo/internal/build): It strings together the entire compilation process of `llgo`. It depends on `llgo/ssa` and `llgo/cl`. diff --git a/_demo/catomic/atomic.go b/_demo/catomic/atomic.go index 589c5ebf..01be97b7 100644 --- a/_demo/catomic/atomic.go +++ b/_demo/catomic/atomic.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c/sync/atomic" + "github.com/goplus/lib/c/sync/atomic" ) func main() { diff --git a/_demo/cexec/exec.go b/_demo/cexec/exec.go index 203c9764..75252505 100644 --- a/_demo/cexec/exec.go +++ b/_demo/cexec/exec.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/os" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/os" ) func main() { diff --git a/_demo/concat/concat.go b/_demo/concat/concat.go index 84df62c6..29a92102 100644 --- a/_demo/concat/concat.go +++ b/_demo/concat/concat.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func concat(args ...string) (ret string) { diff --git a/_demo/cppintf/cppintf.go b/_demo/cppintf/cppintf.go index 7d9c0f8c..ab549de6 100644 --- a/_demo/cppintf/cppintf.go +++ b/_demo/cppintf/cppintf.go @@ -1,9 +1,9 @@ package main import ( + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/math" "github.com/goplus/llgo/_demo/cppintf/foo" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/math" ) type Bar struct { diff --git a/_demo/cppmintf/cpp_multi_intf.go b/_demo/cppmintf/cpp_multi_intf.go index ae75ba16..80c8ef05 100644 --- a/_demo/cppmintf/cpp_multi_intf.go +++ b/_demo/cppmintf/cpp_multi_intf.go @@ -3,9 +3,9 @@ package main import ( "unsafe" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/math" "github.com/goplus/llgo/_demo/cppmintf/foo" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/math" ) type Bar struct { diff --git a/_demo/crand/rand.go b/_demo/crand/rand.go index 00df6fd2..c2ea7b1b 100644 --- a/_demo/crand/rand.go +++ b/_demo/crand/rand.go @@ -3,9 +3,9 @@ package main import ( "fmt" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/math/rand" - "github.com/goplus/llgo/c/time" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/math/rand" + "github.com/goplus/lib/c/time" ) func fastrand64() uint64 { diff --git a/_demo/ctime/time.go b/_demo/ctime/time.go index e5a9ec56..1cbd60fb 100644 --- a/_demo/ctime/time.go +++ b/_demo/ctime/time.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c/time" +import "github.com/goplus/lib/c/time" func main() { var tv time.Timespec diff --git a/_demo/fcntl/fcntl.go b/_demo/fcntl/fcntl.go index 8e312cea..e1290467 100644 --- a/_demo/fcntl/fcntl.go +++ b/_demo/fcntl/fcntl.go @@ -1,9 +1,10 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/os" "unsafe" + + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/os" ) func main() { @@ -45,8 +46,6 @@ func main() { } c.Printf(c.Str("set file status successfully\n")) - - c.Printf(c.Str("111")) // Close file os.Close(fd) diff --git a/_demo/genints/genints.go b/_demo/genints/genints.go index e4feeee0..332a8adc 100644 --- a/_demo/genints/genints.go +++ b/_demo/genints/genints.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) type generator struct { diff --git a/_demo/getcwd/getcwd.go b/_demo/getcwd/getcwd.go index ce2dcfea..6676777c 100644 --- a/_demo/getcwd/getcwd.go +++ b/_demo/getcwd/getcwd.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/os" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/os" ) func main() { diff --git a/_demo/go.mod b/_demo/go.mod new file mode 100644 index 00000000..e6fd6415 --- /dev/null +++ b/_demo/go.mod @@ -0,0 +1,5 @@ +module github.com/goplus/llgo/_demo + +go 1.20 + +require github.com/goplus/lib v0.1.0 diff --git a/_demo/go.sum b/_demo/go.sum new file mode 100644 index 00000000..415531cd --- /dev/null +++ b/_demo/go.sum @@ -0,0 +1,2 @@ +github.com/goplus/lib v0.1.0 h1:kqMAC6FmVPfrw0q8E5yF6Y12WC4GOfi2L/MYS4QoxbQ= +github.com/goplus/lib v0.1.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0= diff --git a/_demo/hello/hello.go b/_demo/hello/hello.go index 7049cd2b..18a35ca0 100644 --- a/_demo/hello/hello.go +++ b/_demo/hello/hello.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/_demo/llama2-c/run.go b/_demo/llama2-c/run.go index 29077c10..12c3b3e8 100644 --- a/_demo/llama2-c/run.go +++ b/_demo/llama2-c/run.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/llama2" - "github.com/goplus/llgo/c/time" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/llama2" + "github.com/goplus/lib/c/time" ) func main() { diff --git a/_demo/netdbdemo/netdb.go b/_demo/netdbdemo/netdb.go index f8da4aa0..ced8335b 100644 --- a/_demo/netdbdemo/netdb.go +++ b/_demo/netdbdemo/netdb.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/net" ) func main() { diff --git a/_demo/qsort/qsort.go b/_demo/qsort/qsort.go index 114bf570..1a58a4cb 100644 --- a/_demo/qsort/qsort.go +++ b/_demo/qsort/qsort.go @@ -3,7 +3,7 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/_demo/setjmp/setjmp.go b/_demo/setjmp/setjmp.go index b8508de5..4047e55a 100644 --- a/_demo/setjmp/setjmp.go +++ b/_demo/setjmp/setjmp.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c/setjmp" + "github.com/goplus/lib/c/setjmp" ) func main() { diff --git a/_demo/socket/client/client.go b/_demo/socket/client/client.go index 7f70e33a..b462a2c0 100644 --- a/_demo/socket/client/client.go +++ b/_demo/socket/client/client.go @@ -3,9 +3,9 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" - "github.com/goplus/llgo/c/os" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/net" + "github.com/goplus/lib/c/os" ) func main() { diff --git a/_demo/socket/server/server.go b/_demo/socket/server/server.go index 6a310cf0..db1ec22a 100644 --- a/_demo/socket/server/server.go +++ b/_demo/socket/server/server.go @@ -3,9 +3,9 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" - "github.com/goplus/llgo/c/os" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/net" + "github.com/goplus/lib/c/os" ) func main() { diff --git a/_demo/syncdebug/syncdebug.go b/_demo/syncdebug/syncdebug.go index 54bcedb1..bd40df24 100644 --- a/_demo/syncdebug/syncdebug.go +++ b/_demo/syncdebug/syncdebug.go @@ -6,7 +6,7 @@ import ( "sync" "unsafe" - llsync "github.com/goplus/llgo/c/pthread/sync" + llsync "github.com/goplus/lib/c/pthread/sync" ) type L struct { diff --git a/_demo/thread/thd.go b/_demo/thread/thd.go index 3df27aab..f5dbd07c 100644 --- a/_demo/thread/thd.go +++ b/_demo/thread/thd.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/pthread" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/pthread" ) var key pthread.Key diff --git a/compiler/_lldb/README.md b/_lldb/README.md similarity index 100% rename from compiler/_lldb/README.md rename to _lldb/README.md diff --git a/compiler/_lldb/common.sh b/_lldb/common.sh similarity index 100% rename from compiler/_lldb/common.sh rename to _lldb/common.sh diff --git a/compiler/_lldb/lldbtest/go.mod b/_lldb/lldbtest/go.mod similarity index 100% rename from compiler/_lldb/lldbtest/go.mod rename to _lldb/lldbtest/go.mod diff --git a/compiler/_lldb/lldbtest/main.go b/_lldb/lldbtest/main.go similarity index 100% rename from compiler/_lldb/lldbtest/main.go rename to _lldb/lldbtest/main.go diff --git a/compiler/_lldb/llgo_plugin.py b/_lldb/llgo_plugin.py similarity index 100% rename from compiler/_lldb/llgo_plugin.py rename to _lldb/llgo_plugin.py diff --git a/compiler/_lldb/runlldb.sh b/_lldb/runlldb.sh similarity index 100% rename from compiler/_lldb/runlldb.sh rename to _lldb/runlldb.sh diff --git a/compiler/_lldb/runtest.sh b/_lldb/runtest.sh similarity index 100% rename from compiler/_lldb/runtest.sh rename to _lldb/runtest.sh diff --git a/compiler/_lldb/test.py b/_lldb/test.py similarity index 100% rename from compiler/_lldb/test.py rename to _lldb/test.py diff --git a/_pydemo/callpy/callpy.go b/_pydemo/callpy/callpy.go index a35c514f..ce9cf566 100644 --- a/_pydemo/callpy/callpy.go +++ b/_pydemo/callpy/callpy.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/math" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/math" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/_pydemo/go.mod b/_pydemo/go.mod new file mode 100644 index 00000000..afce0e02 --- /dev/null +++ b/_pydemo/go.mod @@ -0,0 +1,5 @@ +module github.com/goplus/llgo/_pydemo + +go 1.20 + +require github.com/goplus/lib v0.1.0 diff --git a/_pydemo/go.sum b/_pydemo/go.sum new file mode 100644 index 00000000..415531cd --- /dev/null +++ b/_pydemo/go.sum @@ -0,0 +1,2 @@ +github.com/goplus/lib v0.1.0 h1:kqMAC6FmVPfrw0q8E5yF6Y12WC4GOfi2L/MYS4QoxbQ= +github.com/goplus/lib v0.1.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0= diff --git a/_pydemo/matrix/matrix.go b/_pydemo/matrix/matrix.go index e88fa011..246be362 100644 --- a/_pydemo/matrix/matrix.go +++ b/_pydemo/matrix/matrix.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/numpy" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/numpy" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/_pydemo/max/max.go b/_pydemo/max/max.go index fcc0bb67..afdf614b 100644 --- a/_pydemo/max/max.go +++ b/_pydemo/max/max.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/_pydemo/pi/pi.go b/_pydemo/pi/pi.go index 239bc543..22ac0873 100644 --- a/_pydemo/pi/pi.go +++ b/_pydemo/pi/pi.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py/math" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py/math" ) func main() { diff --git a/_pydemo/print/print.go b/_pydemo/print/print.go index 5401c00f..790cbc95 100644 --- a/_pydemo/print/print.go +++ b/_pydemo/print/print.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/_pydemo/statistics/statistics.go b/_pydemo/statistics/statistics.go index 4936f752..dcc66c06 100644 --- a/_pydemo/statistics/statistics.go +++ b/_pydemo/statistics/statistics.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/statistics" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/statistics" ) func main() { diff --git a/_pydemo/tensor/tensor.go b/_pydemo/tensor/tensor.go index 310c37c0..cd4cbfe1 100644 --- a/_pydemo/tensor/tensor.go +++ b/_pydemo/tensor/tensor.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/std" - "github.com/goplus/llgo/py/torch" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/std" + "github.com/goplus/lib/py/torch" ) func main() { diff --git a/_xtool/castdump/castdump.go b/_xtool/castdump/castdump.go index d38215ed..ee771bcd 100644 --- a/_xtool/castdump/castdump.go +++ b/_xtool/castdump/castdump.go @@ -6,8 +6,8 @@ import ( "strings" "unsafe" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/clang" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/clang" ) type Data struct { diff --git a/_xtool/go.mod b/_xtool/go.mod new file mode 100644 index 00000000..6f97bf6d --- /dev/null +++ b/_xtool/go.mod @@ -0,0 +1,5 @@ +module github.com/goplus/llgo/_xtool + +go 1.20 + +require github.com/goplus/lib v0.1.0 diff --git a/_xtool/go.sum b/_xtool/go.sum new file mode 100644 index 00000000..415531cd --- /dev/null +++ b/_xtool/go.sum @@ -0,0 +1,2 @@ +github.com/goplus/lib v0.1.0 h1:kqMAC6FmVPfrw0q8E5yF6Y12WC4GOfi2L/MYS4QoxbQ= +github.com/goplus/lib v0.1.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0= diff --git a/_xtool/pydump/pydump.go b/_xtool/pydump/pydump.go index 150670d9..b0532a87 100644 --- a/_xtool/pydump/pydump.go +++ b/_xtool/pydump/pydump.go @@ -17,10 +17,10 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/cjson" - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/inspect" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/cjson" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/inspect" ) func main() { diff --git a/c/bdwgc/_test/bdwgc.go b/c/bdwgc/_test/bdwgc.go deleted file mode 100644 index f4d900d4..00000000 --- a/c/bdwgc/_test/bdwgc.go +++ /dev/null @@ -1,101 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/bdwgc" - "github.com/goplus/llgo/c/bdwgc/_test/testing" -) - -// ------ Test malloc ------ - -func TestMalloc(t *testing.T) { - pn := (*int)(bdwgc.Malloc(unsafe.Sizeof(int(0)))) - *pn = 1 << 30 - c.Printf(c.Str("value: %d, %x, %p, %p\n"), *pn, *pn, pn, &pn) - - pl := (*int64)(bdwgc.Realloc(c.Pointer(pn), unsafe.Sizeof(int64(0)))) - *pl = 1 << 60 - c.Printf(c.Str("value: %lld, %llx, %p, %p\n"), *pl, *pl, pl, &pl) - - bdwgc.Free(c.Pointer(pl)) -} - -// ------ Test finalizer ------ - -const ( - RETURN_VALUE_FREED = 1 << 31 -) - -var called uint = 0 - -func setReturnValueFreed(pobj c.Pointer, clientData c.Pointer) { - called |= RETURN_VALUE_FREED - c.Printf(c.Str("called: %x\n"), called) -} - -func setLoopValueFreed(pobj c.Pointer, clientData c.Pointer) { - pmask := (*uint)(clientData) - called |= *pmask - c.Printf(c.Str("called: %x\n"), called) -} - -func isCalled(mask uint) bool { - return called&mask != 0 -} - -func returnValue() *int { - pn := bdwgc.Malloc(unsafe.Sizeof(int(0))) - bdwgc.RegisterFinalizer(pn, setReturnValueFreed, nil, nil, nil) - return (*int)(pn) -} - -func callFunc() { - pn := returnValue() - *pn = 1 << 30 - c.Printf(c.Str("value: %d, %x, %p, %p\n"), *pn, *pn, pn, &pn) - bdwgc.Gcollect() - check(!isCalled(RETURN_VALUE_FREED), c.Str("finalizer should not be called")) -} - -func loop() { - for i := 0; i < 5; i++ { - p := bdwgc.Malloc(unsafe.Sizeof(int(0))) - pn := (*int)(p) - *pn = i - c.Printf(c.Str("value: %d, %x, %p, %p\n"), *pn, *pn, pn, &pn) - pflag := (*uint)(c.Malloc(unsafe.Sizeof(uint(0)))) - *pflag = 1 << i - bdwgc.RegisterFinalizer(p, setLoopValueFreed, c.Pointer(pflag), nil, nil) - bdwgc.Gcollect() - check(!isCalled(1<= len(tests) { - c.Printf(c.Str("invalid test index %d"), idx) - panic("invalid test index") - } - tests[idx].F(nil) -} diff --git a/c/bdwgc/_test/testing/testing.go b/c/bdwgc/_test/testing/testing.go deleted file mode 100644 index d4b6029b..00000000 --- a/c/bdwgc/_test/testing/testing.go +++ /dev/null @@ -1,4 +0,0 @@ -package testing - -type T struct { -} diff --git a/c/bdwgc/bdwgc.go b/c/bdwgc/bdwgc.go deleted file mode 100644 index f939dffb..00000000 --- a/c/bdwgc/bdwgc.go +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package bdwgc - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs bdw-gc); -lgc" -) - -// ----------------------------------------------------------------------------- - -//go:linkname Init C.GC_init -func Init() - -//go:linkname Malloc C.GC_malloc -func Malloc(size uintptr) c.Pointer - -//go:linkname Realloc C.GC_realloc -func Realloc(ptr c.Pointer, size uintptr) c.Pointer - -//go:linkname Free C.GC_free -func Free(ptr c.Pointer) - -// ----------------------------------------------------------------------------- - -//go:linkname RegisterFinalizer C.GC_register_finalizer -func RegisterFinalizer( - obj c.Pointer, - fn func(c.Pointer, c.Pointer), cd c.Pointer, - oldFn *func(c.Pointer, c.Pointer), oldCd *c.Pointer) - -//go:linkname RegisterFinalizerNoOrder C.GC_register_finalizer_no_order -func RegisterFinalizerNoOrder( - obj c.Pointer, - fn func(c.Pointer, c.Pointer), cd c.Pointer, - oldFn *func(c.Pointer, c.Pointer), oldCd *c.Pointer) - -//go:linkname RegisterFinalizerIgnoreSelf C.GC_register_finalizer_ignore_self -func RegisterFinalizerIgnoreSelf( - obj c.Pointer, - fn func(c.Pointer, c.Pointer), cd c.Pointer, - oldFn *func(c.Pointer, c.Pointer), oldCd *c.Pointer) - -//go:linkname RegisterFinalizerUnreachable C.GC_register_finalizer_unreachable -func RegisterFinalizerUnreachable( - obj c.Pointer, - fn func(c.Pointer, c.Pointer), cd c.Pointer, - oldFn *func(c.Pointer, c.Pointer), oldCd *c.Pointer) - -// ----------------------------------------------------------------------------- - -//go:linkname Enable C.GC_enable -func Enable() - -//go:linkname Disable C.GC_disable -func Disable() - -//go:linkname IsDisabled C.GC_is_disabled -func IsDisabled() c.Int - -//go:linkname Gcollect C.GC_gcollect -func Gcollect() - -//go:linkname GetMemoryUse C.GC_get_memory_use -func GetMemoryUse() uintptr - -// ----------------------------------------------------------------------------- - -//go:linkname EnableIncremental C.GC_enable_incremental -func EnableIncremental() - -//go:linkname IsIncrementalMode C.GC_is_incremental_mode -func IsIncrementalMode() c.Int - -//go:linkname IncrementalProtectionNeeds C.GC_incremental_protection_needs -func IncrementalProtectionNeeds() c.Int - -//go:linkname StartIncrementalCollection C.GC_start_incremental_collection -func StartIncrementalCollection() - -//go:linkname CollectALittle C.GC_collect_a_little -func CollectALittle() - -// ----------------------------------------------------------------------------- diff --git a/c/bitcast/_cast/cast.c b/c/bitcast/_cast/cast.c deleted file mode 100644 index 2d7eeffc..00000000 --- a/c/bitcast/_cast/cast.c +++ /dev/null @@ -1,29 +0,0 @@ -typedef union { - double d; - float f; - long v; -} castUnion; - -double llgoToFloat64(long v) { - castUnion k; - k.v = v; - return k.d; -} - -float llgoToFloat32(long v) { - castUnion k; - k.v = v; - return k.f; -} - -long llgoFromFloat64(double v) { - castUnion k; - k.d = v; - return k.v; -} - -long llgoFromFloat32(float v) { - castUnion k; - k.f = v; - return k.v; -} diff --git a/c/bitcast/bitcast.go b/c/bitcast/bitcast.go deleted file mode 100644 index f988fa90..00000000 --- a/c/bitcast/bitcast.go +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package bitcast - -import _ "unsafe" - -const ( - LLGoFiles = "_cast/cast.c" - LLGoPackage = "link" -) - -//go:linkname ToFloat64 C.llgoToFloat64 -func ToFloat64(v uintptr) float64 - -//go:linkname ToFloat32 C.llgoToFloat32 -func ToFloat32(v uintptr) float32 - -//go:linkname FromFloat64 C.llgoFromFloat64 -func FromFloat64(v float64) uintptr - -//go:linkname FromFloat32 C.llgoFromFloat32 -func FromFloat32(v float32) uintptr diff --git a/c/c.go b/c/c.go deleted file mode 100644 index 918a6716..00000000 --- a/c/c.go +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package c - -// typedef unsigned int uint; -// typedef unsigned long ulong; -// typedef unsigned long long ulonglong; -// typedef long long longlong; -import "C" -import "unsafe" - -const ( - LLGoPackage = "decl" -) - -type ( - Void = [0]byte - Char = int8 - Float = float32 - Double = float64 - Pointer = unsafe.Pointer - FilePtr = *FILE -) - -type FILE struct { - Unused [8]byte -} - -type ( - Int C.int - Uint C.uint - - Long C.long - Ulong C.ulong - - LongLong C.longlong - UlongLong C.ulonglong -) - -type integer interface { - ~int | ~uint | ~uintptr | ~int32 | ~uint32 | ~int64 | ~uint64 -} - -type SizeT = uintptr -type SsizeT = Long - -type IntptrT = uintptr -type UintptrT = uintptr -type Int8T = int8 -type Int16T = int16 -type Int32T = int32 -type Int64T = int64 - -type Uint8T = uint8 -type Uint16T = uint16 -type Uint32T = uint32 -type Uint64T = uint64 - -type IntmaxT = LongLong -type UintmaxT = UlongLong - -type VaList = Pointer - -//go:linkname Str llgo.cstr -func Str(string) *Char - -//go:linkname Func llgo.funcAddr -func Func(any) Pointer - -// llgo:link Advance llgo.advance -func Advance[PtrT any, I integer](ptr PtrT, offset I) PtrT { return ptr } - -// llgo:link Index llgo.index -func Index[T any, I integer](ptr *T, offset I) T { return *ptr } - -//go:linkname Alloca llgo.alloca -func Alloca(size uintptr) Pointer - -//go:linkname AllocaCStr llgo.allocaCStr -func AllocaCStr(s string) *Char - -//go:linkname AllocaCStrs llgo.allocaCStrs -func AllocaCStrs(strs []string, endWithNil bool) **Char - -// TODO(xsw): -// llgo:link AllocaNew llgo.allocaNew -func AllocaNew[T any]() *T { return nil } - -//go:linkname Malloc C.malloc -func Malloc(size uintptr) Pointer - -//go:linkname Calloc C.calloc -func Calloc(num uintptr, size uintptr) Pointer - -//go:linkname Free C.free -func Free(ptr Pointer) - -//go:linkname Realloc C.realloc -func Realloc(ptr Pointer, size uintptr) Pointer - -//go:linkname Memcpy C.memcpy -func Memcpy(dst, src Pointer, n uintptr) Pointer - -//go:linkname Memmove C.memmove -func Memmove(dst, src Pointer, n uintptr) Pointer - -//go:linkname Memset C.memset -func Memset(s Pointer, c Int, n uintptr) Pointer - -//go:linkname Memchr C.memchr -func Memchr(s Pointer, c Int, n uintptr) Pointer - -//go:linkname Memcmp C.memcmp -func Memcmp(s1, s2 Pointer, n uintptr) Int - -// ----------------------------------------------------------------------------- - -//go:linkname Strlen C.strlen -func Strlen(s *Char) uintptr - -//go:linkname Strcpy C.strcpy -func Strcpy(dst, src *Char) *Char - -//go:linkname Strncpy C.strncpy -func Strncpy(dst, src *Char, n uintptr) *Char - -//go:linkname Strcat C.strcat -func Strcat(dst, src *Char) *Char - -//go:linkname Strncat C.strncat -func Strncat(dst, src *Char, n uintptr) *Char - -//go:linkname Strcmp C.strcmp -func Strcmp(s1, s2 *Char) Int - -//go:linkname Strncmp C.strncmp -func Strncmp(s1, s2 *Char, n uintptr) Int - -//go:linkname Strchr C.strchr -func Strchr(s *Char, c Int) *Char - -//go:linkname Strrchr C.strrchr -func Strrchr(s *Char, c Int) *Char - -//go:linkname Strstr C.strstr -func Strstr(s1, s2 *Char) *Char - -//go:linkname Strdup C.strdup -func Strdup(s *Char) *Char - -//go:linkname Strndup C.strndup -func Strndup(s *Char, n uintptr) *Char - -//go:linkname Strtok C.strtok -func Strtok(s, delim *Char) *Char - -//go:linkname Strerror C.strerror -func Strerror(errnum Int) *Char - -//go:linkname Sprintf C.sprintf -func Sprintf(s *Char, format *Char, __llgo_va_list ...any) Int - -//go:linkname Snprintf C.snprintf -func Snprintf(s *Char, n uintptr, format *Char, __llgo_va_list ...any) Int - -//go:linkname Vsnprintf C.vsnprintf -func Vsnprintf(s *Char, n uintptr, format *Char, ap Pointer) Int - -// ----------------------------------------------------------------------------- - -// GoString converts a C string to a Go string. -// TODO(xsw): any => int -// -//go:linkname GoString llgo.string -func GoString(cstr *Char, __llgo_va_list /* n */ ...any) string - -//go:linkname GoStringData llgo.stringData -func GoStringData(string) *Char - -//go:linkname GoDeferData llgo.deferData -func GoDeferData() Pointer - -// ----------------------------------------------------------------------------- - -//go:linkname AllocaSigjmpBuf llgo.sigjmpbuf -func AllocaSigjmpBuf() Pointer - -//go:linkname Sigsetjmp llgo.sigsetjmp -func Sigsetjmp(jb Pointer, savemask Int) Int - -//go:linkname Siglongjmp llgo.siglongjmp -func Siglongjmp(jb Pointer, retval Int) - -//go:linkname Unreachable llgo.unreachable -func Unreachable() - -// ----------------------------------------------------------------------------- - -//go:linkname Exit C.exit -func Exit(Int) - -// ----------------------------------------------------------------------------- - -//go:linkname Rand C.rand -func Rand() Int - -//go:linkname Qsort C.qsort -func Qsort(base Pointer, count, elem uintptr, compar func(a, b Pointer) Int) - -// ----------------------------------------------------------------------------- - -//go:linkname Atoi C.atoi -func Atoi(s *Char) Int - -// ----------------------------------------------------------------------------- - -//go:linkname Printf C.printf -func Printf(format *Char, __llgo_va_list ...any) Int - -//go:linkname Fprintf C.fprintf -func Fprintf(fp FilePtr, format *Char, __llgo_va_list ...any) Int - -//go:linkname Fwrite C.fwrite -func Fwrite(data Pointer, size, count uintptr, fp FilePtr) uintptr - -//go:linkname Fputc C.fputc -func Fputc(c Int, fp FilePtr) Int - -//go:linkname Fputs C.fputs -func Fputs(s *Char, fp FilePtr) Int - -//go:linkname Fread C.fread -func Fread(data Pointer, size, count uintptr, fp FilePtr) uintptr - -//go:linkname Fflush C.fflush -func Fflush(fp FilePtr) Int - -//go:linkname Fopen C.fopen -func Fopen(c *Char, mod *Char) FilePtr - -//go:linkname Fclose C.fclose -func Fclose(fp FilePtr) Int - -//go:linkname Perror C.perror -func Perror(s *Char) - -// ----------------------------------------------------------------------------- - -type IconvT = Pointer - -// ----------------------------------------------------------------------------- - -type LocaleT = Pointer - -// ----------------------------------------------------------------------------- - -//go:linkname Usleep C.usleep -func Usleep(useconds Uint) Int - -// ----------------------------------------------------------------------------- - -type Option struct { - Name *Char - HasArg Int - Flag *Int - Val Int -} - -//go:linkname Argc __llgo_argc -var Argc Int - -//go:linkname Argv __llgo_argv -var Argv **Char - -//go:linkname Optarg optarg -var Optarg *Char - -//go:linkname Optind optind -var Optind Int - -//go:linkname Opterr opterr -var Opterr Int - -//go:linkname Optopt optopt -var Optopt Int - -//go:linkname Getopt C.getopt -func Getopt(argc Int, argv **Char, optstring *Char) Int - -//go:linkname GetoptLong C.getopt_long -func GetoptLong(argc Int, argv **Char, optstring *Char, longopts *Option, longindex *Int) Int - -//go:linkname GetoptLongOnly C.getopt_long_only -func GetoptLongOnly(argc Int, argv **Char, optstring *Char, longopts *Option, longindex *Int) Int - -// ----------------------------------------------------------------------------- - -//go:linkname Sysconf C.sysconf -func Sysconf(name Int) Long diff --git a/c/c_default.go b/c/c_default.go deleted file mode 100644 index 45286fe9..00000000 --- a/c/c_default.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !linux -// +build !linux - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package c - -import _ "unsafe" - -//go:linkname Stdin __stdinp -var Stdin FilePtr - -//go:linkname Stdout __stdoutp -var Stdout FilePtr - -//go:linkname Stderr __stderrp -var Stderr FilePtr diff --git a/c/c_linux.go b/c/c_linux.go deleted file mode 100644 index 70cc9bea..00000000 --- a/c/c_linux.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build linux -// +build linux - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package c - -import _ "unsafe" - -//go:linkname Stdin stdin -var Stdin FilePtr - -//go:linkname Stdout stdout -var Stdout FilePtr - -//go:linkname Stderr stderr -var Stderr FilePtr diff --git a/c/cjson/README.md b/c/cjson/README.md deleted file mode 100644 index 58911541..00000000 --- a/c/cjson/README.md +++ /dev/null @@ -1,31 +0,0 @@ -LLGo wrapper of DaveGamble/cJSON -===== - -## How to install - -### on macOS (Homebrew) - -```sh -brew install cjson -``` - -### on Linux (Debian/Ubuntu) - -```sh -apt-get install -y libcjson-dev -``` - -## Demos - -The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it): - -* [mkjson](_demo/mkjson/mkjson.go): create a json object and print it - -### How to run demos - -To run the demos in directory `_demo`: - -```sh -cd # eg. cd _demo/mkjson -llgo run . -``` diff --git a/c/cjson/_demo/mkjson/mkjson.go b/c/cjson/_demo/mkjson/mkjson.go deleted file mode 100644 index 6361d48b..00000000 --- a/c/cjson/_demo/mkjson/mkjson.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/cjson" -) - -func main() { - mod := cjson.Object() - mod.SetItem(c.Str("name"), cjson.String(c.Str("math"))) - - syms := cjson.Array() - - fn := cjson.Object() - fn.SetItem(c.Str("name"), cjson.String(c.Str("sqrt"))) - fn.SetItem(c.Str("sig"), cjson.String(c.Str("(x, /)"))) - syms.AddItem(fn) - - v := cjson.Object() - v.SetItem(c.Str("name"), cjson.String(c.Str("pi"))) - syms.AddItem(v) - - mod.SetItem(c.Str("items"), syms) - - cstr := mod.CStr() - str := c.GoString(cstr) - c.Printf(c.Str("%s\n"), cstr) - cjson.FreeCStr(cstr) - - mod.Delete() - - cjsonLoad(str) -} - -func cjsonLoad(str string) { - mod := cjson.ParseString(str) - - cstr := mod.Print() - c.Printf(c.Str("%s\n"), cstr) - cjson.FreeCStr(cstr) - - mod.Delete() -} diff --git a/c/cjson/cjson.go b/c/cjson/cjson.go deleted file mode 100644 index fb1e729c..00000000 --- a/c/cjson/cjson.go +++ /dev/null @@ -1,670 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package cjson - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs libcjson); -lcjson" -) - -type Bool c.Int - -// llgo:type C -type JSON struct { - Unused [0]byte -} - -func ParseBytes(value []byte) *JSON { - return ParseWithLength((*c.Char)(unsafe.Pointer(unsafe.SliceData(value))), uintptr(len(value))) -} - -func ParseString(value string) *JSON { - return ParseWithLength((*c.Char)(unsafe.Pointer(unsafe.StringData(value))), uintptr(len(value))) -} - -// CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item); -// -// Render a cJSON entity to text for transfer/storage without any formatting. -// -// llgo:link (*JSON).CStr C.cJSON_PrintUnformatted -func (o *JSON) CStr() *c.Char { return nil } - -// Same as CStr. Provided for Go+. -// -// llgo:link (*JSON).Cstr C.cJSON_PrintUnformatted -func (o *JSON) Cstr() *c.Char { return nil } - -// malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks -// -//go:linkname FreeCStr C.cJSON_free -func FreeCStr(*c.Char) - -// CJSON_PUBLIC(const char*) cJSON_Version(void); -// -// returns the version of cJSON as a string -// -//go:linkname Version C.cJSON_Version -func Version() *c.Char - -// CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value); -// -// Memory Management: the caller is always responsible to free -// the results from all variants of cJSON_Parse (with cJSON_Delete) -// and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or -// cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, -// where the caller has full responsibility of the buffer. -// -//go:linkname Parse C.cJSON_Parse -func Parse(value *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_ParseWithLength(const char *value, size_t buffer_length); -// -// Memory Management: the caller is always responsible to free -// the results from all variants of cJSON_Parse (with cJSON_Delete) -// and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or -// cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, -// where the caller has full responsibility of the buffer. -// -//go:linkname ParseWithLength C.cJSON_ParseWithLength -func ParseWithLength(value *c.Char, valueLength uintptr) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_Bool require_null_terminated); -// -// ParseWithOpts allows you to require (and check) that the JSON is null terminated, -// and to retrieve the pointer to the final byte parsed. -// If you supply a ptr in return_parse_end and parsing fails, then -// return_parse_end will contain a pointer to the error so will match -// cJSON_GetErrorPtr(). -// -//go:linkname ParseWithOpts C.cJSON_ParseWithOpts -func ParseWithOpts(value *c.Char, return_parse_end **c.Char, require_null_terminated Bool) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **return_parse_end, cJSON_Bool require_null_terminated); -// -// ParseWithOpts allows you to require (and check) that the JSON is null terminated, -// and to retrieve the pointer to the final byte parsed. -// If you supply a ptr in return_parse_end and parsing fails, then -// return_parse_end will contain a pointer to the error so will match -// cJSON_GetErrorPtr(). -// -//go:linkname ParseWithLengthOpts C.cJSON_ParseWithLengthOpts -func ParseWithLengthOpts(value *c.Char, buffer_length uintptr, return_parse_end **c.Char, require_null_terminated Bool) *JSON - -// CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item); -// Render a JSON entity to text for transfer/storage. -// -// llgo:link (*JSON).Print C.cJSON_Print -func (o *JSON) Print() *c.Char { return nil } - -// CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item); -// Render a JSON entity to text for transfer/storage without any formatting. -// -// llgo:link (*JSON).PrintUnformatted C.cJSON_PrintUnformatted -func (o *JSON) PrintUnformatted() *c.Char { return nil } - -// CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_Bool fmt); -// -// Render a JSON entity to text using a buffered strategy. -// prebuffer is a guess at the final size. guessing well reduces reallocation. -// fmt=0 gives unformatted, =1 gives formatted. -// -// llgo:link (*JSON).PrintBuffered C.cJSON_PrintBuffered -func (o *JSON) PrintBuffered(prebuffer c.Int, fmt Bool) *c.Char { return nil } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_Bool format); -// -// Render a cJSON entity to text using a buffer already allocated in memory with given -// length. Returns 1 on success and 0 on failure. -// note that cJSON is not always 100% accurate in estimating how much memory it will use, -// so to be safe allocate 5 bytes more than you actually need -// -// llgo:link (*JSON).PrintPreallocated C.cJSON_PrintPreallocated -func (o *JSON) PrintPreallocated(buffer *c.Char, length c.Int, format Bool) Bool { - return Bool(0) -} - -// CJSON_PUBLIC(void) cJSON_Delete(cJSON *item); -// Delete a JSON entity and all subentities. -// -// llgo:link (*JSON).Delete C.cJSON_Delete -func (o *JSON) Delete() {} - -// CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array); -// -// Returns the number of items in an array (or object). -// -// llgo:link (*JSON).GetArraySize C.cJSON_GetArraySize -func (o *JSON) GetArraySize() c.Int { return 0 } - -// CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index); -// -// Retrieve item number "index" from array "array". Returns NULL if unsuccessful. -// -// llgo:link (*JSON).GetArrayItem C.cJSON_GetArrayItem -func (o *JSON) GetArrayItem(index c.Int) *JSON { return nil } - -// CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string); -// -// Get item "string" from object. Case insensitive. -// -// llgo:link (*JSON).GetObjectItem C.cJSON_GetObjectItem -func (o *JSON) GetObjectItem(s *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string); -// -// Get item "string" from object. Case sensitive. -// -// llgo:link (*JSON).GetObjectItemCaseSensitive C.cJSON_GetObjectItemCaseSensitive -func (o *JSON) GetObjectItemCaseSensitive(key *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_HasObjectItem(const cJSON *object, const char *string); -// -// llgo:link (*JSON).HasObjectItem C.cJSON_HasObjectItem -func (o *JSON) HasObjectItem(s *c.Char) Bool { return Bool(0) } - -// CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void); -// -// For analysing failed parses. This returns a pointer to the parse error. -// You'll probably need to look a few chars back to make sense of it. -// Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. -// -//go:linkname GetErrorPtr C.cJSON_GetErrorPtr -func GetErrorPtr() *c.Char - -// CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item); -// -// Check item type and return its value -// -// llgo:link (*JSON).GetStringValue C.cJSON_GetStringValue -func (o *JSON) GetStringValue() *c.Char { return nil } - -// CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item); -// -// Check item type and return its value -// -// llgo:link (*JSON).GetNumberValue C.cJSON_GetNumberValue -func (o *JSON) GetNumberValue() c.Double { return 0 } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsInvalid(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsInvalid C.cJSON_IsInvalid -func (o *JSON) IsInvalid() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsFalse(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsFalse C.cJSON_IsFalse -func (o *JSON) IsFalse() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsTrue(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsTrue C.cJSON_IsTrue -func (o *JSON) IsTrue() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsBool(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsBool C.cJSON_IsBool -func (o *JSON) IsBool() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsNull(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsNull C.cJSON_IsNull -func (o *JSON) IsNull() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsNumber(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsNumber C.cJSON_IsNumber -func (o *JSON) IsNumber() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsString(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsString C.cJSON_IsString -func (o *JSON) IsString() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsArray(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsArray C.cJSON_IsArray -func (o *JSON) IsArray() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsObject(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsObject C.cJSON_IsObject -func (o *JSON) IsObject() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_IsRaw(const cJSON * const item); -// -// These functions check the type of an item -// -// llgo:link (*JSON).IsRaw C.cJSON_IsRaw -func (o *JSON) IsRaw() Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void); -// -// These calls create a cJSON item of the appropriate type. -// -//go:linkname Null C.cJSON_CreateNull -func Null() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void); -// -// same as Null func -// -//go:linkname CreateNull C.cJSON_CreateNull -func CreateNull() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void); -// -//go:linkname True C.cJSON_CreateTrue -func True() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void); -// -// same as True func -// -//go:linkname CreateTrue C.cJSON_CreateTrue -func CreateTrue() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void); -// -//go:linkname False C.cJSON_CreateFalse -func False() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void); -// -// same as False func -// -//go:linkname CreateFalse C.cJSON_CreateFalse -func CreateFalse() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_Bool boolean); -// -// same as Bool func -// -//go:linkname CreateBool C.cJSON_CreateBool -func CreateBool(boolean c.Int) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num); -// -//go:linkname Number C.cJSON_CreateNumber -func Number(num float64) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num); -// -// same as Number func -// -//go:linkname CreateNumber C.cJSON_CreateNumber -func CreateNumber(num float64) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string); -// -//go:linkname String C.cJSON_CreateString -func String(str *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string); -// -// same as String func -// -//go:linkname CreateString C.cJSON_CreateString -func CreateString(str *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw); -// raw json -// -//go:linkname Raw C.cJSON_CreateRaw -func Raw(raw *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw); -// -// same as Raw func -// -//go:linkname CreateRaw C.cJSON_CreateRaw -func CreateRaw(raw *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void); -// -//go:linkname Array C.cJSON_CreateArray -func Array() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void); -// -// same as Array func -// -//go:linkname CreateArray C.cJSON_CreateArray -func CreateArray() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); -// -//go:linkname Object C.cJSON_CreateObject -func Object() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); -// -// same as Object func -// -//go:linkname CreateObject C.cJSON_CreateObject -func CreateObject() *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -// -// Create a string where valuestring references a string so -// it will not be freed by Delete -// -//go:linkname StringRef C.cJSON_CreateStringReference -func StringRef(str *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -// -// same as StringRef func -// -//go:linkname CreateStringReference C.cJSON_CreateStringReference -func CreateStringReference(str *c.Char) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); -// -// Create an object that only references it's elements so -// they will not be freed by Delete -// -//go:linkname ObjectRef C.cJSON_CreateObjectReference -func ObjectRef(child *JSON) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); -// -// same as ObjectRef func -// -//go:linkname CreateObjectReference C.cJSON_CreateObjectReference -func CreateObjectReference(child *JSON) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); -// -// Create an array that only references it's elements so -// they will not be freed by Delete -// -//go:linkname ArrayRef C.cJSON_CreateArrayReference -func ArrayRef(child *JSON) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); -// -// same as ArrayRef func -// -//go:linkname CreateArrayReference C.cJSON_CreateArrayReference -func CreateArrayReference(child *JSON) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count); -// -//go:linkname CreateIntArray C.cJSON_CreateIntArray -func CreateIntArray(numbers *c.Int, count c.Int) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count); -// -//go:linkname CreateFloatArray C.cJSON_CreateFloatArray -func CreateFloatArray(numbers *c.Float, count c.Int) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count); -// -//go:linkname CreateDoubleArray C.cJSON_CreateDoubleArray -func CreateDoubleArray(numbers *c.Double, count c.Int) *JSON - -// CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int count); -// -//go:linkname CreateStringArray C.cJSON_CreateStringArray -func CreateStringArray(strings *c.Char, count c.Int) *JSON - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemToArray(cJSON *array, cJSON *item); -// -// Append item to the specified array. -// -// llgo:link (*JSON).AddItem C.cJSON_AddItemToArray -func (o *JSON) AddItem(item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemToArray(cJSON *array, cJSON *item); -// -// same as AddItem func -// -// llgo:link (*JSON).AddItemToArray C.cJSON_AddItemToArray -func (o *JSON) AddItemToArray(item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item); -// -// Append item to the specified object. -// -// llgo:link (*JSON).SetItem C.cJSON_AddItemToObject -func (o *JSON) SetItem(key *c.Char, item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item); -// -// same as SetItem func -// -// llgo:link (*JSON).AddItemToObject C.cJSON_AddItemToObject -func (o *JSON) AddItemToObject(key *c.Char, item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item); -// -// Use this when string is definitely const (i.e. a literal, or as good as), -// and will definitely survive the cJSON object. -// warning that When this function was used, make sure to always check that -// (item->type & cJSON_StringIsConst) is zero before writing to `item->string` -// -// llgo:link (*JSON).AddItemToObjectCS C.cJSON_AddItemToObjectCS -func (o *JSON) AddItemToObjectCS(s *c.Char, item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item); -// -// Append reference to item to the specified array/object. -// Use this when you want to add an existing cJSON to a new cJSON, -// but don't want to corrupt your existing cJSON. -// -// llgo:link (*JSON).AddItemReferenceToArray C.cJSON_AddItemReferenceToArray -func (o *JSON) AddItemReferenceToArray(item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item); -// -// llgo:link (*JSON).AddItemReferenceToObject C.cJSON_AddItemReferenceToObject -func (o *JSON) AddItemReferenceToObject(s *c.Char, item *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item); -// -// Remove/Detach items from Arrays/Objects. -// -// llgo:link (*JSON).DetachItemViaPointer C.cJSON_DetachItemViaPointer -func (o *JSON) DetachItemViaPointer(item *JSON) *JSON { return nil } - -// CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which); -// -// llgo:link (*JSON).DetachItemFromArray C.cJSON_DetachItemFromArray -func (o *JSON) DetachItemFromArray(which c.Int) *JSON { return nil } - -// CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which); -// -// llgo:link (*JSON).DeleteItemFromArray C.cJSON_DeleteItemFromArray -func (o *JSON) DeleteItemFromArray(which c.Int) {} - -// CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string); -// -// llgo:link (*JSON).DetachItemFromObject C.cJSON_DetachItemFromObject -func (o *JSON) DetachItemFromObject(s *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string); -// -// llgo:link (*JSON).DetachItemFromObjectCaseSensitive C.cJSON_DetachItemFromObjectCaseSensitive -func (o *JSON) DetachItemFromObjectCaseSensitive(s *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string); -// -// llgo:link (*JSON).DeleteItemFromObject C.cJSON_DeleteItemFromObject -func (o *JSON) DeleteItemFromObject(s *c.Char) {} - -// CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string); -// -// llgo:link (*JSON).DeleteItemFromObjectCaseSensitive C.cJSON_DeleteItemFromObjectCaseSensitive -func (o *JSON) DeleteItemFromObjectCaseSensitive(s *c.Char) {} - -// CJSON_PUBLIC(cJSON_Bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); -// -// Update array items. -// Shifts pre-existing items to the right. -// -// llgo:link (*JSON).InsertItemInArray C.cJSON_InsertItemInArray -func (o *JSON) InsertItemInArray(which c.Int, newitem *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement); -// -// llgo:link (*JSON).ReplaceItemViaPointer C.cJSON_ReplaceItemViaPointer -func (o *JSON) ReplaceItemViaPointer(item *JSON, replacement *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem); -// -// llgo:link (*JSON).ReplaceItemInArray C.cJSON_ReplaceItemInArray -func (o *JSON) ReplaceItemInArray(which c.Int, newitem *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem); -// -// llgo:link (*JSON).ReplaceItemInObject C.cJSON_ReplaceItemInObject -func (o *JSON) ReplaceItemInObject(s *c.Char, newitem *JSON) Bool { return Bool(0) } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const char *string,cJSON *newitem); -// -// llgo:link (*JSON).ReplaceItemInObjectCaseSensitive C.cJSON_ReplaceItemInObjectCaseSensitive -func (o *JSON) ReplaceItemInObjectCaseSensitive(s *c.Char, newitem *JSON) Bool { - return Bool(0) -} - -// CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_Bool recurse); -// -// Duplicate a cJSON item -// -// Duplicate will create a new, identical cJSON item to the one you pass, -// in new memory that will need to be released. With recurse!=0, -// it will duplicate any children connected to the item. -// The item->next and ->prev pointers are always zero on return from Duplicate. -// -// llgo:link (*JSON).Duplicate C.cJSON_Duplicate -func (o *JSON) Duplicate(recurse Bool) *JSON { return nil } - -// CJSON_PUBLIC(cJSON_Bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_Bool case_sensitive); -// -// Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, -// they will be considered unequal. case_sensitive determines if object keys are treated -// case sensitive (1) or case insensitive (0) -// -// llgo:link (*JSON).Compare C.cJSON_Compare -func (o *JSON) Compare(b *JSON, case_sensitive Bool) Bool { return Bool(0) } - -// CJSON_PUBLIC(void) cJSON_Minify(char *json); -// -// Minify a strings, remove blank characters(such as ' ', '\t', '\r', '\n') from strings. -// The input pointer json cannot point to a read-only address area, such as a string constant, -// but should point to a readable and writable address area. -// -//go:linkname Minify C.cJSON_Minify -func Minify() - -// CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name); -// -// Helper functions for creating and adding items to an object at the same time. -// They return the added item or NULL on failure. -// -// llgo:link (*JSON).AddNullToObject C.cJSON_AddNullToObject -func (o *JSON) AddNullToObject(name *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name); -// -// llgo:link (*JSON).AddTrueToObject C.cJSON_AddTrueToObject -func (o *JSON) AddTrueToObject(name *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name); -// -// llgo:link (*JSON).AddFalseToObject C.cJSON_AddFalseToObject -func (o *JSON) AddFalseToObject(name *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_Bool boolean); -// -// llgo:link (*JSON).AddBoolToObject C.cJSON_AddBoolToObject -func (o *JSON) AddBoolToObject(name *c.Char, b Bool) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number); -// -// llgo:link (*JSON).AddNumberToObject C.cJSON_AddNumberToObject -func (o *JSON) AddNumberToObject(name *c.Char, num c.Double) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string); -// -// llgo:link (*JSON).AddStringToObject C.cJSON_AddStringToObject -func (o *JSON) AddStringToObject(name *c.Char, s *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw); -// -// llgo:link (*JSON).AddRawToObject C.cJSON_AddRawToObject -func (o *JSON) AddRawToObject(name *c.Char, raw *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name); -// -// llgo:link (*JSON).AddObjectToObject C.cJSON_AddObjectToObject -func (o *JSON) AddObjectToObject(name *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name); -// -// llgo:link (*JSON).AddArrayToObject C.cJSON_AddArrayToObject -func (o *JSON) AddArrayToObject(name *c.Char) *JSON { return nil } - -// CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number); -// -// helper for the cJSON_SetNumberValue macro -// -// llgo:link (*JSON).SetNumberHelper C.cJSON_SetNumberHelper -func (o *JSON) SetNumberHelper(number c.Double) c.Double { return 0 } - -// CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring); -// -// Change the valuestring of a cJSON_String object, only takes effect when type of -// object is cJSON_String -// -// llgo:link (*JSON).SetValuestring C.cJSON_SetValuestring -func (o *JSON) SetValuestring(v *c.Char) *c.Char { return nil } - -// CJSON_PUBLIC(void *) cJSON_malloc(size_t size); -// -// malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks -// -//go:linkname Malloc C.cJSON_malloc -func Malloc(size uintptr) - -// CJSON_PUBLIC(void) cJSON_free(void *object); -// -//go:linkname Free C.cJSON_free -func Free(ptr unsafe.Pointer) diff --git a/c/clang/_demo/inclusion/inclusion.go b/c/clang/_demo/inclusion/inclusion.go deleted file mode 100644 index d9f55375..00000000 --- a/c/clang/_demo/inclusion/inclusion.go +++ /dev/null @@ -1,35 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/clang" - "github.com/goplus/llgo/compiler/chore/_xtool/llcppsymg/clangutils" -) - -func main() { - _, unit, err := clangutils.CreateTranslationUnit(&clangutils.Config{ - File: "#include ", - Temp: true, - IsCpp: false, - }) - if err != nil { - println(err.Error()) - return - } - - clang.GetInclusions(unit, func(included_file clang.File, inclusion_stack *clang.SourceLocation, include_len c.Uint, client_data c.Pointer) { - filename := included_file.FileName() - c.Printf(c.Str("Included file: %s Include length: %d\n"), filename.CStr(), include_len) - inclusions := unsafe.Slice(inclusion_stack, include_len) - for i := range inclusions { - loc := inclusions[i] - var file clang.File - var line, column c.Uint - loc.SpellingLocation(&file, &line, &column, nil) - filename = file.FileName() - c.Printf(c.Str(" included from: %s:%d:%d\n"), filename.CStr(), line, column) - } - }, nil) -} diff --git a/c/clang/_demo/symboldump/symboldump.go b/c/clang/_demo/symboldump/symboldump.go deleted file mode 100644 index 0ec7ff4c..00000000 --- a/c/clang/_demo/symboldump/symboldump.go +++ /dev/null @@ -1,172 +0,0 @@ -package main - -import ( - "fmt" - "os" - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/clang" -) - -type Context struct { - namespaceName string - className string - unit *clang.TranslationUnit -} - -func newContext() *Context { - return &Context{} -} - -func (c *Context) setNamespaceName(name string) { - c.namespaceName = name -} - -func (c *Context) setClassName(name string) { - c.className = name -} - -func (c *Context) setUnit(unit *clang.TranslationUnit) { - c.unit = unit -} - -var context = newContext() - -func printCursorLocation(cursor clang.Cursor) { - loc := cursor.Location() - var file clang.File - var line, column, presumedLine, presumedColumn c.Uint - var presumedFilename clang.String - - loc.SpellingLocation(&file, &line, &column, nil) - loc.PresumedLocation(&presumedFilename, &presumedLine, &presumedColumn) - filename := file.FileName() - defer filename.Dispose() - - c.Printf(c.Str("Location: %s:%d:%d\n"), filename.CStr(), line, column) - c.Printf(c.Str("Presumed Location: %s:%d:%d\n"), presumedFilename.CStr(), presumedLine, presumedColumn) -} - -func printMarcoInfo(cursor clang.Cursor) { - printCursorLocation(cursor) - name := cursor.String() - c.Printf(c.Str("Marco Name: %s\n"), name.CStr()) - ran := cursor.Extent() - var numTokens c.Uint - var tokens *clang.Token - context.unit.Tokenize(ran, &tokens, &numTokens) - c.Printf(c.Str("Content: ")) - - tokensSlice := unsafe.Slice(tokens, int(numTokens)) - for _, tok := range tokensSlice { - tokStr := context.unit.Token(tok) - c.Printf(c.Str("%s "), tokStr.CStr()) - tokStr.Dispose() - } - - c.Printf(c.Str("\n")) - println("--------------------------------") -} -func printFuncInfo(cursor clang.Cursor) { - printCursorLocation(cursor) - - cursorStr := cursor.String() - symbol := cursor.Mangling() - defer symbol.Dispose() - defer cursorStr.Dispose() - - if context.namespaceName != "" && context.className != "" { - fmt.Printf("%s:%s:", context.namespaceName, context.className) - } else if context.namespaceName != "" { - fmt.Printf("%s:", context.namespaceName) - } - c.Printf(c.Str("%s\n"), cursorStr.CStr()) - - if cursor.Kind == clang.CursorCXXMethod || cursor.Kind == clang.CursorFunctionDecl { - c.Printf(c.Str("symbol:%s\n"), symbol.CStr()) - - typeStr := cursor.ResultType().String() - defer typeStr.Dispose() - c.Printf(c.Str("Return Type: %s\n"), typeStr.CStr()) - c.Printf(c.Str("Parameters(%d): ( "), cursor.NumArguments()) - - for i := 0; i < int(cursor.NumArguments()); i++ { - argCurSor := cursor.Argument(c.Uint(i)) - argType := argCurSor.Type().String() - argName := argCurSor.String() - c.Printf(c.Str("%s %s"), argType.CStr(), argName.CStr()) - if i < int(cursor.NumArguments())-1 { - c.Printf(c.Str(", ")) - } - - argType.Dispose() - argName.Dispose() - } - - c.Printf(c.Str(" )\n")) - println("--------------------------------") - } -} - -func visit(cursor, parent clang.Cursor, clientData c.Pointer) clang.ChildVisitResult { - switch cursor.Kind { - case clang.CursorMacroDefinition: - printMarcoInfo(cursor) - case clang.CursorNamespace: - nameStr := cursor.String() - context.setNamespaceName(c.GoString(nameStr.CStr())) - clang.VisitChildren(cursor, visit, nil) - context.setNamespaceName("") - case clang.CursorClassDecl: - nameStr := cursor.String() - context.setClassName(c.GoString(nameStr.CStr())) - clang.VisitChildren(cursor, visit, nil) - context.setClassName("") - case clang.CursorCXXMethod, clang.CursorFunctionDecl: - printFuncInfo(cursor) - case clang.CursorEnumDecl, clang.CursorStructDecl, clang.CursorUnionDecl, clang.CursorTypedefDecl: - nameStr := cursor.String() - printCursorLocation(cursor) - c.Printf(c.Str("Name: %s\n"), nameStr.CStr()) - println("--------------------------------") - } - - return clang.ChildVisit_Continue -} - -func parse(filename *c.Char) { - index := clang.CreateIndex(0, 0) - args := make([]*c.Char, 3) - args[0] = c.Str("-x") - args[1] = c.Str("c++") - args[2] = c.Str("-std=c++11") - unit := index.ParseTranslationUnit( - filename, - unsafe.SliceData(args), 3, - nil, 0, - clang.DetailedPreprocessingRecord, - ) - - if unit == nil { - println("Unable to parse translation unit. Quitting.") - c.Exit(1) - } - - context.setUnit(unit) - cursor := unit.Cursor() - - clang.VisitChildren(cursor, visit, nil) - unit.Dispose() - index.Dispose() -} - -func main() { - if c.Argc != 2 { - fmt.Fprintln(os.Stderr, "Usage: \n") - return - } else { - sourceFile := *c.Advance(c.Argv, 1) - parse(sourceFile) - } -} diff --git a/c/clang/_wrap/cursor.cpp b/c/clang/_wrap/cursor.cpp deleted file mode 100644 index bec59d97..00000000 --- a/c/clang/_wrap/cursor.cpp +++ /dev/null @@ -1,224 +0,0 @@ -#include -#include - -typedef enum CXChildVisitResult (*wrap_CXCursorVisitor)(CXCursor *cursor, CXCursor *parent, CXClientData client_data); - -typedef struct { - CXClientData data; - wrap_CXCursorVisitor visitor; -} wrap_data; - -CXChildVisitResult wrap_visitor(CXCursor cursor, CXCursor parent, CXClientData data) { - wrap_data *d = (wrap_data *)(data); - return d->visitor(&cursor, &parent, d->data); -} - -extern "C" { - -void wrap_clang_getLocation(CXTranslationUnit tu, CXFile file, unsigned line, unsigned column, CXSourceLocation *loc) { - *loc = clang_getLocation(tu, file, line, column); -} - -void wrap_clang_getLocationForOffset(CXTranslationUnit tu, CXFile file, unsigned offset, CXSourceLocation *loc) { - *loc = clang_getLocationForOffset(tu, file, offset); -} - -void wrap_clang_getTranslationUnitCursor(CXTranslationUnit uint, CXCursor *cur) { - *cur = clang_getTranslationUnitCursor(uint); -} - -unsigned wrap_clang_equalCursors(CXCursor *cursor1, CXCursor *cursor2) { - return clang_equalCursors(*cursor1, *cursor2); -} - -int wrap_clang_Cursor_isNull(CXCursor *cursor) { return clang_Cursor_isNull(*cursor); } - -void wrap_clang_getCursorSemanticParent(CXCursor *C, CXCursor *parent) { *parent = clang_getCursorSemanticParent(*C); } - -void wrap_clang_getCursorDefinition(CXCursor *C, CXCursor *def) { *def = clang_getCursorDefinition(*C); } - -void wrap_clang_getCursorLexicalParent(CXCursor *C, CXCursor *parent) { *parent = clang_getCursorLexicalParent(*C); } - -void wrap_clang_getOverriddenCursors(CXCursor *cursor, CXCursor **overridden, unsigned *num_overridden) { - clang_getOverriddenCursors(*cursor, overridden, num_overridden); -} - -CXFile wrap_clang_getIncludedFile(CXCursor *cursor) { return clang_getIncludedFile(*cursor); } - -void wrap_clang_getCursor(CXTranslationUnit uint, CXSourceLocation *loc, CXCursor *cur) { - *cur = clang_getCursor(uint, *loc); -} - -void wrap_clang_getCursorLocation(CXCursor *cur, CXSourceLocation *loc) { *loc = clang_getCursorLocation(*cur); } - -void wrap_clang_getCursorExtent(CXCursor *cur, CXSourceRange *range) { *range = clang_getCursorExtent(*cur); } - -void wrap_clang_getCursorType(CXCursor *cur, CXType *typ) { *typ = clang_getCursorType(*cur); } - -CXString wrap_clang_getTypeSpelling(CXType *typ) { return clang_getTypeSpelling(*typ); } - -void wrap_clang_getTypedefDeclUnderlyingType(CXCursor *cur, CXType *typ) { - *typ = clang_getTypedefDeclUnderlyingType(*cur); -} - -long long wrap_clang_getEnumConstantDeclValue(CXCursor *cur) { return clang_getEnumConstantDeclValue(*cur); } - -int wrap_clang_Cursor_getNumArguments(CXCursor *cur) { return clang_Cursor_getNumArguments(*cur); } - -void wrap_clang_Cursor_getArgument(CXCursor *C, unsigned i, CXCursor *argCur) { - *argCur = clang_Cursor_getArgument(*C, i); -} - -void wrap_clang_getCanonicalType(CXType *typ, CXType *canonicalType) { *canonicalType = clang_getCanonicalType(*typ); } - -unsigned wrap_clang_isConstQualifiedType(CXType *typ) { return clang_isConstQualifiedType(*typ); } - -unsigned wrap_clang_Cursor_isMacroFunctionLike(CXCursor *cur) { return clang_Cursor_isMacroFunctionLike(*cur); } - -unsigned wrap_clang_Cursor_isMacroBuiltin(CXCursor *cur) { return clang_Cursor_isMacroBuiltin(*cur); } - -unsigned wrap_clang_Cursor_isFunctionInlined(CXCursor *cur) { return clang_Cursor_isFunctionInlined(*cur); } - -unsigned wrap_clang_isVolatileQualifiedType(CXType *T) { return clang_isVolatileQualifiedType(*T); } - -unsigned wrap_clang_isRestrictQualifiedType(CXType *T) { return clang_isRestrictQualifiedType(*T); } - -void wrap_clang_getPointeeType(CXType *pointerTyp, CXType *pointeeTyp) { - *pointeeTyp = clang_getPointeeType(*pointerTyp); -} - -void wrap_clang_getNonReferenceType(CXType *typ, CXType *nonRefTyp) { *nonRefTyp = clang_getNonReferenceType(*typ); } - -void wrap_clang_getTypeDeclaration(CXType *typ, CXCursor *cur) { *cur = clang_getTypeDeclaration(*typ); } - -void wrap_clang_getResultType(CXType *typ, CXType *resultTyp) { *resultTyp = clang_getResultType(*typ); } - -int wrap_clang_getNumArgTypes(CXType *typ) { return clang_getNumArgTypes(*typ); } - -void wrap_clang_getArgType(CXType *typ, unsigned i, CXType *argTyp) { *argTyp = clang_getArgType(*typ, i); } - -unsigned wrap_clang_isFunctionTypeVariadic(CXType *typ) { return clang_isFunctionTypeVariadic(*typ); } - -void wrap_clang_getCursorResultType(CXCursor *cur, CXType *typ) { *typ = clang_getCursorResultType(*cur); } - -void wrap_clang_getElementType(CXType *Typ, CXType *elemTyp) { *elemTyp = clang_getElementType(*Typ); } - -void wrap_clang_getArrayElementType(CXType *arrayTyp, CXType *elemTyp) { - *elemTyp = clang_getArrayElementType(*arrayTyp); -} - -long long wrap_clang_getArraySize(CXType *arrayTyp) { return clang_getArraySize(*arrayTyp); } - -void wrap_clang_Type_getNamedType(CXType *typ, CXType *namedTyp) { *namedTyp = clang_Type_getNamedType(*typ); } - -long long wrap_clang_Type_getSizeOf(CXType *typ) { return clang_Type_getSizeOf(*typ); } - -unsigned wrap_clang_Cursor_isAnonymous(CXCursor *cursor) { return clang_Cursor_isAnonymous(*cursor); } - -unsigned wrap_clang_Cursor_isAnonymousRecordDecl(CXCursor *cursor) { - return clang_Cursor_isAnonymousRecordDecl(*cursor); -} - -enum CX_CXXAccessSpecifier wrap_clang_getCXXAccessSpecifier(CXCursor *cursor) { - return clang_getCXXAccessSpecifier(*cursor); -} - -enum CX_StorageClass wrap_clang_Cursor_getStorageClass(CXCursor *cursor) { - return clang_Cursor_getStorageClass(*cursor); -} - -CXString wrap_clang_getCursorUSR(CXCursor *cur) { return clang_getCursorUSR(*cur); } - -CXString wrap_clang_getCursorSpelling(CXCursor *cur) { return clang_getCursorSpelling(*cur); } - -CXString wrap_clang_getCursorDisplayName(CXCursor *cur) { return clang_getCursorDisplayName(*cur); } - -void wrap_clang_getCursorReferenced(CXCursor *cur, CXCursor *referenced) { - *referenced = clang_getCursorReferenced(*cur); -} - -unsigned wrap_clang_Cursor_isVariadic(CXCursor *cur) { return clang_Cursor_isVariadic(*cur); } - -void wrap_clang_Cursor_getCommentRange(CXCursor *cur, CXSourceRange *range) { - *range = clang_Cursor_getCommentRange(*cur); -} - -CXString wrap_clang_Cursor_getRawCommentText(CXCursor *cursor) { return clang_Cursor_getRawCommentText(*cursor); } - -CXString wrap_clang_Cursor_getMangling(CXCursor *cur) { return clang_Cursor_getMangling(*cur); } - -unsigned wrap_clang_CXXConstructor_isConvertingConstructor(CXCursor *cursor) { - return clang_CXXConstructor_isConvertingConstructor(*cursor); -} - -unsigned wrap_clang_CXXConstructor_isCopyConstructor(CXCursor *cursor) { - return clang_CXXConstructor_isCopyConstructor(*cursor); -} - -unsigned wrap_clang_CXXConstructor_isDefaultConstructor(CXCursor *cursor) { - return clang_CXXConstructor_isDefaultConstructor(*cursor); -} - -unsigned wrap_clang_CXXConstructor_isMoveConstructor(CXCursor *cursor) { - return clang_CXXConstructor_isMoveConstructor(*cursor); -} - -unsigned wrap_clang_CXXField_isMutable(CXCursor *cursor) { return clang_CXXField_isMutable(*cursor); } - -unsigned wrap_clang_CXXMethod_isDefaulted(CXCursor *cursor) { return clang_CXXMethod_isDefaulted(*cursor); } - -unsigned wrap_clang_CXXMethod_isDeleted(CXCursor *cursor) { return clang_CXXMethod_isDeleted(*cursor); } - -unsigned wrap_clang_CXXMethod_isPureVirtual(CXCursor *cursor) { return clang_CXXMethod_isPureVirtual(*cursor); } - -unsigned wrap_clang_CXXMethod_isStatic(CXCursor *cursor) { return clang_CXXMethod_isStatic(*cursor); } - -unsigned wrap_clang_CXXMethod_isVirtual(CXCursor *cursor) { return clang_CXXMethod_isVirtual(*cursor); } - -unsigned wrap_clang_CXXMethod_isCopyAssignmentOperator(CXCursor *cursor) { - return clang_CXXMethod_isCopyAssignmentOperator(*cursor); -} - -unsigned wrap_clang_CXXMethod_isMoveAssignmentOperator(CXCursor *cursor) { - return clang_CXXMethod_isMoveAssignmentOperator(*cursor); -} - -unsigned wrap_clang_CXXMethod_isExplicit(CXCursor *cursor) { return clang_CXXMethod_isExplicit(*cursor); } - -unsigned wrap_clang_CXXRecord_isAbstract(CXCursor *cursor) { return clang_CXXRecord_isAbstract(*cursor); } - -unsigned wrap_clang_EnumDecl_isScoped(CXCursor *cursor) { return clang_EnumDecl_isScoped(*cursor); } - -unsigned wrap_clang_CXXMethod_isConst(CXCursor *cursor) { return clang_CXXMethod_isConst(*cursor); } - -CXTokenKind wrap_clang_getTokenKind(CXToken *token) { return clang_getTokenKind(*token); } - -CXString wrap_clang_getTokenSpelling(CXTranslationUnit unit, CXToken *token) { - return clang_getTokenSpelling(unit, *token); -} - -void wrap_clang_tokenize(CXTranslationUnit unit, CXSourceRange *Range, CXToken **Tokens, unsigned *NumTokens) { - clang_tokenize(unit, *Range, Tokens, NumTokens); -} - -unsigned wrap_clang_visitChildren(CXCursor *parent, wrap_CXCursorVisitor visitor, CXClientData client_data) { - wrap_data data = {client_data, visitor}; - return clang_visitChildren(*parent, wrap_visitor, CXClientData(&data)); -} - -int wrap_clang_Location_isInSystemHeader(CXSourceLocation *loc) { return clang_Location_isInSystemHeader(*loc); } - -void wrap_clang_getSpellingLocation(CXSourceLocation *loc, CXFile *file, unsigned *line, unsigned *column, - unsigned *offset) { - clang_getSpellingLocation(*loc, file, line, column, offset); -} - -void wrap_clang_getPresumedLocation(CXSourceLocation *loc, CXString *filename, unsigned *line, unsigned *column) { - clang_getPresumedLocation(*loc, filename, line, column); -} - -void wrap_clang_getRangeStart(CXSourceRange *range, CXSourceLocation *loc) { *loc = clang_getRangeStart(*range); } - -void wrap_clang_getRangeEnd(CXSourceRange *range, CXSourceLocation *loc) { *loc = clang_getRangeEnd(*range); } - -} // extern "C" diff --git a/c/clang/_wrap/llgo_check.cpp b/c/clang/_wrap/llgo_check.cpp deleted file mode 100644 index 0eecbb9f..00000000 --- a/c/clang/_wrap/llgo_check.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main() { - printf("sizeof(clang.Cursor) = %lu\n", sizeof(CXCursor)); - return 0; -} diff --git a/c/clang/_wrap/llgo_check.go b/c/clang/_wrap/llgo_check.go deleted file mode 100644 index 3a96ba2d..00000000 --- a/c/clang/_wrap/llgo_check.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/clang" -) - -const ( - LLGoCFlags = "-I$(llvm-config --includedir)" -) - -func main() { - c.Printf(c.Str("sizeof(clang.Cursor) = %lu\n"), unsafe.Sizeof(clang.Cursor{})) -} diff --git a/c/clang/basic.go b/c/clang/basic.go deleted file mode 100644 index 5130803c..00000000 --- a/c/clang/basic.go +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package clang - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -/** - * A character string. - * - * The \c CXString type is used to return strings from the interface when - * the ownership of that string might differ from one call to the next. - * Use \c clang_getCString() to retrieve the string data and, once finished - * with the string data, call \c clang_disposeString() to free the string. - */ -type String struct { - Data c.Pointer - PrivateFlags c.Uint -} - -/** - * Retrieve the character data associated with the given string. - */ -// llgo:link String.CStr C.clang_getCString -func (String) CStr() *c.Char { return nil } - -/** - * Free the given string. - */ -// llgo:link String.Dispose C.clang_disposeString -func (String) Dispose() {} - -type StringSet struct { - Strings *String - Count c.Uint -} - -/** - * Free the given string set. - */ -// llgo:link (*StringSet).Dispose C.clang_disposeStringSet -func (*StringSet) Dispose() {} - -func GoString(clangStr String) (str string) { - defer clangStr.Dispose() - cstr := clangStr.CStr() - if cstr != nil { - str = c.GoString(cstr) - } - return -} diff --git a/c/clang/clang.go b/c/clang/clang.go deleted file mode 100644 index dba77350..00000000 --- a/c/clang/clang.go +++ /dev/null @@ -1,2953 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package clang - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoFiles = "$(llvm-config --cflags): _wrap/cursor.cpp" - LLGoPackage = "link: -L$(llvm-config --libdir) -lclang; -lclang" -) - -const ( - /* Declarations */ - /** - * A declaration whose specific kind is not exposed via this - * interface. - * - * Unexposed declarations have the same operations as any other kind - * of declaration; one can extract their location information, - * spelling, find their definitions, etc. However, the specific kind - * of the declaration is not reported. - */ - CursorUnexposedDecl CursorKind = iota + 1 - - /** A C or C++ struct. */ - CursorStructDecl - - /** A C or C++ union. */ - CursorUnionDecl - - /** A C++ class. */ - CursorClassDecl - - /** An enumeration. */ - CursorEnumDecl - - /** - * A field (in C) or non-static data member (in C++) in a - * struct, union, or C++ class. - */ - CursorFieldDecl - - /** An enumerator constant. */ - CursorEnumConstantDecl - - /** A function. */ - CursorFunctionDecl - - /** A variable. */ - CursorVarDecl - - /** A function or method parameter. */ - CursorParmDecl - - /** An Objective-C \@interface. */ - CursorObjCInterfaceDecl - - /** An Objective-C \@interface for a category. */ - CursorObjCCategoryDecl - - /** An Objective-C \@protocol declaration. */ - CursorObjCProtocolDecl - - /** An Objective-C \@property declaration. */ - CursorObjCPropertyDecl - - /** An Objective-C instance variable. */ - CursorObjCIvarDecl - - /** An Objective-C instance method. */ - CursorObjCInstanceMethodDecl - - /** An Objective-C class method. */ - CursorObjCClassMethodDecl - - /** An Objective-C \@implementation. */ - CursorObjCImplementationDecl - - /** An Objective-C \@implementation for a category. */ - CursorObjCCategoryImplDecl - - /** A typedef. */ - CursorTypedefDecl - - /** A C++ class method. */ - CursorCXXMethod - - /** A C++ namespace. */ - CursorNamespace - - /** A linkage specification, e.g. 'extern "C"'. */ - CursorLinkageSpec - - /** A C++ constructor. */ - CursorConstructor - - /** A C++ destructor. */ - CursorDestructor - - /** A C++ conversion function. */ - CursorConversionFunction - - /** A C++ template type parameter. */ - CursorTemplateTypeParameter - - /** A C++ non-type template parameter. */ - CursorNonTypeTemplateParameter - - /** A C++ template template parameter. */ - CursorTemplateTemplateParameter - - /** A C++ function template. */ - CursorFunctionTemplate - - /** A C++ class template. */ - CursorClassTemplate - - /** A C++ class template partial specialization. */ - CursorClassTemplatePartialSpecialization - - /** A C++ namespace alias declaration. */ - CursorNamespaceAlias - - /** A C++ using directive. */ - CursorUsingDirective - - /** A C++ using declaration. */ - CursorUsingDeclaration - - /** A C++ alias declaration */ - CursorTypeAliasDecl - - /** An Objective-C \@synthesize definition. */ - CursorObjCSynthesizeDecl - - /** An Objective-C \@dynamic definition. */ - CursorObjCDynamicDecl - - /** An access specifier. */ - CursorCXXAccessSpecifier - - CursorFirstDecl = CursorUnexposedDecl - CursorLastDecl = CursorCXXAccessSpecifier - - /* References */ - CursorFirstRef = 40 - CursorObjCSuperClassRef = iota - 2 //40 - CursorObjCProtocolRef - CursorObjCClassRef - - /** - * A reference to a type declaration. - * - * A type reference occurs anywhere where a type is named but not - * declared. For example, given: - * - * \code - * typedef unsigned size_type; - * size_type size; - * \endcode - * - * The typedef is a declaration of size_type (CXCursor_TypedefDecl), - * while the type of the variable "size" is referenced. The cursor - * referenced by the type of size is the typedef for size_type. - */ - CursorTypeRef - - CursorCXXBaseSpecifier - - /** - * A reference to a class template, function template, template - * template parameter, or class template partial specialization. - */ - CursorTemplateRef - - /** - * A reference to a namespace or namespace alias. - */ - CursorNamespaceRef - - /** - * A reference to a member of a struct, union, or class that occurs in - * some non-expression context, e.g., a designated initializer. - */ - CursorMemberRef - - /** - * A reference to a labeled statement. - * - * This cursor kind is used to describe the jump to "start_over" in the - * goto statement in the following example: - * - * \code - * start_over: - * ++counter; - * - * goto start_over; - * \endcode - * - * A label reference cursor refers to a label statement. - */ - CursorLabelRef - - /** - * A reference to a set of overloaded functions or function templates - * that has not yet been resolved to a specific function or function template. - * - * An overloaded declaration reference cursor occurs in C++ templates where - * a dependent name refers to a function. For example: - * - * \code - * template void swap(T&, T&); - * - * struct X { ... }; - * void swap(X&, X&); - * - * template - * void reverse(T* first, T* last) { - * while (first < last - 1) { - * swap(*first, *--last); - * ++first; - * } - * } - * - * struct Y { }; - * void swap(Y&, Y&); - * \endcode - * - * Here, the identifier "swap" is associated with an overloaded declaration - * reference. In the template definition, "swap" refers to either of the two - * "swap" functions declared above, so both results will be available. At - * instantiation time, "swap" may also refer to other functions found via - * argument-dependent lookup (e.g., the "swap" function at the end of the - * example). - * - * The functions \c clang_getNumOverloadedDecls() and - * \c clang_getOverloadedDecl() can be used to retrieve the definitions - * referenced by this cursor. - */ - CursorOverloadedDeclRef - - /** - * A reference to a variable that occurs in some non-expression - * context, e.g., a C++ lambda capture list. - */ - CursorVariableRef - - CursorLastRef = CursorVariableRef - - /* Error conditions */ - CursorFirstInvalid = 70 - CursorInvalidFile = iota + 15 //70 - CursorNoDeclFound - CursorNotImplemented - CursorInvalidCode - CursorLastInvalid = CursorInvalidCode - - /* Expressions */ - CursorFirstExpr = 100 - - /** - * An expression whose specific kind is not exposed via this - * interface. - * - * Unexposed expressions have the same operations as any other kind - * of expression; one can extract their location information, - * spelling, children, etc. However, the specific kind of the - * expression is not reported. - */ - CursorUnexposedExpr = iota + 39 //100 - - /** - * An expression that refers to some value declaration, such - * as a function, variable, or enumerator. - */ - CursorDeclRefExpr - - /** - * An expression that refers to a member of a struct, union, - * class, Objective-C class, etc. - */ - CursorMemberRefExpr - - /** An expression that calls a function. */ - CursorCallExpr - - /** An expression that sends a message to an Objective-C - object or class. */ - CursorObjCMessageExpr - - /** An expression that represents a block literal. */ - CursorBlockExpr - - /** An integer literal. - */ - CursorIntegerLiteral - - /** A floating point number literal. - */ - CursorFloatingLiteral - - /** An imaginary number literal. - */ - CursorImaginaryLiteral - - /** A string literal. - */ - CursorStringLiteral - - /** A character literal. - */ - CursorCharacterLiteral - - /** A parenthesized expression, e.g. "(1)". - * - * This AST node is only formed if full location information is requested. - */ - CursorParenExpr - - /** This represents the unary-expression's (except sizeof and - * alignof). - */ - CursorUnaryOperator - - /** [C99 6.5.2.1] Array Subscripting. - */ - CursorArraySubscriptExpr - - /** A builtin binary operation expression such as "x + y" or - * "x <= y". - */ - CursorBinaryOperator - - /** Compound assignment such as "+=". - */ - CursorCompoundAssignOperator - - /** The ?: ternary operator. - */ - CursorConditionalOperator - - /** An explicit cast in C (C99 6.5.4) or a C-style cast in C++ - * (C++ [expr.cast]), which uses the syntax (Type)expr. - * - * For example: (int)f. - */ - CursorCStyleCastExpr - - /** [C99 6.5.2.5] - */ - CursorCompoundLiteralExpr - - /** Describes an C or C++ initializer list. - */ - CursorInitListExpr - - /** The GNU address of label extension, representing &&label. - */ - CursorAddrLabelExpr - - /** This is the GNU Statement Expression extension: ({int X=4; X;}) - */ - CursorStmtExpr - - /** Represents a C11 generic selection. - */ - CursorGenericSelectionExpr - - /** Implements the GNU __null extension, which is a name for a null - * pointer constant that has integral type (e.g., int or long) and is the same - * size and alignment as a pointer. - * - * The __null extension is typically only used by system headers, which define - * NULL as __null in C++ rather than using 0 (which is an integer that may not - * match the size of a pointer). - */ - CursorGNUNullExpr - - /** C++'s static_cast<> expression. - */ - CursorCXXStaticCastExpr - - /** C++'s dynamic_cast<> expression. - */ - CursorCXXDynamicCastExpr - - /** C++'s reinterpret_cast<> expression. - */ - CursorCXXReinterpretCastExpr - - /** C++'s const_cast<> expression. - */ - CursorCXXConstCastExpr - - /** Represents an explicit C++ type conversion that uses "functional" - * notion (C++ [expr.type.conv]). - * - * Example: - * \code - * x = int(0.5); - * \endcode - */ - CursorCXXFunctionalCastExpr - - /** A C++ typeid expression (C++ [expr.typeid]). - */ - CursorCXXTypeidExpr - - /** [C++ 2.13.5] C++ Boolean Literal. - */ - CursorCXXBoolLiteralExpr - - /** [C++0x 2.14.7] C++ Pointer Literal. - */ - CursorCXXNullPtrLiteralExpr - - /** Represents the "this" expression in C++ - */ - CursorCXXThisExpr - - /** [C++ 15] C++ Throw Expression. - * - * This handles 'throw' and 'throw' assignment-expression. When - * assignment-expression isn't present, Op will be null. - */ - CursorCXXThrowExpr - - /** A new expression for memory allocation and constructor calls, e.g: - * "new CXXNewExpr(foo)". - */ - CursorCXXNewExpr - - /** A delete expression for memory deallocation and destructor calls, - * e.g. "delete[] pArray". - */ - CursorCXXDeleteExpr - - /** A unary expression. (noexcept, sizeof, or other traits) - */ - CursorUnaryExpr - - /** An Objective-C string literal i.e. @"foo". - */ - CursorObjCStringLiteral - - /** An Objective-C \@encode expression. - */ - CursorObjCEncodeExpr - - /** An Objective-C \@selector expression. - */ - CursorObjCSelectorExpr - - /** An Objective-C \@protocol expression. - */ - CursorObjCProtocolExpr - - /** An Objective-C "bridged" cast expression, which casts between - * Objective-C pointers and C pointers, transferring ownership in the process. - * - * \code - * NSString *str = (__bridge_transfer NSString *)CFCreateString(); - * \endcode - */ - CursorObjCBridgedCastExpr - - /** Represents a C++0x pack expansion that produces a sequence of - * expressions. - * - * A pack expansion expression contains a pattern (which itself is an - * expression) followed by an ellipsis. For example: - * - * \code - * template - * void forward(F f, Types &&...args) { - * f(static_cast(args)...); - * } - * \endcode - */ - CursorPackExpansionExpr - - /** Represents an expression that computes the length of a parameter - * pack. - * - * \code - * template - * struct count { - * static const unsigned value = sizeof...(Types); - * }; - * \endcode - */ - CursorSizeOfPackExpr - /* Represents a C++ lambda expression that produces a local function - * object. - * - * \code - * void abssort(float *x, unsigned N) { - * std::sort(x, x + N, - * [](float a, float b) { - * return std::abs(a) < std::abs(b); - * }); - * } - * \endcode - */ - CursorLambdaExpr - - /** Objective-c Boolean Literal. - */ - CursorObjCBoolLiteralExpr - - /** Represents the "self" expression in an Objective-C method. - */ - CursorObjCSelfExpr - - /** OpenMP 5.0 [2.1.5, Array Section]. - */ - CursorOMPArraySectionExpr - - /** Represents an @available(...) check. - */ - CursorObjCAvailabilityCheckExpr - - /** - * Fixed point literal - */ - CursorFixedPointLiteral - - /** OpenMP 5.0 [2.1.4, Array Shaping]. - */ - CursorOMPArrayShapingExpr - - /** - * OpenMP 5.0 [2.1.6 Iterators] - */ - CursorOMPIteratorExpr - - /** OpenCL's addrspace_cast<> expression. - */ - CursorCXXAddrspaceCastExpr - - /** - * Expression that references a C++20 concept. - */ - CursorConceptSpecializationExpr - - /** - * Expression that references a C++20 concept. - */ - CursorRequiresExpr - - /** - * Expression that references a C++20 parenthesized list aggregate - * initializer. - */ - CursorCXXParenListInitExpr - - CursorLastExpr = CursorCXXParenListInitExpr - - /* Statements */ - CursorFirstStmt = 200 - /** - * A statement whose specific kind is not exposed via this - * interface. - * - * Unexposed statements have the same operations as any other kind of - * statement; one can extract their location information, spelling, - * children, etc. However, the specific kind of the statement is not - * reported. - */ - CursorUnexposedStmt = iota + 81 //200 - - /** A labelled statement in a function. - * - * This cursor kind is used to describe the "start_over:" label statement in - * the following example: - * - * \code - * start_over: - * ++counter; - * \endcode - * - */ - CursorLabelStmt - - /** A group of statements like { stmt stmt }. - * - * This cursor kind is used to describe compound statements, e.g. function - * bodies. - */ - CursorCompoundStmt - - /** A case statement. - */ - CursorCaseStmt - - /** A default statement. - */ - CursorDefaultStmt - - /** An if statement - */ - CursorIfStmt - - /** A switch statement. - */ - CursorSwitchStmt - - /** A while statement. - */ - CursorWhileStmt - - /** A do statement. - */ - CursorDoStmt - - /** A for statement. - */ - CursorForStmt - - /** A goto statement. - */ - CursorGotoStmt - - /** An indirect goto statement. - */ - CursorIndirectGotoStmt - - /** A continue statement. - */ - CursorContinueStmt - - /** A break statement. - */ - CursorBreakStmt - - /** A return statement. - */ - CursorReturnStmt - - /** A GCC inline assembly statement extension. - */ - CursorGCCAsmStmt - CursorAsmStmt = CursorGCCAsmStmt - - /** Objective-C's overall \@try-\@catch-\@finally statement. - */ - CursorObjCAtTryStmt = iota + 80 //216 - - /** Objective-C's \@catch statement. - */ - CursorObjCAtCatchStmt - - /** Objective-C's \@finally statement. - */ - CursorObjCAtFinallyStmt - - /** Objective-C's \@throw statement. - */ - CursorObjCAtThrowStmt - - /** Objective-C's \@synchronized statement. - */ - CursorObjCAtSynchronizedStmt - - /** Objective-C's autorelease pool statement. - */ - CursorObjCAutoreleasePoolStmt - - /** Objective-C's collection statement. - */ - CursorObjCForCollectionStmt - - /** C++'s catch statement. - */ - CursorCXXCatchStmt - - /** C++'s try statement. - */ - CursorCXXTryStmt - - /** C++'s for (* : *) statement. - */ - CursorCXXForRangeStmt - - /** Windows Structured Exception Handling's try statement. - */ - CursorSEHTryStmt - - /** Windows Structured Exception Handling's except statement. - */ - CursorSEHExceptStmt - - /** Windows Structured Exception Handling's finally statement. - */ - CursorSEHFinallyStmt - - /** A MS inline assembly statement extension. - */ - CursorMSAsmStmt - - /** The null statement ";": C99 6.8.3p3. - * - * This cursor kind is used to describe the null statement. - */ - CursorNullStmt - - /** Adaptor class for mixing declarations with statements and - * expressions. - */ - CursorDeclStmt - - /** OpenMP parallel directive. - */ - CursorOMPParallelDirective - - /** OpenMP SIMD directive. - */ - CursorOMPSimdDirective - - /** OpenMP for directive. - */ - CursorOMPForDirective - - /** OpenMP sections directive. - */ - CursorOMPSectionsDirective - - /** OpenMP section directive. - */ - CursorOMPSectionDirective - - /** OpenMP single directive. - */ - CursorOMPSingleDirective - - /** OpenMP parallel for directive. - */ - CursorOMPParallelForDirective - - /** OpenMP parallel sections directive. - */ - CursorOMPParallelSectionsDirective - - /** OpenMP task directive. - */ - CursorOMPTaskDirective - - /** OpenMP master directive. - */ - CursorOMPMasterDirective - - /** OpenMP critical directive. - */ - CursorOMPCriticalDirective - - /** OpenMP taskyield directive. - */ - CursorOMPTaskyieldDirective - - /** OpenMP barrier directive. - */ - CursorOMPBarrierDirective - - /** OpenMP taskwait directive. - */ - CursorOMPTaskwaitDirective - - /** OpenMP flush directive. - */ - CursorOMPFlushDirective - - /** Windows Structured Exception Handling's leave statement. - */ - CursorSEHLeaveStmt - - /** OpenMP ordered directive. - */ - CursorOMPOrderedDirective - - /** OpenMP atomic directive. - */ - CursorOMPAtomicDirective - - /** OpenMP for SIMD directive. - */ - CursorOMPForSimdDirective - - /** OpenMP parallel for SIMD directive. - */ - CursorOMPParallelForSimdDirective - - /** OpenMP target directive. - */ - CursorOMPTargetDirective - - /** OpenMP teams directive. - */ - CursorOMPTeamsDirective - - /** OpenMP taskgroup directive. - */ - CursorOMPTaskgroupDirective - - /** OpenMP cancellation point directive. - */ - CursorOMPCancellationPointDirective - - /** OpenMP cancel directive. - */ - CursorOMPCancelDirective - - /** OpenMP target data directive. - */ - CursorOMPTargetDataDirective - - /** OpenMP taskloop directive. - */ - CursorOMPTaskLoopDirective - - /** OpenMP taskloop simd directive. - */ - CursorOMPTaskLoopSimdDirective - - /** OpenMP distribute directive. - */ - CursorOMPDistributeDirective - - /** OpenMP target enter data directive. - */ - CursorOMPTargetEnterDataDirective - - /** OpenMP target exit data directive. - */ - CursorOMPTargetExitDataDirective - - /** OpenMP target parallel directive. - */ - CursorOMPTargetParallelDirective - - /** OpenMP target parallel for directive. - */ - CursorOMPTargetParallelForDirective - - /** OpenMP target update directive. - */ - CursorOMPTargetUpdateDirective - - /** OpenMP distribute parallel for directive. - */ - CursorOMPDistributeParallelForDirective - - /** OpenMP distribute parallel for simd directive. - */ - CursorOMPDistributeParallelForSimdDirective - - /** OpenMP distribute simd directive. - */ - CursorOMPDistributeSimdDirective - - /** OpenMP target parallel for simd directive. - */ - CursorOMPTargetParallelForSimdDirective - - /** OpenMP target simd directive. - */ - CursorOMPTargetSimdDirective - - /** OpenMP teams distribute directive. - */ - CursorOMPTeamsDistributeDirective - - /** OpenMP teams distribute simd directive. - */ - CursorOMPTeamsDistributeSimdDirective - - /** OpenMP teams distribute parallel for simd directive. - */ - CursorOMPTeamsDistributeParallelForSimdDirective - - /** OpenMP teams distribute parallel for directive. - */ - CursorOMPTeamsDistributeParallelForDirective - - /** OpenMP target teams directive. - */ - CursorOMPTargetTeamsDirective - - /** OpenMP target teams distribute directive. - */ - CursorOMPTargetTeamsDistributeDirective - - /** OpenMP target teams distribute parallel for directive. - */ - CursorOMPTargetTeamsDistributeParallelForDirective - - /** OpenMP target teams distribute parallel for simd directive. - */ - CursorOMPTargetTeamsDistributeParallelForSimdDirective - - /** OpenMP target teams distribute simd directive. - */ - CursorOMPTargetTeamsDistributeSimdDirective - - /** C++2a std::bit_cast expression. - */ - CursorBuiltinBitCastExpr - - /** OpenMP master taskloop directive. - */ - CursorOMPMasterTaskLoopDirective - - /** OpenMP parallel master taskloop directive. - */ - CursorOMPParallelMasterTaskLoopDirective - - /** OpenMP master taskloop simd directive. - */ - CursorOMPMasterTaskLoopSimdDirective - - /** OpenMP parallel master taskloop simd directive. - */ - CursorOMPParallelMasterTaskLoopSimdDirective - - /** OpenMP parallel master directive. - */ - CursorOMPParallelMasterDirective - - /** OpenMP depobj directive. - */ - CursorOMPDepobjDirective - - /** OpenMP scan directive. - */ - CursorOMPScanDirective - - /** OpenMP tile directive. - */ - CursorOMPTileDirective - - /** OpenMP canonical loop. - */ - CursorOMPCanonicalLoop - - /** OpenMP interop directive. - */ - CursorOMPInteropDirective - - /** OpenMP dispatch directive. - */ - CursorOMPDispatchDirective - - /** OpenMP masked directive. - */ - CursorOMPMaskedDirective - - /** OpenMP unroll directive. - */ - CursorOMPUnrollDirective - - /** OpenMP metadirective directive. - */ - CursorOMPMetaDirective - - /** OpenMP loop directive. - */ - CursorOMPGenericLoopDirective - - /** OpenMP teams loop directive. - */ - CursorOMPTeamsGenericLoopDirective - - /** OpenMP target teams loop directive. - */ - CursorOMPTargetTeamsGenericLoopDirective - - /** OpenMP parallel loop directive. - */ - CursorOMPParallelGenericLoopDirective - - /** OpenMP target parallel loop directive. - */ - CursorOMPTargetParallelGenericLoopDirective - - /** OpenMP parallel masked directive. - */ - CursorOMPParallelMaskedDirective - - /** OpenMP masked taskloop directive. - */ - CursorOMPMaskedTaskLoopDirective - - /** OpenMP masked taskloop simd directive. - */ - CursorOMPMaskedTaskLoopSimdDirective - - /** OpenMP parallel masked taskloop directive. - */ - CursorOMPParallelMaskedTaskLoopDirective - - /** OpenMP parallel masked taskloop simd directive. - */ - CursorOMPParallelMaskedTaskLoopSimdDirective - - /** OpenMP error directive. - */ - CursorOMPErrorDirective - - /** OpenMP scope directive. - */ - CursorOMPScopeDirective - - CursorLastStmt = CursorOMPScopeDirective - - /** - * Cursor that represents the translation unit itself. - * - * The translation unit cursor exists primarily to act as the root - * cursor for traversing the contents of a translation unit. - */ - CursorTranslationUnit = 350 - - /* Attributes */ - CursorFirstAttr = 400 - /** - * An attribute whose specific kind is not exposed via this - * interface. - */ - CursorUnexposedAttr = iota + 170 - - CursorIBActionAttr - CursorIBOutletAttr - CursorIBOutletCollectionAttr - CursorCXXFinalAttr - CursorCXXOverrideAttr - CursorAnnotateAttr - CursorAsmLabelAttr - CursorPackedAttr - CursorPureAttr - CursorConstAttr - CursorNoDuplicateAttr - CursorCUDAConstantAttr - CursorCUDADeviceAttr - CursorCUDAGlobalAttr - CursorCUDAHostAttr - CursorCUDASharedAttr - CursorVisibilityAttr - CursorDLLExport - CursorDLLImport - CursorNSReturnsRetained - CursorNSReturnsNotRetained - CursorNSReturnsAutoreleased - CursorNSConsumesSelf - CursorNSConsumed - CursorObjCException - CursorObjCNSObject - CursorObjCIndependentClass - CursorObjCPreciseLifetime - CursorObjCReturnsInnerPointer - CursorObjCRequiresSuper - CursorObjCRootClass - CursorObjCSubclassingRestricted - CursorObjCExplicitProtocolImpl - CursorObjCDesignatedInitializer - CursorObjCRuntimeVisible - CursorObjCBoxable - CursorFlagEnum - CursorConvergentAttr - CursorWarnUnusedAttr - CursorWarnUnusedResultAttr - CursorAlignedAttr - CursorLastAttr = CursorAlignedAttr - - /* Preprocessing */ - CursorPreprocessingDirective = iota + 227 //500 - CursorMacroDefinition - CursorMacroExpansion - CursorMacroInstantiation = CursorMacroExpansion - CursorInclusionDirective = 503 - CursorFirstPreprocessing = CursorPreprocessingDirective - CursorLastPreprocessing = CursorInclusionDirective - - /* Extra Declarations */ - /** - * A module import declaration. - */ - CursorModuleImportDecl = iota + 320 //600 - CursorTypeAliasTemplateDecl - /** - * A static_assert or _Static_assert node - */ - CursorStaticAssert - /** - * a friend declaration. - */ - CursorFriendDecl - /** - * a concept declaration. - */ - CursorConceptDecl - - CursorFirstExtraDecl = CursorModuleImportDecl - CursorLastExtraDecl = CursorConceptDecl - - /** - * A code completion overload candidate. - */ - CursorOverloadCandidate = 700 -) - -/** - * Opaque pointer representing client data that will be passed through - * to various callbacks and visitors. - */ -type ClientData = c.Pointer - -/** - * Provides the contents of a file that has not yet been saved to disk. - * - * Each CXUnsavedFile instance provides the name of a file on the - * system along with the current contents of that file that have not - * yet been saved to disk. - */ -type UnsavedFile struct { - /** - * The file whose contents have not yet been saved. - * - * This file must already exist in the file system. - */ - Filename *c.Char - - /** - * A buffer containing the unsaved contents of this file. - */ - Contents *c.Char - - /** - * The length of the unsaved contents of this buffer. - */ - Length c.Ulong -} - -/** - * Retrieves the source location associated with a given file/line/column - * in a particular translation unit. - */ -// llgo:link (*TranslationUnit).wrapGetLocation C.wrap_clang_getLocation -func (t *TranslationUnit) wrapGetLocation(file File, line, column c.Uint, loc *SourceLocation) {} - -func (t *TranslationUnit) GetLocation(file File, line, column c.Uint) (ret SourceLocation) { - t.wrapGetLocation(file, line, column, &ret) - return -} - -/** - * Retrieves the source location associated with a given character offset - * in a particular translation unit. - */ -// llgo:link (*TranslationUnit).wrapGetLocationForOffset C.wrap_clang_getLocationForOffset -func (t *TranslationUnit) wrapGetLocationForOffset(file File, offset c.Uint, loc *SourceLocation) {} - -func (t *TranslationUnit) GetLocationForOffset(file File, offset c.Uint) (ret SourceLocation) { - t.wrapGetLocationForOffset(file, offset, &ret) - return -} - -/** - * An "index" that consists of a set of translation units that would - * typically be linked together into an executable or library. - */ -type Index struct { - Unused [0]byte -} - -/** - * Provides a shared context for creating translation units. - * - * It provides two options: - * - * - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local" - * declarations (when loading any new translation units). A "local" declaration - * is one that belongs in the translation unit itself and not in a precompiled - * header that was used by the translation unit. If zero, all declarations - * will be enumerated. - * - * Here is an example: - * - * \code - * // excludeDeclsFromPCH = 1, displayDiagnostics=1 - * Idx = clang_createIndex(1, 1); - * - * // IndexTest.pch was produced with the following command: - * // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch" - * TU = clang_createTranslationUnit(Idx, "IndexTest.pch"); - * - * // This will load all the symbols from 'IndexTest.pch' - * clang_visitChildren(clang_getTranslationUnitCursor(TU), - * TranslationUnitVisitor, 0); - * clang_disposeTranslationUnit(TU); - * - * // This will load all the symbols from 'IndexTest.c', excluding symbols - * // from 'IndexTest.pch'. - * char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" }; - * TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args, - * 0, 0); - * clang_visitChildren(clang_getTranslationUnitCursor(TU), - * TranslationUnitVisitor, 0); - * clang_disposeTranslationUnit(TU); - * \endcode - * - * This process of creating the 'pch', loading it separately, and using it (via - * -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks - * (which gives the indexer the same performance benefit as the compiler). - */ -//go:linkname CreateIndex C.clang_createIndex -func CreateIndex(excludeDeclarationsFromPCH, displayDiagnostics c.Int) *Index - -/** - * Destroy the given index. - * - * The index must not be destroyed until all of the translation units created - * within that index have been destroyed. - */ -// llgo:link (*Index).Dispose C.clang_disposeIndex -func (*Index) Dispose() {} - -/** - * Flags that control the creation of translation units. - * - * The enumerators in this enumeration type are meant to be bitwise - * ORed together to specify which options should be used when - * constructing the translation unit. - */ -const ( - /** - * Used to indicate that no special translation-unit options are - * needed. - */ - TranslationUnit_None = 0x0 - /** - * Used to indicate that the parser should construct a "detailed" - * preprocessing record, including all macro definitions and instantiations. - * - * Constructing a detailed preprocessing record requires more memory - * and time to parse, since the information contained in the record - * is usually not retained. However, it can be useful for - * applications that require more detailed information about the - * behavior of the preprocessor. - */ - DetailedPreprocessingRecord = 0x01 -) - -/** - * Same as \c clang_parseTranslationUnit2, but returns - * the \c CXTranslationUnit instead of an error code. In case of an error this - * routine returns a \c NULL \c CXTranslationUnit, without further detailed - * error codes. - */ -// llgo:link (*Index).ParseTranslationUnit C.clang_parseTranslationUnit -func (*Index) ParseTranslationUnit( - sourceFilename *c.Char, commandLineArgs **c.Char, numCommandLineArgs c.Int, - unsavedFiles *UnsavedFile, numUnsavedFiles c.Uint, options c.Uint) *TranslationUnit { - return nil -} - -/** - * A single translation unit, which resides in an index. - */ -type TranslationUnit struct { - Unused [0]byte -} - -/** - * Destroy the specified CXTranslationUnit object. - */ -// llgo:link (*TranslationUnit).Dispose C.clang_disposeTranslationUnit -func (*TranslationUnit) Dispose() {} - -/** - * Retrieve the cursor that represents the given translation unit. - * - * The translation unit cursor can be used to start traversing the - * various declarations within the given translation unit. - */ - -//llgo:link (*TranslationUnit).wrapCursor C.wrap_clang_getTranslationUnitCursor -func (t *TranslationUnit) wrapCursor(cursor *Cursor) {} - -func (t *TranslationUnit) Cursor() (ret Cursor) { - t.wrapCursor(&ret) - return -} - -/** - * Describes the kind of entity that a cursor refers to. - */ -type CursorKind c.Int - -/* for debug/testing */ -// llgo:link CursorKind.String C.clang_getCursorKindSpelling -func (CursorKind) String() (ret String) { - return -} - -/** - * A cursor representing some element in the abstract syntax tree for - * a translation unit. - * - * The cursor abstraction unifies the different kinds of entities in a - * program--declaration, statements, expressions, references to declarations, - * etc.--under a single "cursor" abstraction with a common set of operations. - * Common operation for a cursor include: getting the physical location in - * a source file where the cursor points, getting the name associated with a - * cursor, and retrieving cursors for any child nodes of a particular cursor. - * - * Cursors can be produced in two specific ways. - * clang_getTranslationUnitCursor() produces a cursor for a translation unit, - * from which one can use clang_visitChildren() to explore the rest of the - * translation unit. clang_getCursor() maps from a physical source location - * to the entity that resides at that location, allowing one to map from the - * source code into the AST. - */ -type Cursor struct { - Kind CursorKind - xdata c.Int - data [3]c.Pointer -} - -type TypeKind c.Int - -/** - * Describes the kind of type - */ -const ( - /** - * Represents an invalid type (e.g., where no type is available). - */ - TypeInvalid TypeKind = iota - - /** - * A type whose specific kind is not exposed via this - * interface. - */ - TypeUnexposed - - /* Builtin types */ - TypeVoid - TypeBool - TypeCharU - TypeUChar - TypeChar16 - TypeChar32 - TypeUShort - TypeUInt - TypeULong - TypeULongLong - TypeUInt128 - TypeCharS - TypeSChar - TypeWChar - TypeShort - TypeInt - TypeLong - TypeLongLong - TypeInt128 - TypeFloat - TypeDouble - TypeLongDouble - TypeNullPtr - TypeOverload - TypeDependent - TypeObjCId - TypeObjCClass - TypeObjCSel - TypeFloat128 - TypeHalf - TypeFloat16 - TypeShortAccum - TypeAccum - TypeLongAccum - TypeUShortAccum - TypeUAccum - TypeULongAccum - TypeBFloat16 - TypeIbm128 - - TypeFirstBuiltin = TypeVoid - TypeLastBuiltin = TypeIbm128 - - TypeComplex TypeKind = iota + 57 // 100 - TypePointer - TypeBlockPointer - TypeLValueReference - TypeRValueReference - TypeRecord - TypeEnum - TypeTypedef - TypeObjCInterface - TypeObjCObjectPointer - TypeFunctionNoProto - TypeFunctionProto - TypeConstantArray - TypeVector - TypeIncompleteArray - TypeVariableArray - TypeDependentSizedArray - TypeMemberPointer - TypeAuto - - /** - * Represents a type that was referred to using an elaborated type keyword. - * - * E.g., struct S, or via a qualified name, e.g., N::M::type, or both. - */ - TypeElaborated - - /* OpenCL PipeType. */ - TypePipe - - /* OpenCL builtin types. */ - TypeOCLImage1dRO - TypeOCLImage1dArrayRO - TypeOCLImage1dBufferRO - TypeOCLImage2dRO - TypeOCLImage2dArrayRO - TypeOCLImage2dDepthRO - TypeOCLImage2dArrayDepthRO - TypeOCLImage2dMSAARO - TypeOCLImage2dArrayMSAARO - TypeOCLImage2dMSAADepthRO - TypeOCLImage2dArrayMSAADepthRO - TypeOCLImage3dRO - TypeOCLImage1dWO - TypeOCLImage1dArrayWO - TypeOCLImage1dBufferWO - TypeOCLImage2dWO - TypeOCLImage2dArrayWO - TypeOCLImage2dDepthWO - TypeOCLImage2dArrayDepthWO - TypeOCLImage2dMSAAWO - TypeOCLImage2dArrayMSAAWO - TypeOCLImage2dMSAADepthWO - TypeOCLImage2dArrayMSAADepthWO - TypeOCLImage3dWO - TypeOCLImage1dRW - TypeOCLImage1dArrayRW - TypeOCLImage1dBufferRW - TypeOCLImage2dRW - TypeOCLImage2dArrayRW - TypeOCLImage2dDepthRW - TypeOCLImage2dArrayDepthRW - TypeOCLImage2dMSAARW - TypeOCLImage2dArrayMSAARW - TypeOCLImage2dMSAADepthRW - TypeOCLImage2dArrayMSAADepthRW - TypeOCLImage3dRW - TypeOCLSampler - TypeOCLEvent - TypeOCLQueue - TypeOCLReserveID - - TypeObjCObject - TypeObjCTypeParam - TypeAttributed - - TypeOCLIntelSubgroupAVCMcePayload - TypeOCLIntelSubgroupAVCImePayload - TypeOCLIntelSubgroupAVCRefPayload - TypeOCLIntelSubgroupAVCSicPayload - TypeOCLIntelSubgroupAVCMceResult - TypeOCLIntelSubgroupAVCImeResult - TypeOCLIntelSubgroupAVCRefResult - TypeOCLIntelSubgroupAVCSicResult - TypeOCLIntelSubgroupAVCImeResultSingleReferenceStreamout - TypeOCLIntelSubgroupAVCImeResultDualReferenceStreamout - TypeOCLIntelSubgroupAVCImeSingleReferenceStreamin - TypeOCLIntelSubgroupAVCImeDualReferenceStreamin - - /* Old aliases for AVC OpenCL extension types. */ - TypeOCLIntelSubgroupAVCImeResultSingleRefStreamout = TypeOCLIntelSubgroupAVCImeResultSingleReferenceStreamout - TypeOCLIntelSubgroupAVCImeResultDualRefStreamout = TypeOCLIntelSubgroupAVCImeResultDualReferenceStreamout - TypeOCLIntelSubgroupAVCImeSingleRefStreamin = TypeOCLIntelSubgroupAVCImeSingleReferenceStreamin - TypeOCLIntelSubgroupAVCImeDualRefStreamin = TypeOCLIntelSubgroupAVCImeDualReferenceStreamin - - TypeExtVector = iota + 53 // 176 - TypeAtomic - TypeBTFTagAttributed -) - -/** - * The type of an element in the abstract syntax tree. - * - */ -type Type struct { - Kind TypeKind - data [2]c.Pointer -} - -/** - * A particular source file that is part of a translation unit. - */ -type File uintptr - -/** - * Identifies a specific source location within a translation - * unit. - * - * Use clang_getExpansionLocation() or clang_getSpellingLocation() - * to map a source location to a particular file, line, and column. - */ -type SourceLocation struct { - ptrData [2]c.Pointer - intData c.Uint -} - -/** - * Identifies a half-open character range in the source code. - * - * Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the - * starting and end locations from a source range, respectively. - */ -type SourceRange struct { - ptrData [2]c.Pointer - beginIntData c.Uint - endIntData c.Uint -} - -/** - * Describes a kind of token. - */ -type TokenKind c.Int - -const ( - /** - * A token that contains some kind of punctuation. - */ - Punctuation TokenKind = iota - /** - * A language keyword. - */ - Keyword - - /** - * An identifier (that is not a keyword). - */ - Identifier - /** - * A numeric, string, or character literal. - */ - Literal - /** - * A comment. - */ - Comment -) - -type Token struct { - intData [4]c.Uint - ptrData c.Pointer -} - -/** - * Determine whether two cursors are equivalent. - */ -// llgo:link (*Cursor).wrapEqual C.wrap_clang_equalCursors -func (*Cursor) wrapEqual(cursor *Cursor) c.Uint { return 0 } - -func (c Cursor) Equal(cursor Cursor) c.Uint { - return c.wrapEqual(&cursor) -} - -/** - * Returns non-zero if \p cursor is null. - */ -// llgo:link (*Cursor).wrapIsNull C.wrap_clang_Cursor_isNull -func (*Cursor) wrapIsNull() c.Int { return 0 } - -func (c Cursor) IsNull() c.Int { return c.wrapIsNull() } - -/** - * Determine the semantic parent of the given cursor. - * - * The semantic parent of a cursor is the cursor that semantically contains - * the given \p cursor. For many declarations, the lexical and semantic parents - * are equivalent (the lexical parent is returned by - * \c clang_getCursorLexicalParent()). They diverge when declarations or - * definitions are provided out-of-line. For example: - * - * \code - * class C { - * void f(); - * }; - * - * void C::f() { } - * \endcode - * - * In the out-of-line definition of \c C::f, the semantic parent is - * the class \c C, of which this function is a member. The lexical parent is - * the place where the declaration actually occurs in the source code; in this - * case, the definition occurs in the translation unit. In general, the - * lexical parent for a given entity can change without affecting the semantics - * of the program, and the lexical parent of different declarations of the - * same entity may be different. Changing the semantic parent of a declaration, - * on the other hand, can have a major impact on semantics, and redeclarations - * of a particular entity should all have the same semantic context. - * - * In the example above, both declarations of \c C::f have \c C as their - * semantic context, while the lexical context of the first \c C::f is \c C - * and the lexical context of the second \c C::f is the translation unit. - * - * For global declarations, the semantic parent is the translation unit. - */ -// llgo:link (*Cursor).wrapSemanticParent C.wrap_clang_getCursorSemanticParent -func (*Cursor) wrapSemanticParent(parent *Cursor) {} - -func (c Cursor) SemanticParent() (parent Cursor) { - c.wrapSemanticParent(&parent) - return -} - -// llgo:link (*Cursor).wrapDefinition C.wrap_clang_getCursorDefinition -func (*Cursor) wrapDefinition(def *Cursor) {} - -func (c Cursor) Definition() (def Cursor) { - c.wrapDefinition(&def) - return -} - -/** - * Determine the lexical parent of the given cursor. - * - * The lexical parent of a cursor is the cursor in which the given \p cursor - * was actually written. For many declarations, the lexical and semantic parents - * are equivalent (the semantic parent is returned by - * \c clang_getCursorSemanticParent()). They diverge when declarations or - * definitions are provided out-of-line. For example: - * - * \code - * class C { - * void f(); - * }; - * - * void C::f() { } - * \endcode - * - * In the out-of-line definition of \c C::f, the semantic parent is - * the class \c C, of which this function is a member. The lexical parent is - * the place where the declaration actually occurs in the source code; in this - * case, the definition occurs in the translation unit. In general, the - * lexical parent for a given entity can change without affecting the semantics - * of the program, and the lexical parent of different declarations of the - * same entity may be different. Changing the semantic parent of a declaration, - * on the other hand, can have a major impact on semantics, and redeclarations - * of a particular entity should all have the same semantic context. - * - * In the example above, both declarations of \c C::f have \c C as their - * semantic context, while the lexical context of the first \c C::f is \c C - * and the lexical context of the second \c C::f is the translation unit. - * - * For declarations written in the global scope, the lexical parent is - * the translation unit. - */ -// llgo:link (*Cursor).wrapLexicalParent C.wrap_clang_getCursorLexicalParent -func (*Cursor) wrapLexicalParent(parent *Cursor) {} - -func (c Cursor) LexicalParent() (parent Cursor) { - c.wrapLexicalParent(&parent) - return -} - -/** - * Determine the set of methods that are overridden by the given - * method. - * - * In both Objective-C and C++, a method (aka virtual member function, - * in C++) can override a virtual method in a base class. For - * Objective-C, a method is said to override any method in the class's - * base class, its protocols, or its categories' protocols, that has the same - * selector and is of the same kind (class or instance). - * If no such method exists, the search continues to the class's superclass, - * its protocols, and its categories, and so on. A method from an Objective-C - * implementation is considered to override the same methods as its - * corresponding method in the interface. - * - * For C++, a virtual member function overrides any virtual member - * function with the same signature that occurs in its base - * classes. With multiple inheritance, a virtual member function can - * override several virtual member functions coming from different - * base classes. - * - * In all cases, this function determines the immediate overridden - * method, rather than all of the overridden methods. For example, if - * a method is originally declared in a class A, then overridden in B - * (which in inherits from A) and also in C (which inherited from B), - * then the only overridden method returned from this function when - * invoked on C's method will be B's method. The client may then - * invoke this function again, given the previously-found overridden - * methods, to map out the complete method-override set. - * - * \param cursor A cursor representing an Objective-C or C++ - * method. This routine will compute the set of methods that this - * method overrides. - * - * \param overridden A pointer whose pointee will be replaced with a - * pointer to an array of cursors, representing the set of overridden - * methods. If there are no overridden methods, the pointee will be - * set to NULL. The pointee must be freed via a call to - * \c clang_disposeOverriddenCursors(). - * - * \param num_overridden A pointer to the number of overridden - * functions, will be set to the number of overridden functions in the - * array pointed to by \p overridden. - */ -// llgo:link (*Cursor).wrapOverriddenCursors C.wrap_clang_getOverriddenCursors -func (c *Cursor) wrapOverriddenCursors(overridden **Cursor, numOverridden *c.Uint) {} - -func (c Cursor) OverriddenCursors(overridden **Cursor, numOverridden *c.Uint) { - c.wrapOverriddenCursors(overridden, numOverridden) -} - -/** - * Free the set of overridden cursors returned by \c - * clang_getOverriddenCursors(). - */ -// llgo:link (*Cursor).DisposeOverriddenCursors C.clang_disposeOverriddenCursors -func (c *Cursor) DisposeOverriddenCursors() {} - -/** - * Retrieve the file that is included by the given inclusion directive - * cursor. - */ -// llgo:link (*Cursor).wrapIncludedFile C.wrap_clang_getIncludedFile -func (c *Cursor) wrapIncludedFile() File { - return 0 -} - -func (c Cursor) IncludedFile() (file File) { - return c.wrapIncludedFile() -} - -/** - * Map a source location to the cursor that describes the entity at that - * location in the source code. - * - * clang_getCursor() maps an arbitrary source location within a translation - * unit down to the most specific cursor that describes the entity at that - * location. For example, given an expression \c x + y, invoking - * clang_getCursor() with a source location pointing to "x" will return the - * cursor for "x"; similarly for "y". If the cursor points anywhere between - * "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor() - * will return a cursor referring to the "+" expression. - * - * \returns a cursor representing the entity at the given source location, or - * a NULL cursor if no such entity can be found. - */ - -// llgo:link (*TranslationUnit).wrapGetCursor C.wrap_clang_getCursor -func (l *TranslationUnit) wrapGetCursor(loc *SourceLocation, cur *Cursor) {} - -func (l *TranslationUnit) GetCursor(loc *SourceLocation) (cur Cursor) { - l.wrapGetCursor(loc, &cur) - return -} - -/** - * Retrieve the physical location of the source constructor referenced - * by the given cursor. - * - * The location of a declaration is typically the location of the name of that - * declaration, where the name of that declaration would occur if it is - * unnamed, or some keyword that introduces that particular declaration. - * The location of a reference is where that reference occurs within the - * source code. - */ -// llgo:link (*Cursor).wrapLocation C.wrap_clang_getCursorLocation -func (c *Cursor) wrapLocation(loc *SourceLocation) {} - -func (c Cursor) Location() (loc SourceLocation) { - c.wrapLocation(&loc) - return -} - -/** - * Retrieve the physical extent of the source construct referenced by - * the given cursor. - * - * The extent of a cursor starts with the file/line/column pointing at the - * first character within the source construct that the cursor refers to and - * ends with the last character within that source construct. For a - * declaration, the extent covers the declaration itself. For a reference, - * the extent covers the location of the reference (e.g., where the referenced - * entity was actually used). - */ -// llgo:link (*Cursor).wrapExtent C.wrap_clang_getCursorExtent -func (c *Cursor) wrapExtent(loc *SourceRange) {} - -func (c Cursor) Extent() (loc SourceRange) { - c.wrapExtent(&loc) - return -} - -/** - * Retrieve the type of a CXCursor (if any). - */ -// llgo:link (*Cursor).wrapType C.wrap_clang_getCursorType -func (c *Cursor) wrapType(ret *Type) {} - -func (c Cursor) Type() (ret Type) { - c.wrapType(&ret) - return -} - -/** - * Pretty-print the underlying type using the rules of the - * language of the translation unit from which it came. - * - * If the type is invalid, an empty string is returned. - */ -// llgo:link (*Type).wrapString C.wrap_clang_getTypeSpelling -func (t *Type) wrapString() (ret String) { - return -} - -func (t Type) String() (ret String) { - return t.wrapString() -} - -/** - * Retrieve the underlying type of a typedef declaration. - * - * If the cursor does not reference a typedef declaration, an invalid type is - * returned. - */ -// llgo:link (*Cursor).wrapTypedefDeclUnderlyingType C.wrap_clang_getTypedefDeclUnderlyingType -func (c *Cursor) wrapTypedefDeclUnderlyingType(ret *Type) { return } - -func (c Cursor) TypedefDeclUnderlyingType() (ret Type) { - c.wrapTypedefDeclUnderlyingType(&ret) - return -} - -/** - * Retrieve the integer value of an enum constant declaration as a signed - * long long. - * - * If the cursor does not reference an enum constant declaration, LLONG_MIN is - * returned. Since this is also potentially a valid constant value, the kind of - * the cursor must be verified before calling this function. - */ -// llgo:link (*Cursor).wrapEnumConstantDeclValue C.wrap_clang_getEnumConstantDeclValue -func (*Cursor) wrapEnumConstantDeclValue() (ret c.LongLong) { - return 0 -} -func (c Cursor) EnumConstantDeclValue() (ret c.LongLong) { - return c.wrapEnumConstantDeclValue() -} - -/** - * Retrieve the number of non-variadic arguments associated with a given - * cursor. - * - * The number of arguments can be determined for calls as well as for - * declarations of functions or methods. For other cursors -1 is returned. - */ -// llgo:link (*Cursor).wrapNumArguments C.wrap_clang_Cursor_getNumArguments -func (*Cursor) wrapNumArguments() (num c.Int) { - return 0 -} - -func (c Cursor) NumArguments() (num c.Int) { - return c.wrapNumArguments() -} - -/** - * Retrieve the argument cursor of a function or method. - * - * The argument cursor can be determined for calls as well as for declarations - * of functions or methods. For other cursors and for invalid indices, an - * invalid cursor is returned. - */ -// llgo:link (*Cursor).wrapArgument C.wrap_clang_Cursor_getArgument -func (*Cursor) wrapArgument(index c.Uint, arg *Cursor) {} - -func (c Cursor) Argument(index c.Uint) (arg Cursor) { - c.wrapArgument(index, &arg) - return -} - -/** - * Return the canonical type for a CXType. - * - * Clang's type system explicitly models typedefs and all the ways - * a specific type can be represented. The canonical type is the underlying - * type with all the "sugar" removed. For example, if 'T' is a typedef - * for 'int', the canonical type for 'T' would be 'int'. - */ -// llgo:link (*Type).wrapCanonicalType C.wrap_clang_getCanonicalType -func (t *Type) wrapCanonicalType(ret *Type) { return } - -func (t Type) CanonicalType() (ret Type) { - t.wrapCanonicalType(&ret) - return -} - -/** - * Determine whether a CXType has the "const" qualifier set, - * without looking through typedefs that may have added "const" at a - * different level. - */ -// llgo:link (*Type).wrapIsConstQualifiedType C.wrap_clang_isConstQualifiedType -func (t *Type) wrapIsConstQualifiedType() (ret c.Uint) { return 0 } - -func (t Type) IsConstQualifiedType() (ret c.Uint) { - return t.wrapIsConstQualifiedType() -} - -/** - * Determine whether a CXCursor that is a macro, is - * function like. - */ -// llgo:link (*Cursor).wrapIsMacroFunctionLike C.wrap_clang_Cursor_isMacroFunctionLike -func (c *Cursor) wrapIsMacroFunctionLike() (ret c.Uint) { return 0 } - -func (c Cursor) IsMacroFunctionLike() (ret c.Uint) { - return c.wrapIsMacroFunctionLike() -} - -/** - * Determine whether a CXCursor that is a macro, is a - * builtin one. - */ -// llgo:link (*Cursor).wrapIsMacroBuiltin C.wrap_clang_Cursor_isMacroBuiltin -func (c *Cursor) wrapIsMacroBuiltin() (ret c.Uint) { return 0 } - -func (c Cursor) IsMacroBuiltin() (ret c.Uint) { - return c.wrapIsMacroBuiltin() -} - -/** - * Determine whether a CXCursor that is a function declaration, is an - * inline declaration. - */ -// llgo:link (*Cursor).wrapIsFunctionInlined C.wrap_clang_Cursor_isFunctionInlined -func (c *Cursor) wrapIsFunctionInlined() (ret c.Uint) { return 0 } - -func (c Cursor) IsFunctionInlined() (ret c.Uint) { - return c.wrapIsFunctionInlined() -} - -/** - * Determine whether a CXType has the "volatile" qualifier set, - * without looking through typedefs that may have added "volatile" at - * a different level. - */ -// llgo:link (*Type).wrapIsVolatileQualifiedType C.wrap_clang_isVolatileQualifiedType -func (t *Type) wrapIsVolatileQualifiedType() (ret c.Uint) { return 0 } - -func (t Type) IsVolatileQualifiedType() (ret c.Uint) { - return t.wrapIsVolatileQualifiedType() -} - -/** - * Determine whether a CXType has the "restrict" qualifier set, - * without looking through typedefs that may have added "restrict" at a - * different level. - */ -// llgo:link (*Type).wrapIsRestrictQualifiedType C.wrap_clang_isRestrictQualifiedType -func (t *Type) wrapIsRestrictQualifiedType() (ret c.Uint) { return 0 } - -func (t Type) IsRestrictQualifiedType() (ret c.Uint) { - return t.wrapIsRestrictQualifiedType() -} - -/** - * For pointer types, returns the type of the pointee. - */ -// llgo:link (*Type).wrapPointeeType C.wrap_clang_getPointeeType -func (t *Type) wrapPointeeType(ret *Type) { return } - -func (t Type) PointeeType() (ret Type) { - t.wrapPointeeType(&ret) - return -} - -/** - * For reference types (e.g., "const int&"), returns the type that the - * reference refers to (e.g "const int"). - * - * Otherwise, returns the type itself. - * - * A type that has kind \c CXType_LValueReference or - * \c CXType_RValueReference is a reference type. - */ -// llgo:link (*Type).wrapNonReferenceType C.wrap_clang_getNonReferenceType -func (t *Type) wrapNonReferenceType(ret *Type) { return } - -func (t Type) NonReferenceType() (ret Type) { - t.wrapNonReferenceType(&ret) - return -} - -/** - * Return the cursor for the declaration of the given type. - */ -// llgo:link (*Type).wrapTypeDeclaration C.wrap_clang_getTypeDeclaration -func (t *Type) wrapTypeDeclaration(ret *Cursor) { return } - -func (t Type) TypeDeclaration() (ret Cursor) { - t.wrapTypeDeclaration(&ret) - return -} - -/** - * Retrieve the spelling of a given CXTypeKind. - */ -// llgo:link TypeKind.String C.clang_getTypeKindSpelling -func (TypeKind) String() (ret String) { - return -} - -/** - * Retrieve the return type associated with a function type. - * - * If a non-function type is passed in, an invalid type is returned. - */ -// llgo:link (*Type).wrapResultType C.wrap_clang_getResultType -func (t *Type) wrapResultType(ret *Type) { return } - -func (t Type) ResultType() (ret Type) { - t.wrapResultType(&ret) - return -} - -/** - * Retrieve the number of non-variadic parameters associated with a - * function type. - * - * If a non-function type is passed in, -1 is returned. - */ -// llgo:link (*Type).wrapNumArgTypes C.wrap_clang_getNumArgTypes -func (t *Type) wrapNumArgTypes() (num c.Int) { return 0 } - -func (t Type) NumArgTypes() (num c.Int) { - return t.wrapNumArgTypes() -} - -/** - * Retrieve the type of a parameter of a function type. - * - * If a non-function type is passed in or the function does not have enough - * parameters, an invalid type is returned. - */ -// llgo:link (*Type).wrapArgType C.wrap_clang_getArgType -func (t *Type) wrapArgType(index c.Uint, argTyp *Type) { return } - -func (t Type) ArgType(index c.Uint) (ret Type) { - t.wrapArgType(index, &ret) - return -} - -/** - * Return 1 if the CXType is a variadic function type, and 0 otherwise. - */ -// llgo:link (*Type).wrapIsFunctionTypeVariadic C.wrap_clang_isFunctionTypeVariadic -func (t *Type) wrapIsFunctionTypeVariadic() (ret c.Uint) { return 0 } - -func (t Type) IsFunctionTypeVariadic() (ret c.Uint) { return t.wrapIsFunctionTypeVariadic() } - -/** - * Retrieve the return type associated with a given cursor. - * - * This only returns a valid type if the cursor refers to a function or method. - */ -// llgo:link (*Cursor).wrapResultType C.wrap_clang_getCursorResultType -func (c *Cursor) wrapResultType(ret *Type) {} - -func (c Cursor) ResultType() (ret Type) { - c.wrapResultType(&ret) - return -} - -/** - * Return the element type of an array, complex, or vector type. - * - * If a type is passed in that is not an array, complex, or vector type, - * an invalid type is returned. - */ -// llgo:link (*Type).wrapElementType C.wrap_clang_getElementType -func (t *Type) wrapElementType(ret *Type) { return } - -func (t Type) ElementType() (ret Type) { - t.wrapElementType(&ret) - return -} - -/** - * Return the element type of an array type. - * - * If a non-array type is passed in, an invalid type is returned. - */ -// llgo:link (*Type).wrapArrayElementType C.wrap_clang_getArrayElementType -func (t *Type) wrapArrayElementType(ret *Type) { return } - -func (t Type) ArrayElementType() (ret Type) { - t.wrapArrayElementType(&ret) - return -} - -/** - * Return the array size of a constant array. - * - * If a non-array type is passed in, -1 is returned. - */ -// llgo:link (*Type).wrapArraySize C.wrap_clang_getArraySize -func (t *Type) wrapArraySize() (ret c.LongLong) { return 0 } - -func (t Type) ArraySize() (ret c.LongLong) { - return t.wrapArraySize() -} - -/** - * Retrieve the type named by the qualified-id. - * - * If a non-elaborated type is passed in, an invalid type is returned. - */ -// llgo:link (*Type).wrapNamedType C.wrap_clang_Type_getNamedType -func (t *Type) wrapNamedType(ret *Type) { return } - -func (t Type) NamedType() (ret Type) { - t.wrapNamedType(&ret) - return -} - -/** - * List the possible error codes for \c clang_Type_getSizeOf, - * \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and - * \c clang_Cursor_getOffsetOf. - * - * A value of this enumeration type can be returned if the target type is not - * a valid argument to sizeof, alignof or offsetof. - */ -type LayoutError c.Int - -const ( - /** - * Type is of kind CXType_Invalid. - */ - LayoutErrorInvalid LayoutError = -1 - /** - * The type is an incomplete Type. - */ - LayoutErrorIncomplete LayoutError = -2 - /** - * The type is a dependent Type. - */ - LayoutErrorDependent LayoutError = -3 - /** - * The type is not a constant size type. - */ - LayoutErrorNotConstantSize LayoutError = -4 - /** - * The Field name is not valid for this record. - */ - LayoutErrorInvalidFieldName LayoutError = -5 - /** - * The type is undeduced. - */ - LayoutErrorUndeduced LayoutError = -6 -) - -/** - * Return the size of a type in bytes as per C++[expr.sizeof] standard. - * - * If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. - * If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete - * is returned. - * If the type declaration is a dependent type, CXTypeLayoutError_Dependent is - * returned. - */ -// llgo:link (*Type).wrapSizeOf C.wrap_clang_Type_getSizeOf -func (t *Type) wrapSizeOf() (ret c.LongLong) { - return 0 -} - -func (t Type) SizeOf() (ret c.LongLong) { - return t.wrapSizeOf() -} - -/** - * Determine whether the given cursor represents an anonymous - * tag or namespace - */ -// llgo:link (*Cursor).wrapIsAnonymous C.wrap_clang_Cursor_isAnonymous -func (c *Cursor) wrapIsAnonymous() (ret c.Uint) { - return 0 -} - -func (c Cursor) IsAnonymous() (ret c.Uint) { - return c.wrapIsAnonymous() -} - -/** - * Determine whether the given cursor represents an anonymous record - * declaration. - */ -// llgo:link (*Cursor).wrapIsAnonymousRecordDecl C.wrap_clang_Cursor_isAnonymousRecordDecl -func (c *Cursor) wrapIsAnonymousRecordDecl() (ret c.Uint) { - return 0 -} - -func (c Cursor) IsAnonymousRecordDecl() (ret c.Uint) { - return c.wrapIsAnonymousRecordDecl() -} - -/** - * Represents the C++ access control level to a base class for a - * cursor with kind CX_CXXBaseSpecifier. - */ -type CXXAccessSpecifier c.Int - -const ( - CXXInvalidAccessSpecifier CXXAccessSpecifier = iota - CXXPublic - CXXProtected - CXXPrivate -) - -/** - * Returns the access control level for the referenced object. - * - * If the cursor refers to a C++ declaration, its access control level within - * its parent scope is returned. Otherwise, if the cursor refers to a base - * specifier or access specifier, the specifier itself is returned. - */ -// llgo:link (*Cursor).wrapCXXAccessSpecifier C.wrap_clang_getCXXAccessSpecifier -func (*Cursor) wrapCXXAccessSpecifier() (spec CXXAccessSpecifier) { - return 0 -} - -func (c Cursor) CXXAccessSpecifier() CXXAccessSpecifier { - return c.wrapCXXAccessSpecifier() -} - -type StorageClass c.Int - -/** - * Represents the storage classes as declared in the source. CX_SC_Invalid - * was added for the case that the passed cursor in not a declaration. - */ -const ( - SCInvalid StorageClass = iota - SCNone - SCExtern - SCStatic - SCPrivateExtern - SCOpenCLWorkGroupLocal - SCAuto - SCRegister -) - -/** - * Returns the storage class for a function or variable declaration. - * - * If the passed in Cursor is not a function or variable declaration, - * CX_SC_Invalid is returned else the storage class. - */ -// llgo:link (*Cursor).wrapStorageClass C.wrap_clang_Cursor_getStorageClass -func (*Cursor) wrapStorageClass() (ret StorageClass) { - return 0 -} - -func (c Cursor) StorageClass() (ret StorageClass) { - return c.wrapStorageClass() -} - -/** - * Retrieve a Unified Symbol Resolution (USR) for the entity referenced - * by the given cursor. - * - * A Unified Symbol Resolution (USR) is a string that identifies a particular - * entity (function, class, variable, etc.) within a program. USRs can be - * compared across translation units to determine, e.g., when references in - * one translation refer to an entity defined in another translation unit. - */ -// llgo:link (*Cursor).wrapUSR C.wrap_clang_getCursorUSR -func (*Cursor) wrapUSR() (ret String) { - return -} - -func (c Cursor) USR() (ret String) { - return c.wrapUSR() -} - -/** - * Retrieve a name for the entity referenced by this cursor. - */ -// llgo:link (*Cursor).wrapString C.wrap_clang_getCursorSpelling -func (*Cursor) wrapString() (ret String) { - return -} - -func (c Cursor) String() (ret String) { - return c.wrapString() -} - -/** - * Retrieve the display name for the entity referenced by this cursor. - * - * The display name contains extra information that helps identify the cursor, - * such as the parameters of a function or template or the arguments of a - * class template specialization. - */ -// llgo:link (*Cursor).wrapDisplayName C.wrap_clang_getCursorDisplayName -func (*Cursor) wrapDisplayName() (ret String) { - return -} -func (c Cursor) DisplayName() (ret String) { - return c.wrapDisplayName() -} - -/** For a cursor that is a reference, retrieve a cursor representing the - * entity that it references. - * - * Reference cursors refer to other entities in the AST. For example, an - * Objective-C superclass reference cursor refers to an Objective-C class. - * This function produces the cursor for the Objective-C class from the - * cursor for the superclass reference. If the input cursor is a declaration or - * definition, it returns that declaration or definition unchanged. - * Otherwise, returns the NULL cursor. - */ -// llgo:link (*Cursor).wrapReferenced C.wrap_clang_getCursorReferenced -func (*Cursor) wrapReferenced(referenced *Cursor) {} - -func (c Cursor) Referenced() (referenced Cursor) { - c.wrapReferenced(&referenced) - return -} - -/** - * Returns non-zero if the given cursor is a variadic function or method. - */ -// llgo:link (*Cursor).wrapIsVariadic C.wrap_clang_Cursor_isVariadic -func (*Cursor) wrapIsVariadic() (ret c.Uint) { return 0 } - -func (c Cursor) IsVariadic() (ret c.Uint) { return c.wrapIsVariadic() } - -/** - * Given a cursor that represents a declaration, return the associated - * comment's source range. The range may include multiple consecutive comments - * with whitespace in between. - */ -// llgo:link (*Cursor).wrapCommentRange C.wrap_clang_Cursor_getCommentRange -func (c *Cursor) wrapCommentRange(ret *SourceRange) {} - -func (c Cursor) CommentRange() (loc SourceRange) { - c.wrapCommentRange(&loc) - return -} - -/** - * Given a cursor that represents a declaration, return the associated - * comment text, including comment markers. - */ -// llgo:link (*Cursor).wrapRawCommentText C.wrap_clang_Cursor_getRawCommentText -func (c *Cursor) wrapRawCommentText() (ret String) { - return -} - -func (c Cursor) RawCommentText() (ret String) { - return c.wrapRawCommentText() -} - -/** - * Retrieve a name for the entity referenced by this cursor. - */ -// llgo:link (*Cursor).wrapMangling C.wrap_clang_Cursor_getMangling -func (*Cursor) wrapMangling() (ret String) { - return -} - -func (c Cursor) Mangling() (ret String) { - return c.wrapMangling() -} - -/** - * Determine if a C++ constructor is a converting constructor. - */ -// llgo:link (*Cursor).wrapIsConvertingConstructor C.wrap_clang_CXXConstructor_isConvertingConstructor -func (c *Cursor) wrapIsConvertingConstructor() (ret c.Uint) { - return 0 -} - -func (c Cursor) IsConvertingConstructor() (ret c.Uint) { - return c.wrapIsConvertingConstructor() -} - -/** - * Determine if a C++ constructor is a copy constructor. - */ -// llgo:link (*Cursor).wrapIsCopyConstructor C.wrap_clang_CXXConstructor_isCopyConstructor -func (c *Cursor) wrapIsCopyConstructor() (ret c.Uint) { - return 0 -} -func (c Cursor) IsCopyConstructor() (ret c.Uint) { - return c.wrapIsCopyConstructor() -} - -/** - * Determine if a C++ constructor is the default constructor. - */ -// llgo:link (*Cursor).wrapIsDefaultConstructor C.wrap_clang_CXXConstructor_isDefaultConstructor -func (c *Cursor) wrapIsDefaultConstructor() (ret c.Uint) { - return 0 -} -func (c Cursor) IsDefaultConstructor() (ret c.Uint) { - return c.wrapIsDefaultConstructor() -} - -/** - * Determine if a C++ constructor is a move constructor. - */ -// llgo:link (*Cursor).wrapIsMoveConstructor C.wrap_clang_CXXConstructor_isMoveConstructor -func (c *Cursor) wrapIsMoveConstructor() (ret c.Uint) { - return 0 -} -func (c Cursor) IsMoveConstructor() (ret c.Uint) { - return c.wrapIsMoveConstructor() -} - -/** - * Determine if a C++ field is declared 'mutable'. - */ -// llgo:link (*Cursor).wrapIsMutable C.wrap_clang_CXXField_isMutable -func (c *Cursor) wrapIsMutable() (ret c.Uint) { - return 0 -} -func (c Cursor) IsMutable() (ret c.Uint) { - return c.wrapIsMutable() -} - -/** - * Determine if a C++ method is declared '= default'. - */ -// llgo:link (*Cursor).wrapIsDefaulted C.wrap_clang_CXXMethod_isDefaulted -func (c *Cursor) wrapIsDefaulted() (ret c.Uint) { - return 0 -} -func (c Cursor) IsDefaulted() (ret c.Uint) { - return c.wrapIsDefaulted() -} - -/** - * Determine if a C++ method is declared '= delete'. - */ -// llgo:link (*Cursor).wrapIsDeleted C.wrap_clang_CXXMethod_isDeleted -func (c *Cursor) wrapIsDeleted() (ret c.Uint) { - return 0 -} -func (c Cursor) IsDeleted() (ret c.Uint) { - return c.wrapIsDeleted() -} - -/** - * Determine if a C++ member function or member function template is - * pure virtual. - */ -// llgo:link (*Cursor).wrapIsPureVirtual C.wrap_clang_CXXMethod_isPureVirtual -func (c *Cursor) wrapIsPureVirtual() (ret c.Uint) { - return 0 -} -func (c Cursor) IsPureVirtual() (ret c.Uint) { - return c.wrapIsPureVirtual() -} - -/** - * Determine if a C++ member function or member function template is - * declared 'static'. - */ -// llgo:link (*Cursor).wrapIsStatic C.wrap_clang_CXXMethod_isStatic -func (c *Cursor) wrapIsStatic() (ret c.Uint) { - return 0 -} -func (c Cursor) IsStatic() (ret c.Uint) { - return c.wrapIsStatic() -} - -/** - * Determine if a C++ member function or member function template is - * explicitly declared 'virtual' or if it overrides a virtual method from - * one of the base classes. - */ -// llgo:link (*Cursor).wrapIsVirtual C.wrap_clang_CXXMethod_isVirtual -func (c *Cursor) wrapIsVirtual() (ret c.Uint) { - return 0 -} -func (c Cursor) IsVirtual() (ret c.Uint) { - return c.wrapIsVirtual() -} - -/** - * Determine if a C++ member function is a copy-assignment operator, - * returning 1 if such is the case and 0 otherwise. - * - * > A copy-assignment operator `X::operator=` is a non-static, - * > non-template member function of _class_ `X` with exactly one - * > parameter of type `X`, `X&`, `const X&`, `volatile X&` or `const - * > volatile X&`. - * - * That is, for example, the `operator=` in: - * - * class Foo { - * bool operator=(const volatile Foo&); - * }; - * - * Is a copy-assignment operator, while the `operator=` in: - * - * class Bar { - * bool operator=(const int&); - * }; - * - * Is not. - */ -// llgo:link (*Cursor).wrapIsCopyAssignmentOperator C.wrap_clang_CXXMethod_isCopyAssignmentOperator -func (c *Cursor) wrapIsCopyAssignmentOperator() (ret c.Uint) { - return 0 -} -func (c Cursor) IsCopyAssignmentOperator() (ret c.Uint) { - return c.wrapIsCopyAssignmentOperator() -} - -/** - * Determine if a C++ member function is a move-assignment operator, - * returning 1 if such is the case and 0 otherwise. - * - * > A move-assignment operator `X::operator=` is a non-static, - * > non-template member function of _class_ `X` with exactly one - * > parameter of type `X&&`, `const X&&`, `volatile X&&` or `const - * > volatile X&&`. - * - * That is, for example, the `operator=` in: - * - * class Foo { - * bool operator=(const volatile Foo&&); - * }; - * - * Is a move-assignment operator, while the `operator=` in: - * - * class Bar { - * bool operator=(const int&&); - * }; - * - * Is not. - */ -// llgo:link (*Cursor).wrapIsMoveAssignmentOperator C.wrap_clang_CXXMethod_isMoveAssignmentOperator -func (c *Cursor) wrapIsMoveAssignmentOperator() (ret c.Uint) { - return 0 -} -func (c Cursor) IsMoveAssignmentOperator() (ret c.Uint) { - return c.wrapIsMoveAssignmentOperator() -} - -/** - * Determines if a C++ constructor or conversion function was declared - * explicit, returning 1 if such is the case and 0 otherwise. - * - * Constructors or conversion functions are declared explicit through - * the use of the explicit specifier. - * - * For example, the following constructor and conversion function are - * not explicit as they lack the explicit specifier: - * - * class Foo { - * Foo(); - * operator int(); - * }; - * - * While the following constructor and conversion function are - * explicit as they are declared with the explicit specifier. - * - * class Foo { - * explicit Foo(); - * explicit operator int(); - * }; - * - * This function will return 0 when given a cursor pointing to one of - * the former declarations and it will return 1 for a cursor pointing - * to the latter declarations. - * - * The explicit specifier allows the user to specify a - * conditional compile-time expression whose value decides - * whether the marked element is explicit or not. - * - * For example: - * - * constexpr bool foo(int i) { return i % 2 == 0; } - * - * class Foo { - * explicit(foo(1)) Foo(); - * explicit(foo(2)) operator int(); - * } - * - * This function will return 0 for the constructor and 1 for - * the conversion function. - */ -// llgo:link (*Cursor).wrapIsExplicit C.wrap_clang_CXXMethod_isExplicit -func (c *Cursor) wrapIsExplicit() (ret c.Uint) { - return 0 -} -func (c Cursor) IsExplicit() (ret c.Uint) { - return c.wrapIsExplicit() -} - -/** - * Determine if a C++ record is abstract, i.e. whether a class or struct - * has a pure virtual member function. - */ -// llgo:link (*Cursor).wrapIsAbstract C.wrap_clang_CXXRecord_isAbstract -func (c *Cursor) wrapIsAbstract() (ret c.Uint) { - return 0 -} -func (c Cursor) IsAbstract() (ret c.Uint) { - return c.wrapIsAbstract() -} - -/** - * Determine if an enum declaration refers to a scoped enum. - */ -// llgo:link (*Cursor).wrapIsScoped C.wrap_clang_EnumDecl_isScoped -func (c *Cursor) wrapIsScoped() (ret c.Uint) { - return 0 -} -func (c Cursor) IsScoped() (ret c.Uint) { - return c.wrapIsScoped() -} - -/** - * Determine if a C++ member function or member function template is - * declared 'const'. - */ -// llgo:link (*Cursor).wrapIsConst C.wrap_clang_CXXMethod_isConst -func (c *Cursor) wrapIsConst() (ret c.Uint) { - return 0 -} -func (c Cursor) IsConst() (ret c.Uint) { - return c.wrapIsConst() -} - -/** - * Determine the kind of the given token. - */ -// llgo:link (*Token).wrapKind C.wrap_clang_getTokenKind -func (c *Token) wrapKind() (ret TokenKind) { - return -} - -func (c Token) Kind() (ret TokenKind) { - return c.wrapKind() -} - -/** - * Determine the spelling of the given token. - * - * The spelling of a token is the textual representation of that token, e.g., - * the text of an identifier or keyword. - */ -// llgo:link (*TranslationUnit).wrapToken C.wrap_clang_getTokenSpelling -func (*TranslationUnit) wrapToken(token *Token) (ret String) { - return -} - -func (c *TranslationUnit) Token(token Token) (ret String) { - return c.wrapToken(&token) -} - -/** - * Describes how the traversal of the children of a particular - * cursor should proceed after visiting a particular child cursor. - * - * A value of this enumeration type should be returned by each - * \c CXCursorVisitor to indicate how clang_visitChildren() proceed. - */ -type ChildVisitResult c.Int - -const ( - /** - * Terminates the cursor traversal. - */ - ChildVisit_Break ChildVisitResult = iota - /** - * Continues the cursor traversal with the next sibling of - * the cursor just visited, without visiting its children. - */ - ChildVisit_Continue - /** - * Recursively traverse the children of this cursor, using - * the same visitor and client data. - */ - ChildVisit_Recurse -) - -/** - * Visit the children of a particular cursor. - * - * This function visits all the direct children of the given cursor, - * invoking the given \p visitor function with the cursors of each - * visited child. The traversal may be recursive, if the visitor returns - * \c CXChildVisit_Recurse. The traversal may also be ended prematurely, if - * the visitor returns \c CXChildVisit_Break. - * - * \param parent the cursor whose child may be visited. All kinds of - * cursors can be visited, including invalid cursors (which, by - * definition, have no children). - * - * \param visitor the visitor function that will be invoked for each - * child of \p parent. - * - * \param client_data pointer data supplied by the client, which will - * be passed to the visitor each time it is invoked. - * - * \returns a non-zero value if the traversal was terminated - * prematurely by the visitor returning \c CXChildVisit_Break. - */ -//go:linkname wrapVisitChildren C.wrap_clang_visitChildren -func wrapVisitChildren( - cusor *Cursor, - fn wrapVisitor, - clientData ClientData) c.Uint { - return 0 -} - -//llgo:type C -type wrapVisitor func(cursor, parent *Cursor, clientData ClientData) ChildVisitResult - -type wrapData struct { - data ClientData - fn Visitor -} - -func VisitChildren( - root Cursor, - fn Visitor, - clientData ClientData) c.Uint { - return wrapVisitChildren(&root, func(cursor, parent *Cursor, data ClientData) ChildVisitResult { - p := (*wrapData)(data) - return p.fn(*cursor, *parent, p.data) - }, unsafe.Pointer(&wrapData{clientData, fn})) -} - -//llgo:type C -type Visitor func(cursor, parent Cursor, clientData ClientData) ChildVisitResult - -/** - * Visitor invoked for each file in a translation unit - * (used with clang_getInclusions()). - * - * This visitor function will be invoked by clang_getInclusions() for each - * file included (either at the top-level or by \#include directives) within - * a translation unit. The first argument is the file being included, and - * the second and third arguments provide the inclusion stack. The - * array is sorted in order of immediate inclusion. For example, - * the first element refers to the location that included 'included_file'. - */ -//llgo:type C -type InclusionVisitor func(included_file File, inclusion_stack *SourceLocation, include_len c.Uint, client_data ClientData) - -/** - * Visit the set of preprocessor inclusions in a translation unit. - * The visitor function is called with the provided data for every included - * file. This does not include headers included by the PCH file (unless one - * is inspecting the inclusions in the PCH file itself). - */ -//go:linkname GetInclusions C.clang_getInclusions -func GetInclusions(tu *TranslationUnit, visitor InclusionVisitor, client_data ClientData) - -/** - * Tokenize the source code described by the given range into raw - * lexical tokens. - * - * \param TU the translation unit whose text is being tokenized. - * - * \param Range the source range in which text should be tokenized. All of the - * tokens produced by tokenization will fall within this source range, - * - * \param Tokens this pointer will be set to point to the array of tokens - * that occur within the given source range. The returned pointer must be - * freed with clang_disposeTokens() before the translation unit is destroyed. - * - * \param NumTokens will be set to the number of tokens in the \c *Tokens - * array. - * - */ -// llgo:link (*TranslationUnit).wrapTokenize C.wrap_clang_tokenize -func (t *TranslationUnit) wrapTokenize(ran *SourceRange, tokens **Token, numTokens *c.Uint) {} - -func (t *TranslationUnit) Tokenize(ran SourceRange, tokens **Token, numTokens *c.Uint) { - t.wrapTokenize(&ran, tokens, numTokens) -} - -/** - * Free the given set of tokens. - */ -// llgo:link (*TranslationUnit).DisposeTokens C.clang_disposeTokens -func (t *TranslationUnit) DisposeTokens(tokens *Token, numTokens c.Uint) {} - -/** - * Returns non-zero if the given source location is in a system header. - */ -// llgo:link (*SourceLocation).wrapIsInSystemHeader C.wrap_clang_Location_isInSystemHeader -func (l *SourceLocation) wrapIsInSystemHeader() (ret c.Uint) { return 0 } - -func (l SourceLocation) IsInSystemHeader() (ret c.Uint) { - return l.wrapIsInSystemHeader() -} - -/** - * Retrieve the file, line, column, and offset represented by - * the given source location. - * - * If the location refers into a macro instantiation, return where the - * location was originally spelled in the source file. - * - * \param location the location within a source file that will be decomposed - * into its parts. - * - * \param file [out] if non-NULL, will be set to the file to which the given - * source location points. - * - * \param line [out] if non-NULL, will be set to the line to which the given - * source location points. - * - * \param column [out] if non-NULL, will be set to the column to which the given - * source location points. - * - * \param offset [out] if non-NULL, will be set to the offset into the - * buffer to which the given source location points. - */ -// llgo:link (*SourceLocation).wrapSpellingLocation C.wrap_clang_getSpellingLocation -func (l *SourceLocation) wrapSpellingLocation(file *File, line, column, offset *c.Uint) {} - -func (l SourceLocation) SpellingLocation(file *File, line, column, offset *c.Uint) { - l.wrapSpellingLocation(file, line, column, offset) -} - -func (l SourceLocation) File() (ret File) { - l.wrapSpellingLocation(&ret, nil, nil, nil) - return -} - -func (l SourceLocation) Line() (ret c.Uint) { - l.wrapSpellingLocation(nil, &ret, nil, nil) - return -} - -func (l SourceLocation) Column() (ret c.Uint) { - l.wrapSpellingLocation(nil, nil, &ret, nil) - return -} - -func (l SourceLocation) Offset() (ret c.Uint) { - l.wrapSpellingLocation(nil, nil, nil, &ret) - return -} - -/** - * Retrieve the file, line and column represented by the given source - * location, as specified in a # line directive. - * - * Example: given the following source code in a file somefile.c - * - * \code - * #123 "dummy.c" 1 - * - * static int func(void) - * { - * return 0; - * } - * \endcode - * - * the location information returned by this function would be - * - * File: dummy.c Line: 124 Column: 12 - * - * whereas clang_getExpansionLocation would have returned - * - * File: somefile.c Line: 3 Column: 12 - * - * \param location the location within a source file that will be decomposed - * into its parts. - * - * \param filename [out] if non-NULL, will be set to the filename of the - * source location. Note that filenames returned will be for "virtual" files, - * which don't necessarily exist on the machine running clang - e.g. when - * parsing preprocessed output obtained from a different environment. If - * a non-NULL value is passed in, remember to dispose of the returned value - * using \c clang_disposeString() once you've finished with it. For an invalid - * source location, an empty string is returned. - * - * \param line [out] if non-NULL, will be set to the line number of the - * source location. For an invalid source location, zero is returned. - * - * \param column [out] if non-NULL, will be set to the column number of the - * source location. For an invalid source location, zero is returned. - */ -// llgo:link (*SourceLocation).wrapPresumedLocation C.wrap_clang_getPresumedLocation -func (l *SourceLocation) wrapPresumedLocation(filename *String, line, column *c.Uint) {} - -func (l SourceLocation) PresumedLocation(filename *String, line, column *c.Uint) { - l.wrapPresumedLocation(filename, line, column) -} - -/** - * Retrieve a source location representing the first character within a - * source range. - */ -// llgo:link (*SourceRange).wrapRangeStart C.wrap_clang_getRangeStart -func (r *SourceRange) wrapRangeStart(loc *SourceLocation) { return } - -func (r SourceRange) RangeStart() (loc SourceLocation) { - r.wrapRangeStart(&loc) - return -} - -/** - * Retrieve a source location representing the last character within a - * source range. - */ -// llgo:link (*SourceRange).wrapRangeEnd C.wrap_clang_getRangeEnd -func (r *SourceRange) wrapRangeEnd(loc *SourceLocation) { return } - -func (r SourceRange) RangeEnd() (loc SourceLocation) { - r.wrapRangeEnd(&loc) - return -} - -//llgo:link File.FileName C.clang_getFileName -func (File) FileName() (ret String) { return } diff --git a/c/debug/_demo/funcinfo/main.go b/c/debug/_demo/funcinfo/main.go deleted file mode 100644 index 8b0d9a91..00000000 --- a/c/debug/_demo/funcinfo/main.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/debug" -) - -type T struct { - n int -} - -func (t *T) Demo() { - println(t.n) - addr := debug.Address() - c.Printf(c.Str("addr:0x%x\n"), addr) - var info debug.Info - r := debug.Addrinfo(addr, &info) - if r == 0 { - panic("not found info") - } - c.Printf(c.Str("func file:%s name:%s base:0x%x addr:0x%x\n"), info.Fname, info.Sname, info.Fbase, info.Saddr) -} - -func main() { - t := &T{100} - t.Demo() -} diff --git a/c/debug/_demo/stacktrace/main.go b/c/debug/_demo/stacktrace/main.go deleted file mode 100644 index 30339209..00000000 --- a/c/debug/_demo/stacktrace/main.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c/debug" -) - -type T struct { - n int -} - -func (t *T) Demo() { - println(t.n) - debug.StackTrace(0, func(fr *debug.Frame) bool { - var info debug.Info - debug.Addrinfo(unsafe.Pointer(fr.PC), &info) - println("[", fr.PC, "]", fr.Name, "+", fr.Offset, ", SP =", fr.SP) - return true - }) -} - -func main() { - t := &T{100} - t.Demo() -} diff --git a/c/debug/_wrap/debug.c b/c/debug/_wrap/debug.c deleted file mode 100644 index 32d87903..00000000 --- a/c/debug/_wrap/debug.c +++ /dev/null @@ -1,41 +0,0 @@ -#if defined(__linux__) -#define UNW_LOCAL_ONLY -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#include -#endif - -#include -#include - -void *llgo_address() { - return __builtin_return_address(0); -} - -int llgo_addrinfo(void *addr, Dl_info *info) { - return dladdr(addr, info); -} - -void llgo_stacktrace(int skip, void *ctx, int (*fn)(void *ctx, void *pc, void *offset, void *sp, char *name)) { - unw_cursor_t cursor; - unw_context_t context; - unw_word_t offset, pc, sp; - char fname[256]; - unw_getcontext(&context); - unw_init_local(&cursor, &context); - int depth = 0; - while (unw_step(&cursor) > 0) { - if (depth < skip) { - depth++; - continue; - } - if (unw_get_reg(&cursor, UNW_REG_IP, &pc) == 0) { - unw_get_proc_name(&cursor, fname, sizeof(fname), &offset); - unw_get_reg(&cursor, UNW_REG_SP, &sp); - if (fn(ctx, (void*)pc, (void*)offset, (void*)sp, fname) == 0) { - return; - } - } - } -} \ No newline at end of file diff --git a/c/debug/debug.go b/c/debug/debug.go deleted file mode 100644 index 16e00eea..00000000 --- a/c/debug/debug.go +++ /dev/null @@ -1,49 +0,0 @@ -package debug - -/* -#cgo linux LDFLAGS: -lunwind -*/ -import "C" -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link" - LLGoFiles = "_wrap/debug.c" -) - -type Info struct { - Fname *c.Char - Fbase c.Pointer - Sname *c.Char - Saddr c.Pointer -} - -//go:linkname Address C.llgo_address -func Address() unsafe.Pointer - -//go:linkname Addrinfo C.llgo_addrinfo -func Addrinfo(addr unsafe.Pointer, info *Info) c.Int - -//go:linkname stacktrace C.llgo_stacktrace -func stacktrace(skip c.Int, ctx unsafe.Pointer, fn func(ctx, pc, offset, sp unsafe.Pointer, name *c.Char) c.Int) - -type Frame struct { - PC uintptr - Offset uintptr - SP unsafe.Pointer - Name string -} - -func StackTrace(skip int, fn func(fr *Frame) bool) { - stacktrace(c.Int(1+skip), unsafe.Pointer(&fn), func(ctx, pc, offset, sp unsafe.Pointer, name *c.Char) c.Int { - fn := *(*func(fr *Frame) bool)(ctx) - if !fn(&Frame{uintptr(pc), uintptr(offset), sp, c.GoString(name)}) { - return 0 - } - return 1 - }) -} diff --git a/c/ffi/_demo/_wrap/wrap.c b/c/ffi/_demo/_wrap/wrap.c deleted file mode 100644 index 07f31c0a..00000000 --- a/c/ffi/_demo/_wrap/wrap.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -struct array -{ - int x; - int y; - int z; - int k; -}; - -int demo1(struct array a) -{ - printf("c.demo1: %d %d %d %d\n",a.x,a.y,a.z,a.k); - return a.x+a.y+a.z+a.k; -} - -int demo2( int (*fn)(struct array)) { - printf("c.demo2: %p\n",fn); - struct array a; - a.x = 1; - a.y = 2; - a.z = 3; - a.k = 4; - return (*fn)(a); -} diff --git a/c/ffi/_demo/cfunc/main.go b/c/ffi/_demo/cfunc/main.go deleted file mode 100644 index 59f5f118..00000000 --- a/c/ffi/_demo/cfunc/main.go +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/ffi" -) - -const ( - LLGoPackage = "link" - LLGoFiles = "../_wrap/wrap.c" -) - -//llgo:type C -type Callback func(array) c.Int - -//go:linkname demo1 C.demo1 -func demo1(array) c.Int - -//go:linkname demo2 C.demo2 -func demo2(fn Callback) c.Int - -//llgo:type C -type array struct { - x c.Int - y c.Int - z c.Int - k c.Int -} - -var ( - typeInt32 = &ffi.Type{4, 4, ffi.Sint32, nil} - typePointer = &ffi.Type{unsafe.Sizeof(0), uint16(unsafe.Alignof(0)), ffi.Pointer, nil} -) - -func main() { - cdemo1() - cdemo2() -} - -func cdemo1() { - var cif ffi.Cif - tarray := &ffi.Type{0, 0, ffi.Struct, &[]*ffi.Type{typeInt32, typeInt32, typeInt32, typeInt32, nil}[0]} - status := ffi.PrepCif(&cif, ffi.DefaultAbi, 1, typeInt32, &[]*ffi.Type{tarray}[0]) - if status != ffi.OK { - panic(status) - } - ar := array{1, 2, 3, 4} - var ret int32 - ffi.Call(&cif, c.Func(demo1), unsafe.Pointer(&ret), &[]unsafe.Pointer{unsafe.Pointer(&ar)}[0]) - c.Printf(c.Str("ret: %d\n"), ret) -} - -func cdemo2() { - var cif ffi.Cif - status := ffi.PrepCif(&cif, ffi.DefaultAbi, 1, typeInt32, &[]*ffi.Type{typePointer}[0]) - if status != ffi.OK { - panic(status) - } - var ret int32 - fn := c.Func(demo1) - ffi.Call(&cif, c.Func(demo2), unsafe.Pointer(&ret), &[]unsafe.Pointer{unsafe.Pointer(&fn)}[0]) - c.Printf(c.Str("ret: %d\n"), ret) -} diff --git a/c/ffi/_demo/closure/main.go b/c/ffi/_demo/closure/main.go deleted file mode 100644 index a85d0836..00000000 --- a/c/ffi/_demo/closure/main.go +++ /dev/null @@ -1,93 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/ffi" -) - -const ( - LLGoPackage = "link" - LLGoFiles = "../_wrap/wrap.c" -) - -//llgo:type C -type Callback func(array) c.Int - -//go:linkname demo1 C.demo1 -func demo1(array) c.Int - -//go:linkname demo2 C.demo2 -func demo2(fn Callback) c.Int - -//llgo:type C -type array struct { - x c.Int - y c.Int - z c.Int - k c.Int -} - -func demo(a array) c.Int { - c.Printf(c.Str("go.demo %d %d %d %d\n"), a.x, a.y, a.z, a.k) - return a.x + a.y + a.z + a.k -} - -var ( - typeInt32 = &ffi.Type{4, 4, ffi.Sint32, nil} - typePointer = &ffi.Type{unsafe.Sizeof(0), uint16(unsafe.Alignof(0)), ffi.Pointer, nil} -) - -func main() { - gofn() - c.Printf(c.Str("\n")) - goclosure() -} - -func gofn() { - var cif ffi.Cif - status := ffi.PrepCif(&cif, ffi.DefaultAbi, 1, typeInt32, &[]*ffi.Type{typePointer}[0]) - if status != ffi.OK { - panic(status) - } - var fncode unsafe.Pointer - closure := ffi.ClosureAlloc(&fncode) - defer ffi.ClosureFree(closure) - status = ffi.PreClosureLoc(closure, &cif, func(cif *ffi.Cif, ret unsafe.Pointer, args *unsafe.Pointer, userdata unsafe.Pointer) { - ar := *(*array)(ffi.Index(args, 0)) - *(*c.Int)(ret) = demo(ar) - }, nil, fncode) - if status != ffi.OK { - panic(status) - } - var ret int32 - ffi.Call(&cif, c.Func(demo2), unsafe.Pointer(&ret), &[]unsafe.Pointer{unsafe.Pointer(&fncode)}[0]) - c.Printf(c.Str("ret: %d\n"), ret) -} - -func goclosure() { - var cif ffi.Cif - status := ffi.PrepCif(&cif, ffi.DefaultAbi, 1, typeInt32, &[]*ffi.Type{typePointer}[0]) - if status != ffi.OK { - panic(status) - } - fn := func(ar array) c.Int { - c.Printf(c.Str("call closure %d\n"), cif.NArgs) - return demo(ar) - } - var fncode unsafe.Pointer - closure := ffi.ClosureAlloc(&fncode) - defer ffi.ClosureFree(closure) - status = ffi.PreClosureLoc(closure, &cif, func(cif *ffi.Cif, ret unsafe.Pointer, args *unsafe.Pointer, userdata unsafe.Pointer) { - ar := *(*array)(ffi.Index(args, 0)) - fn := *(*func(array) c.Int)(userdata) - *(*c.Int)(ret) = fn(ar) - }, unsafe.Pointer(&fn), fncode) - if status != ffi.OK { - panic(status) - } - var ret int32 - ffi.Call(&cif, c.Func(demo2), unsafe.Pointer(&ret), &[]unsafe.Pointer{unsafe.Pointer(&fncode)}[0]) - c.Printf(c.Str("ret: %d\n"), ret) -} diff --git a/c/ffi/_demo/printf/main.go b/c/ffi/_demo/printf/main.go deleted file mode 100644 index cac40edd..00000000 --- a/c/ffi/_demo/printf/main.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/ffi" -) - -var ( - typeInt32 = &ffi.Type{4, 4, ffi.Sint32, nil} - typePointer = &ffi.Type{unsafe.Sizeof(0), uint16(unsafe.Alignof(0)), ffi.Pointer, nil} -) - -func main() { - var cif ffi.Cif - status := ffi.PrepCifVar(&cif, ffi.DefaultAbi, 1, 2, typeInt32, &[]*ffi.Type{typePointer, typeInt32}[0]) - if status != ffi.OK { - panic(status) - } - var ret int32 - text := c.Str("hello world: %d\n") - var n int32 = 100 - ffi.Call(&cif, c.Func(c.Printf), unsafe.Pointer(&ret), &[]unsafe.Pointer{unsafe.Pointer(&text), unsafe.Pointer(&n)}[0]) - c.Printf(c.Str("ret: %d\n"), ret) -} diff --git a/c/ffi/_wrap/libffi.c b/c/ffi/_wrap/libffi.c deleted file mode 100644 index 53fa1c70..00000000 --- a/c/ffi/_wrap/libffi.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void *llog_ffi_closure_alloc(void **code) { - return ffi_closure_alloc(sizeof(ffi_closure), code); -} diff --git a/c/ffi/abi.go b/c/ffi/abi.go deleted file mode 100644 index a693166e..00000000 --- a/c/ffi/abi.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build ((freebsd || linux || darwin) && arm64) || (windows && (amd64 || arm64)) - -package ffi - -const ( - DefaultAbi = 1 -) diff --git a/c/ffi/abi_amd64.go b/c/ffi/abi_amd64.go deleted file mode 100644 index 89078adb..00000000 --- a/c/ffi/abi_amd64.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build freebsd || linux || darwin - -package ffi - -const ( - DefaultAbi = 2 -) diff --git a/c/ffi/ffi.go b/c/ffi/ffi.go deleted file mode 100644 index f060d786..00000000 --- a/c/ffi/ffi.go +++ /dev/null @@ -1,132 +0,0 @@ -package ffi - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs libffi); -lffi" - LLGoFiles = "$(pkg-config --cflags libffi): _wrap/libffi.c" -) - -const ( - Void = iota - Int - Float - Double - LongDouble - Uint8 - Sint8 - Uint16 - Sint16 - Uint32 - Sint32 - Uint64 - Sint64 - Struct - Pointer - Complex -) - -const ( - OK = iota - BAD_TYPEDEF - BAD_ABI - BAD_ARGTYPE -) - -type Type struct { - Size uintptr - Alignment uint16 - Type uint16 - Elements **Type -} - -/*typedef struct { - ffi_abi abi; - unsigned nargs; - ffi_type **arg_types; - ffi_type *rtype; - unsigned bytes; - unsigned flags; -#ifdef FFI_EXTRA_CIF_FIELDS - FFI_EXTRA_CIF_FIELDS; -#endif -} ffi_cif; -*/ - -type Cif struct { - Abi c.Uint - NArgs c.Uint - ArgTypes **Type - RType *Type - Bytes c.Uint - Flags c.Uint - //Extra c.Uint -} - -/* -ffi_status -ffi_prep_cif(ffi_cif *cif, - ffi_abi abi, - unsigned int nargs, - ffi_type *rtype, - ffi_type **atypes); -*/ -//go:linkname PrepCif C.ffi_prep_cif -func PrepCif(cif *Cif, abi c.Uint, nargs c.Uint, rtype *Type, atype **Type) c.Uint - -/* -ffi_status ffi_prep_cif_var(ffi_cif *cif, - ffi_abi abi, - unsigned int nfixedargs, - unsigned int ntotalargs, - ffi_type *rtype, - ffi_type **atypes); -*/ -//go:linkname PrepCifVar C.ffi_prep_cif_var -func PrepCifVar(cif *Cif, abi c.Uint, nfixedargs c.Uint, ntotalargs c.Uint, rtype *Type, atype **Type) c.Uint - -/* -void ffi_call(ffi_cif *cif, - void (*fn)(void), - void *rvalue, - void **avalue); -*/ -//go:linkname Call C.ffi_call -func Call(cif *Cif, fn unsafe.Pointer, rvalue unsafe.Pointer, avalue *unsafe.Pointer) - -// void *ffi_closure_alloc (size_t size, void **code); -// -//go:linkname ClosureAlloc C.llog_ffi_closure_alloc -func ClosureAlloc(code *unsafe.Pointer) unsafe.Pointer - -// void ffi_closure_free (void *); -// -//go:linkname ClosureFree C.ffi_closure_free -func ClosureFree(unsafe.Pointer) - -/* -ffi_status -ffi_prep_closure_loc (ffi_closure*, - ffi_cif *, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data, - void *codeloc); -*/ - -//llgo:type C -type ClosureFunc func(cif *Cif, ret unsafe.Pointer, args *unsafe.Pointer, userdata unsafe.Pointer) - -//go:linkname PreClosureLoc C.ffi_prep_closure_loc -func PreClosureLoc(closure unsafe.Pointer, cif *Cif, fn ClosureFunc, userdata unsafe.Pointer, codeloc unsafe.Pointer) c.Uint - -func add(ptr unsafe.Pointer, offset uintptr) unsafe.Pointer { - return unsafe.Pointer(uintptr(ptr) + offset) -} - -func Index(args *unsafe.Pointer, i uintptr) unsafe.Pointer { - return (*(*unsafe.Pointer)(add(unsafe.Pointer(args), i*unsafe.Sizeof(0)))) -} diff --git a/c/libuv/README.md b/c/libuv/README.md deleted file mode 100644 index 30f2ed5b..00000000 --- a/c/libuv/README.md +++ /dev/null @@ -1,44 +0,0 @@ -LLGo wrapper of libuv -===== - -## How to install - -### on macOS (Homebrew) - -```sh -brew install libuv -``` - -### on Linux (Debian/Ubuntu) - -```sh -apt-get install -y libuv1-dev -``` - -### on Linux (CentOS/RHEL) - -```sh -yum install -y libuv-devel -``` - -### on Linux (Arch Linux) - -```sh -pacman -S libuv -``` - -## Demos - -The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it): - -* [async_fs](_demo/async_fs/async_fs.go): a simple async file read demo -* [echo_server](_demo/echo_server/echo_server.go): a basic async tcp echo server - -### How to run demos - -To run the demos in directory `_demo`: - -```sh -cd # eg. cd _demo/sqlitedemo -llgo run . -``` diff --git a/c/libuv/_demo/async/async.go b/c/libuv/_demo/async/async.go deleted file mode 100644 index eb97ba0d..00000000 --- a/c/libuv/_demo/async/async.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/libuv" -) - -func ensure(b bool, msg string) { - if !b { - panic(msg) - } -} - -func main() { - loop := libuv.LoopNew() - defer loop.Close() - - a := &libuv.Async{} - r := loop.Async(a, func(a *libuv.Async) { - println("async callback") - a.Close(nil) // or loop.Stop() - }) - ensure(r == 0, "Async failed") - - go func() { - println("begin async task") - c.Usleep(100 * 1000) - println("send async event") - ensure(a.Send() == 0, "Send failed") - }() - - loop.Run(libuv.RUN_DEFAULT) - println("done") -} - -/*Expected Output: -begin async task -send async event -async callback -done -*/ diff --git a/c/libuv/_demo/async_fs/async_fs.go b/c/libuv/_demo/async_fs/async_fs.go deleted file mode 100644 index 36acff75..00000000 --- a/c/libuv/_demo/async_fs/async_fs.go +++ /dev/null @@ -1,116 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/libuv" - "github.com/goplus/llgo/c/os" -) - -const BUFFER_SIZE = 1024 - -var ( - loop *libuv.Loop - openReq libuv.Fs - closeReq libuv.Fs - - buffer [BUFFER_SIZE]c.Char - iov libuv.Buf - file libuv.File -) - -func main() { - // Print the libuv version - c.Printf(c.Str("libuv version: %d\n"), libuv.Version()) - - // Initialize the loop - loop = libuv.DefaultLoop() - - // Open the file - libuv.FsOpen(loop, &openReq, c.Str("example.txt"), os.O_RDONLY, 0, onOpen) - - // Run the loop - result := loop.Run(libuv.RUN_DEFAULT) - - if result != 0 { - c.Fprintf(c.Stderr, c.Str("Error in Run: %s\n"), libuv.Strerror(libuv.Errno(result))) - } - - // Cleanup - defer cleanup() -} - -func onOpen(req *libuv.Fs) { - // Check for errors - if req.GetResult() < 0 { - c.Fprintf(c.Stderr, c.Str("Error opening file: %s\n"), libuv.Strerror(libuv.Errno(req.GetResult()))) - loop.Close() - return - } - - // Store the file descriptor - file = libuv.File(req.GetResult()) - - // Init buffer - iov = libuv.InitBuf((*c.Char)(unsafe.Pointer(&buffer[0])), c.Uint(unsafe.Sizeof(buffer))) - - // Read the file - readFile() - -} - -func readFile() { - // Initialize the request every time - var readReq libuv.Fs - - // Read the file - readRes := libuv.FsRead(loop, &readReq, file, &iov, 1, -1, onRead) - if readRes != 0 { - c.Printf(c.Str("Error in FsRead: %s (code: %d)\n"), libuv.Strerror(libuv.Errno(readRes)), readRes) - readReq.ReqCleanup() - loop.Close() - } -} - -func onRead(req *libuv.Fs) { - // Cleanup the request - defer req.ReqCleanup() - // Check for errors - if req.GetResult() < 0 { - c.Fprintf(c.Stderr, c.Str("Read error: %s\n"), libuv.Strerror(libuv.Errno(req.GetResult()))) - } else if req.GetResult() == 0 { - // Close the file - closeRes := libuv.FsClose(loop, &closeReq, libuv.File(openReq.GetResult()), onClose) - if closeRes != 0 { - c.Printf(c.Str("Error in FsClose: %s (code: %d)\n"), libuv.Strerror(libuv.Errno(closeRes)), closeRes) - loop.Close() - return - } - } else { - c.Printf(c.Str("Read %d bytes\n"), req.GetResult()) - c.Printf(c.Str("Read content: %.*s\n"), req.GetResult(), (*c.Char)(unsafe.Pointer(&buffer[0]))) - // Read the file again - readFile() - } -} - -func onClose(req *libuv.Fs) { - // Check for errors - if req.GetResult() < 0 { - c.Fprintf(c.Stderr, c.Str("Error closing file: %s\n"), libuv.Strerror(libuv.Errno(req.GetResult()))) - } else { - c.Printf(c.Str("\nFile closed successfully.\n")) - } -} - -func cleanup() { - // Cleanup the requests - openReq.ReqCleanup() - closeReq.ReqCleanup() - // Close the loop - result := loop.Close() - if result != 0 { - c.Fprintf(c.Stderr, c.Str("Error in LoopClose: %s\n"), libuv.Strerror(libuv.Errno(result))) - } -} diff --git a/c/libuv/_demo/async_fs/example.txt b/c/libuv/_demo/async_fs/example.txt deleted file mode 100755 index 190a1803..00000000 --- a/c/libuv/_demo/async_fs/example.txt +++ /dev/null @@ -1 +0,0 @@ -123 diff --git a/c/libuv/_demo/echo_server/echo_server.go b/c/libuv/_demo/echo_server/echo_server.go deleted file mode 100644 index 9a208a76..00000000 --- a/c/libuv/_demo/echo_server/echo_server.go +++ /dev/null @@ -1,112 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/libuv" - "github.com/goplus/llgo/c/net" -) - -var DEFAULT_PORT c.Int = 8080 -var DEFAULT_BACKLOG c.Int = 128 - -type WriteReq struct { - Req libuv.Write - Buf libuv.Buf -} - -func main() { - // Initialize the default event loop - var loop = libuv.DefaultLoop() - - // Initialize a TCP server - server := &libuv.Tcp{} - libuv.InitTcp(loop, server) - - // Set up the address to bind the server to - var addr net.SockaddrIn - libuv.Ip4Addr(c.Str("0.0.0.0"), DEFAULT_PORT, &addr) - c.Printf(c.Str("Listening on %s:%d\n"), c.Str("0.0.0.0"), DEFAULT_PORT) - - // Bind the server to the specified address and port - server.Bind((*net.SockAddr)(c.Pointer(&addr)), 0) - res := (*libuv.Stream)(server).Listen(DEFAULT_BACKLOG, OnNewConnection) - if res != 0 { - c.Fprintf(c.Stderr, c.Str("Listen error: %s\n"), libuv.Strerror(libuv.Errno(res))) - return - } - - // Start listening for incoming connections - loop.Run(libuv.RUN_DEFAULT) -} - -func FreeWriteReq(req *libuv.Write) { - wr := (*WriteReq)(c.Pointer(req)) - // Free the buffer base. - if wr.Buf.Base != nil { - c.Free(c.Pointer(wr.Buf.Base)) - wr.Buf.Base = nil - } -} - -func AllocBuffer(handle *libuv.Handle, suggestedSize uintptr, buf *libuv.Buf) { - // Allocate memory for the buffer based on the suggested size. - buf.Base = (*c.Char)(c.Malloc(suggestedSize)) - buf.Len = suggestedSize -} - -func EchoWrite(req *libuv.Write, status c.Int) { - if status != 0 { - c.Fprintf(c.Stderr, c.Str("Write error: %s\n"), libuv.Strerror(libuv.Errno(status))) - } - FreeWriteReq(req) -} - -func EchoRead(client *libuv.Stream, nread c.Long, buf *libuv.Buf) { - if nread > 0 { - req := new(WriteReq) - // Initialize the buffer with the data read. - req.Buf = libuv.InitBuf(buf.Base, c.Uint(nread)) - // Write the data back to the client. - req.Req.Write(client, &req.Buf, 1, EchoWrite) - return - } - if nread < 0 { - // Handle read errors and EOF. - if (libuv.Errno)(nread) != libuv.EOF { - c.Fprintf(c.Stderr, c.Str("Read error: %s\n"), libuv.Strerror(libuv.Errno(nread))) - } - (*libuv.Handle)(c.Pointer(client)).Close(nil) - } - // Free the buffer if it's no longer needed. - if buf.Base != nil { - c.Free(c.Pointer(buf.Base)) - } -} - -func OnNewConnection(server *libuv.Stream, status c.Int) { - if status < 0 { - c.Fprintf(c.Stderr, c.Str("New connection error: %s\n"), libuv.Strerror(libuv.Errno(status))) - return - } - - // Allocate memory for a new client. - client := &libuv.Tcp{} - - if client == nil { - c.Fprintf(c.Stderr, c.Str("Failed to allocate memory for client\n")) - return - } - - // Initialize the client TCP handle. - if libuv.InitTcp(libuv.DefaultLoop(), client) < 0 { - c.Fprintf(c.Stderr, c.Str("Failed to initialize client\n")) - return - } - - // Accept the new connection and start reading data. - if server.Accept((*libuv.Stream)(client)) == 0 { - (*libuv.Stream)(client).StartRead(AllocBuffer, EchoRead) - } else { - (*libuv.Handle)(c.Pointer(client)).Close(nil) - } -} diff --git a/c/libuv/_wrap/libuv.c b/c/libuv/_wrap/libuv.c deleted file mode 100644 index d3d51448..00000000 --- a/c/libuv/_wrap/libuv.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int uv_tcp_get_io_watcher_fd (uv_tcp_t* handle) { - return handle->io_watcher.fd; -} \ No newline at end of file diff --git a/c/libuv/async.go b/c/libuv/async.go deleted file mode 100644 index f7f23ff7..00000000 --- a/c/libuv/async.go +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// struct uv_async_t -type Async struct { - Handle - // On macOS arm64, sizeof uv_async_t is 128 bytes. - // Handle is 92 bytes, so we need 36 bytes to fill the gap. - // Maybe reserve more for future use. - Unused [36]byte -} - -// typedef void (*uv_async_cb)(uv_async_t* handle); -// llgo:type C -type AsyncCb func(*Async) - -// int uv_async_init(uv_loop_t*, uv_async_t* async, uv_async_cb async_cb); -// -// llgo:link (*Loop).Async C.uv_async_init -func (loop *Loop) Async(a *Async, cb AsyncCb) c.Int { - return 0 -} - -// int uv_async_send(uv_async_t* async); -// -// llgo:link (*Async).Send C.uv_async_send -func (a *Async) Send() c.Int { - return 0 -} diff --git a/c/libuv/check.go b/c/libuv/check.go deleted file mode 100644 index 3f3e268e..00000000 --- a/c/libuv/check.go +++ /dev/null @@ -1,27 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -/* Handle types. */ - -type Check struct { - Unused [120]byte -} - -/* Function type */ - -// llgo:type C -type CheckCb func(Check *Check) - -//go:linkname InitCheck C.uv_check_init -func InitCheck(loop *Loop, Check *Check) c.Int - -// llgo:link (*Check).Start C.uv_check_start -func (Check *Check) Start(CheckCb CheckCb) c.Int { return 0 } - -// llgo:link (*Check).Stop C.uv_check_stop -func (Check *Check) Stop() c.Int { return 0 } diff --git a/c/libuv/error.go b/c/libuv/error.go deleted file mode 100644 index 24e2cc3e..00000000 --- a/c/libuv/error.go +++ /dev/null @@ -1,118 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" - "github.com/goplus/llgo/c/syscall" -) - -const ( - E2BIG = Errno(syscall.E2BIG) - EACCES = Errno(syscall.EACCES) - EADDRINUSE = Errno(syscall.EADDRINUSE) - EADDRNOTAVAIL = Errno(syscall.EADDRNOTAVAIL) - EAFNOSUPPORT = Errno(syscall.EAFNOSUPPORT) - EAGAIN = Errno(syscall.EAGAIN) - EALREADY = Errno(syscall.EALREADY) - EBADF = Errno(syscall.EBADF) - EBUSY = Errno(syscall.EBUSY) - ECANCELED = Errno(syscall.ECANCELED) - ECONNABORTED = Errno(syscall.ECONNABORTED) - ECONNREFUSED = Errno(syscall.ECONNREFUSED) - ECONNRESET = Errno(syscall.ECONNRESET) - EDESTADDRREQ = Errno(syscall.EDESTADDRREQ) - EEXIST = Errno(syscall.EEXIST) - EFAULT = Errno(syscall.EFAULT) - EFBIG = Errno(syscall.EFBIG) - EHOSTUNREACH = Errno(syscall.EHOSTUNREACH) - EINTR = Errno(syscall.EINTR) - EINVAL = Errno(syscall.EINVAL) - EIO = Errno(syscall.EIO) - EISCONN = Errno(syscall.EISCONN) - EISDIR = Errno(syscall.EISDIR) - ELOOP = Errno(syscall.ELOOP) - EMFILE = Errno(syscall.EMFILE) - EMSGSIZE = Errno(syscall.EMSGSIZE) - ENAMETOOLONG = Errno(syscall.ENAMETOOLONG) - ENETDOWN = Errno(syscall.ENETDOWN) - ENETUNREACH = Errno(syscall.ENETUNREACH) - ENFILE = Errno(syscall.ENFILE) - ENOBUFS = Errno(syscall.ENOBUFS) - ENODEV = Errno(syscall.ENODEV) - ENOENT = Errno(syscall.ENOENT) - ENOMEM = Errno(syscall.ENOMEM) - ENOPROTOOPT = Errno(syscall.ENOPROTOOPT) - ENOSPC = Errno(syscall.ENOSPC) - ENOSYS = Errno(syscall.ENOSYS) - ENOTCONN = Errno(syscall.ENOTCONN) - ENOTDIR = Errno(syscall.ENOTDIR) - ENOTEMPTY = Errno(syscall.ENOTEMPTY) - ENOTSOCK = Errno(syscall.ENOTSOCK) - ENOTSUP = Errno(syscall.ENOTSUP) - EOVERFLOW = Errno(syscall.EOVERFLOW) - EPERM = Errno(syscall.EPERM) - EPIPE = Errno(syscall.EPIPE) - EPROTO = Errno(syscall.EPROTO) - EPROTONOSUPPORT = Errno(syscall.EPROTONOSUPPORT) - EPROTOTYPE = Errno(syscall.EPROTOTYPE) - ERANGE = Errno(syscall.ERANGE) - EROFS = Errno(syscall.EROFS) - ESHUTDOWN = Errno(syscall.ESHUTDOWN) - ESPIPE = Errno(syscall.ESPIPE) - ESRCH = Errno(syscall.ESRCH) - ETIMEDOUT = Errno(syscall.ETIMEDOUT) - ETXTBSY = Errno(syscall.ETXTBSY) - EXDEV = Errno(syscall.EXDEV) - ENXIO = Errno(syscall.ENXIO) - EMLINK = Errno(syscall.EMLINK) - EHOSTDOWN = Errno(syscall.EHOSTDOWN) - ENOTTY = Errno(syscall.ENOTTY) - //EFTYPE = Errno(syscall.EFTYPE) - EILSEQ = Errno(syscall.EILSEQ) - ESOCKTNOSUPPORT = Errno(syscall.ESOCKTNOSUPPORT) -) - -const ( - EAI_ADDRFAMILY = Errno(net.EAI_ADDRFAMILY) - EAI_AGAIN = Errno(net.EAI_AGAIN) - EAI_BADFLAGS = Errno(net.EAI_BADFLAGS) - EAI_BADHINTS = Errno(net.EAI_BADHINTS) - EAI_FAIL = Errno(net.EAI_FAIL) - EAI_FAMILY = Errno(net.EAI_FAMILY) - EAI_MEMORY = Errno(net.EAI_MEMORY) - EAI_NODATA = Errno(net.EAI_NODATA) - EAI_NONAME = Errno(net.EAI_NONAME) - EAI_OVERFLOW = Errno(net.EAI_OVERFLOW) - EAI_PROTOCOL = Errno(net.EAI_PROTOCOL) - EAI_SERVICE = Errno(net.EAI_SERVICE) - EAI_SOCKTYPE = Errno(net.EAI_SOCKTYPE) -) - -const ( - EAI_CANCELED Errno = -3003 - ECHARSET Errno = -4080 - ENONET Errno = -4056 - UNKNOWN Errno = -4094 - EOF Errno = -4095 - EREMOTEIO Errno = -4030 - ERRNO_MAX Errno = EOF - 1 -) - -type Errno c.Int - -//go:linkname TranslateSysError C.uv_translate_sys_error -func TranslateSysError(sysErrno c.Int) Errno - -//go:linkname Strerror C.uv_strerror -func Strerror(err Errno) *c.Char - -//go:linkname StrerrorR C.uv_strerror_r -func StrerrorR(err Errno, buf *c.Char, bufLen uintptr) *c.Char - -//go:linkname ErrName C.uv_err_name -func ErrName(err Errno) *c.Char - -//go:linkname ErrNameR C.uv_err_name_r -func ErrNameR(err Errno, buf *c.Char, bufLen uintptr) *c.Char diff --git a/c/libuv/fs.go b/c/libuv/fs.go deleted file mode 100644 index 71a78e85..00000000 --- a/c/libuv/fs.go +++ /dev/null @@ -1,307 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - FS_UNKNOWN FsType = -1 - FS_CUSTOM FsType = 0 - FS_OPEN FsType = 1 - FS_CLOSE FsType = 2 - FS_READ FsType = 3 - FS_WRITE FsType = 4 - FS_SENDFILE FsType = 5 - FS_STAT FsType = 6 - FS_LSTAT FsType = 7 - FS_FSTAT FsType = 8 - FS_FTRUNCATE FsType = 9 - FS_UTIME FsType = 10 - FS_FUTIME FsType = 11 - FS_ACCESS FsType = 12 - FS_CHMOD FsType = 13 - FS_FCHMOD FsType = 14 - FS_FSYNC FsType = 15 - FS_FDATASYNC FsType = 16 - FS_UNLINK FsType = 17 - FS_RMDIR FsType = 18 - FS_MKDIR FsType = 19 - FS_MKDTEMP FsType = 20 - FS_RENAME FsType = 21 - FS_SCANDIR FsType = 22 - FS_LINK FsType = 23 - FS_SYMLINK FsType = 24 - FS_READLINK FsType = 25 - FS_CHOWN FsType = 26 - FS_FCHOWN FsType = 27 - FS_REALPATH FsType = 28 - FS_COPYFILE FsType = 29 - FS_LCHOWN FsType = 30 - FS_OPENDIR FsType = 31 - FS_READDIR FsType = 32 - FS_CLOSEDIR FsType = 33 - FS_STATFS FsType = 34 - FS_MKSTEMP FsType = 35 - FS_LUTIME FsType = 36 -) - -const ( - DirentUnknown DirentType = iota - DirentFile - DirentDir - DirentLink - DirentFifo - DirentSocket - DirentChar - DirentBlock -) - -type FsType c.Int - -type DirentType c.Int - -type File c.Int - -// ---------------------------------------------- - -/* Handle types. */ - -type Fs struct { - Unused [440]byte -} - -type FsEvent struct { - Unused [0]byte -} - -type FsPoll struct { - Unused [0]byte -} - -type Dirent struct { - Name *c.Char - Type DirentType -} - -type Stat struct { - Unused [0]byte -} - -// ---------------------------------------------- - -/* Function type */ - -// llgo:type C -type FsCb func(req *Fs) - -// llgo:type C -type FsEventCb func(handle *FsEvent, filename *c.Char, events c.Int, status c.Int) - -// llgo:type C -type FsPollCb func(handle *FsPoll, status c.Int, events c.Int) - -// ---------------------------------------------- - -/* Fs related function and method */ - -// llgo:link (*Fs).GetType C.uv_fs_get_type -func (req *Fs) GetType() FsType { - return 0 -} - -// llgo:link (*Fs).GetPath C.uv_fs_get_path -func (req *Fs) GetPath() *c.Char { - return nil -} - -// llgo:link (*Fs).GetResult C.uv_fs_get_result -func (req *Fs) GetResult() c.Int { - return 0 -} - -// llgo:link (*Fs).GetPtr C.uv_fs_get_ptr -func (req *Fs) GetPtr() c.Pointer { - return nil -} - -// llgo:link (*Fs).GetSystemError C.uv_fs_get_system_error -func (req *Fs) GetSystemError() c.Int { - return 0 -} - -// llgo:link (*Fs).GetStatBuf C.uv_fs_get_statbuf -func (req *Fs) GetStatBuf() *Stat { - return nil -} - -// llgo:link (*Fs).ReqCleanup C.uv_fs_req_cleanup -func (req *Fs) ReqCleanup() { - // No return value needed for this method -} - -//go:linkname FsOpen C.uv_fs_open -func FsOpen(loop *Loop, req *Fs, path *c.Char, flags c.Int, mode c.Int, cb FsCb) c.Int - -//go:linkname FsClose C.uv_fs_close -func FsClose(loop *Loop, req *Fs, file File, cb FsCb) c.Int - -//go:linkname FsRead C.uv_fs_read -func FsRead(loop *Loop, req *Fs, file File, bufs *Buf, nbufs c.Uint, offset c.LongLong, cb FsCb) c.Int - -//go:linkname FsWrite C.uv_fs_write -func FsWrite(loop *Loop, req *Fs, file File, bufs *Buf, nbufs c.Uint, offset c.LongLong, cb FsCb) c.Int - -//go:linkname FsUnlink C.uv_fs_unlink -func FsUnlink(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsMkdir C.uv_fs_mkdir -func FsMkdir(loop *Loop, req *Fs, path *c.Char, mode c.Int, cb FsCb) c.Int - -//go:linkname FsMkdtemp C.uv_fs_mkdtemp -func FsMkdtemp(loop *Loop, req *Fs, tpl *c.Char, cb FsCb) c.Int - -//go:linkname FsMkStemp C.uv_fs_mkstemp -func FsMkStemp(loop *Loop, req *Fs, tpl *c.Char, cb FsCb) c.Int - -//go:linkname FsRmdir C.uv_fs_rmdir -func FsRmdir(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsStat C.uv_fs_stat -func FsStat(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsFstat C.uv_fs_fstat -func FsFstat(loop *Loop, req *Fs, file File, cb FsCb) c.Int - -//go:linkname FsRename C.uv_fs_rename -func FsRename(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, cb FsCb) c.Int - -//go:linkname FsFsync C.uv_fs_fsync -func FsFsync(loop *Loop, req *Fs, file File, cb FsCb) c.Int - -//go:linkname FsFdatasync C.uv_fs_fdatasync -func FsFdatasync(loop *Loop, req *Fs, file File, cb FsCb) c.Int - -//go:linkname FsFtruncate C.uv_fs_ftruncate -func FsFtruncate(loop *Loop, req *Fs, file File, offset c.LongLong, cb FsCb) c.Int - -//go:linkname FsSendfile C.uv_fs_sendfile -func FsSendfile(loop *Loop, req *Fs, outFd c.Int, inFd c.Int, inOffset c.LongLong, length c.Int, cb FsCb) c.Int - -//go:linkname FsAccess C.uv_fs_access -func FsAccess(loop *Loop, req *Fs, path *c.Char, flags c.Int, cb FsCb) c.Int - -//go:linkname FsChmod C.uv_fs_chmod -func FsChmod(loop *Loop, req *Fs, path *c.Char, mode c.Int, cb FsCb) c.Int - -//go:linkname FsFchmod C.uv_fs_fchmod -func FsFchmod(loop *Loop, req *Fs, file File, mode c.Int, cb FsCb) c.Int - -//go:linkname FsUtime C.uv_fs_utime -func FsUtime(loop *Loop, req *Fs, path *c.Char, atime c.Int, mtime c.Int, cb FsCb) c.Int - -//go:linkname FsFutime C.uv_fs_futime -func FsFutime(loop *Loop, req *Fs, file File, atime c.Int, mtime c.Int, cb FsCb) c.Int - -//go:linkname FsLutime C.uv_fs_lutime -func FsLutime(loop *Loop, req *Fs, path *c.Char, atime c.Int, mtime c.Int, cb FsCb) c.Int - -//go:linkname FsLink C.uv_fs_link -func FsLink(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, cb FsCb) c.Int - -//go:linkname FsSymlink C.uv_fs_symlink -func FsSymlink(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, flags c.Int, cb FsCb) c.Int - -//go:linkname FsReadlink C.uv_fs_read -func FsReadlink(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsRealpath C.uv_fs_realpath -func FsRealpath(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsCopyfile C.uv_fs_copyfile -func FsCopyfile(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, flags c.Int, cb FsCb) c.Int - -//go:linkname FsScandir C.uv_fs_scandir -func FsScandir(loop *Loop, req *Fs, path *c.Char, flags c.Int, cb FsCb) c.Int - -//go:linkname FsScandirNext C.uv_fs_scandir_next -func FsScandirNext(req *Fs, ent *Dirent) c.Int - -//go:linkname FsOpenDir C.uv_fs_opendir -func FsOpenDir(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsReaddir C.uv_fs_readdir -func FsReaddir(loop *Loop, req *Fs, dir c.Int, cb FsCb) c.Int - -//go:linkname FsCloseDir C.uv_fs_closedir -func FsCloseDir(loop *Loop, req *Fs) c.Int - -//go:linkname FsStatfs C.uv_fs_statfs -func FsStatfs(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -//go:linkname FsChown C.uv_fs_chown -func FsChown(loop *Loop, req *Fs, path *c.Char, uid c.Int, gid c.Int, cb FsCb) c.Int - -//go:linkname FsFchown C.uv_fs_fchown -func FsFchown(loop *Loop, req *Fs, file File, uid c.Int, gid c.Int, cb FsCb) c.Int - -//go:linkname FsLchown C.uv_fs_lchown -func FsLchown(loop *Loop, req *Fs, path *c.Char, uid c.Int, gid c.Int, cb FsCb) c.Int - -//go:linkname FsLstat C.uv_fs_lstat -func FsLstat(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int - -// ---------------------------------------------- - -/* FsEvent related function and method */ - -//go:linkname FsEventInit C.uv_fs_event_init -func FsEventInit(loop *Loop, handle *FsEvent) c.Int - -// llgo:link (*FsEvent).Start C.uv_fs_event_start -func (handle *FsEvent) Start(cb FsEventCb, path *c.Char, flags c.Int) c.Int { - return 0 -} - -// llgo:link (*FsEvent).Stop C.uv_fs_event_stop -func (handle *FsEvent) Stop() c.Int { - return 0 -} - -// llgo:link (*FsEvent).Close C.uv_fs_event_close -func (handle *FsEvent) Close() c.Int { - return 0 -} - -// llgo:link (*FsEvent).Getpath C.uv_fs_event_getpath -func (handle *FsEvent) Getpath() *c.Char { - return nil -} - -// ---------------------------------------------- - -/* FsPoll related function and method */ - -//go:linkname FsPollInit C.uv_fs_poll_init -func FsPollInit(loop *Loop, handle *FsPoll) c.Int - -// llgo:link (*FsPoll).Start C.uv_fs_poll_start -func (handle *FsPoll) Start(cb FsPollCb, path *c.Char, interval uint) c.Int { - return 0 -} - -// llgo:link (*FsPoll).Stop C.uv_fs_poll_stop -func (handle *FsPoll) Stop() c.Int { - return 0 -} - -// llgo:link (*FsPoll).Close C.uv_fs_poll_close -func (handle *FsPoll) Close() c.Int { - return 0 -} - -// llgo:link (*FsPoll).GetPath C.uv_fs_poll_getpath -func (handle *FsPoll) GetPath() *c.Char { - return nil -} diff --git a/c/libuv/idle.go b/c/libuv/idle.go deleted file mode 100644 index 064ebbae..00000000 --- a/c/libuv/idle.go +++ /dev/null @@ -1,27 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -/* Handle types. */ - -type Idle struct { - Unused [120]byte -} - -/* Function type */ - -// llgo:type C -type IdleCb func(idle *Idle) - -//go:linkname InitIdle C.uv_idle_init -func InitIdle(loop *Loop, idle *Idle) c.Int - -// llgo:link (*Idle).Start C.uv_idle_start -func (idle *Idle) Start(idleCb IdleCb) c.Int { return 0 } - -// llgo:link (*Idle).Stop C.uv_idle_stop -func (idle *Idle) Stop() c.Int { return 0 } diff --git a/c/libuv/libuv.go b/c/libuv/libuv.go deleted file mode 100644 index d1a4c625..00000000 --- a/c/libuv/libuv.go +++ /dev/null @@ -1,276 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs libuv); -luv" - LLGoFiles = "$(pkg-config --cflags libuv): _wrap/libuv.c" -) - -// ---------------------------------------------- -const ( - RUN_DEFAULT RunMode = iota - RUN_ONCE - RUN_NOWAIT -) - -const ( - LOOP_BLOCK_SIGNAL LoopOption = iota - METRICS_IDLE_TIME -) - -const ( - UV_LEAVE_GROUP Membership = iota - UV_JOIN_GROUP -) - -const ( - UNKNOWN_HANDLE HandleType = iota - ASYNC - CHECK - FS_EVENT - FS_POLL - HANDLE - IDLE - NAMED_PIPE - POLL - PREPARE - PROCESS - STREAM - TCP - TIMER - TTY - UDP - SIGNAL - FILE - HANDLE_TYPE_MAX -) - -const ( - UNKNOWN_REQ ReqType = iota - REQ - CONNECT - WRITE - SHUTDOWN - UDP_SEND - FS - WORK - GETADDRINFO - GETNAMEINFO - RANDOM - REQ_TYPE_PRIVATE - REQ_TYPE_MAX -) - -const ( - READABLE PollEvent = 1 << iota - WRITABLE - DISCONNECT - PRIPRIORITIZED -) - -type RunMode c.Int - -type LoopOption c.Int - -type Membership c.Int - -type HandleType c.Int - -type ReqType c.Int - -type OsSock c.Int - -type OsFd c.Int - -type PollEvent c.Int - -// ---------------------------------------------- - -/* Handle types. */ - -type Loop struct { - Unused [0]byte -} - -type Poll struct { - Data c.Pointer - Unused [160]byte -} - -/* Request types. */ - -type Buf struct { - Base *c.Char - Len uintptr -} // ---------------------------------------------- - -/* Function type */ - -// llgo:type C -type MallocFunc func(size uintptr) c.Pointer - -// llgo:type C -type ReallocFunc func(ptr c.Pointer, size uintptr) c.Pointer - -// llgo:type C -type CallocFunc func(count uintptr, size uintptr) c.Pointer - -// llgo:type C -type FreeFunc func(ptr c.Pointer) - -// llgo:type C -type AllocCb func(handle *Handle, suggestedSize uintptr, buf *Buf) - -// llgo:type C -type GetaddrinfoCb func(req *GetAddrInfo, status c.Int, res *net.AddrInfo) - -// llgo:type C -type GetnameinfoCb func(req *GetNameInfo, status c.Int, hostname *c.Char, service *c.Char) - -// llgo:type C -type WalkCb func(handle *Handle, arg c.Pointer) - -// llgo:type C -type PollCb func(handle *Poll, status c.Int, events c.Int) - -// ---------------------------------------------- - -//go:linkname Version C.uv_version -func Version() c.Uint - -//go:linkname VersionString C.uv_version_string -func VersionString() *c.Char - -//go:linkname LibraryShutdown C.uv_library_shutdown -func LibraryShutdown() - -//go:linkname ReplaceAllocator C.uv_replace_allocator -func ReplaceAllocator(mallocFunc MallocFunc, reallocFunc ReallocFunc, callocFunc CallocFunc, freeFunc FreeFunc) c.Int - -// ---------------------------------------------- - -/* Loop related functions and method. */ - -//go:linkname DefaultLoop C.uv_default_loop -func DefaultLoop() *Loop - -//go:linkname LoopSize C.uv_loop_size -func LoopSize() uintptr - -// llgo:link (*Loop).Run C.uv_run -func (loop *Loop) Run(mode RunMode) c.Int { - return 0 -} - -// llgo:link (*Loop).Alive C.uv_loop_alive -func (loop *Loop) Alive() c.Int { - return 0 -} - -// void uv_stop(uv_loop_t *loop) -// -// llgo:link (*Loop).Stop C.uv_stop -func (loop *Loop) Stop() {} - -// llgo:link (*Loop).Close C.uv_loop_close -func (loop *Loop) Close() c.Int { - return 0 -} - -// llgo:link (*Loop).Configure C.uv_loop_configure -func (loop *Loop) Configure(option LoopOption, arg c.Int) c.Int { - return 0 -} - -// llgo:link LoopDefault C.uv_default_loop -func LoopDefault() *Loop { - return nil -} - -// llgo:link (*Loop).Delete C.uv_loop_delete -func (loop *Loop) Delete() c.Int { - return 0 -} - -// llgo:link (*Loop).Fork C.uv_loop_fork -func (loop *Loop) Fork() c.Int { - return 0 -} - -// llgo:link (*Loop).Init C.uv_loop_init -func (loop *Loop) Init() c.Int { - return 0 -} - -// llgo:link LoopNew C.uv_loop_new -func LoopNew() *Loop { - return nil -} - -// llgo:link (*Loop).SetData C.uv_loop_set_data -func (loop *Loop) SetData(data c.Pointer) { - return -} - -// llgo:link (*Loop).GetData C.uv_loop_get_data -func (loop *Loop) GetData() c.Pointer { - return nil -} - -// llgo:link (*Loop).Now C.uv_now -func (loop *Loop) Now() c.UlongLong { - return 0 -} - -// llgo:link (*Loop).UpdateTime C.uv_update_time -func (loop *Loop) UpdateTime() { - // No return value needed for this method -} - -// llgo:link (*Loop).BackendFd C.uv_backend_fd -func (loop *Loop) BackendFd() c.Int { - return 0 -} - -// llgo:link (*Loop).BackendTimeout C.uv_backend_timeout -func (loop *Loop) BackendTimeout() c.Int { - return 0 -} - -// llgo:link (*Loop).Walk C.uv_walk -func (loop *Loop) Walk(walkCb WalkCb, arg c.Pointer) { - // No return value needed for this method -} - -// ---------------------------------------------- - -/* Buf related functions and method. */ - -//go:linkname InitBuf C.uv_buf_init -func InitBuf(base *c.Char, len c.Uint) Buf - -// ---------------------------------------------- - -/* Poll related function and method */ - -//go:linkname PollInit C.uv_poll_init -func PollInit(loop *Loop, handle *Poll, fd OsFd) c.Int - -//go:linkname PollInitSocket C.uv_poll_init_socket -func PollInitSocket(loop *Loop, handle *Poll, socket c.Int) c.Int - -// llgo:link (*Poll).Start C.uv_poll_start -func (handle *Poll) Start(events c.Int, cb PollCb) c.Int { - return 0 -} - -// llgo:link (*Poll).Stop C.uv_poll_stop -func (handle *Poll) Stop() c.Int { - return 0 -} diff --git a/c/libuv/net.go b/c/libuv/net.go deleted file mode 100644 index fad710df..00000000 --- a/c/libuv/net.go +++ /dev/null @@ -1,543 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" -) - -const ( - /* Used with uv_tcp_bind, when an IPv6 address is used. */ - TCP_IPV6ONLY TcpFlags = 1 -) - -/* - * UDP support. - */ -const ( - /* Disables dual stack mode. */ - UDP_IPV6ONLY UdpFlags = 1 - /* - * Indicates message was truncated because read buffer was too small. The - * remainder was discarded by the OS. Used in uv_udp_recv_cb. - */ - UDP_PARTIAL UdpFlags = 2 - /* - * Indicates if SO_REUSEADDR will be set when binding the handle. - * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other - * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that - * multiple threads or processes can bind to the same address without error - * (provided they all set the flag) but only the last one to bind will receive - * any traffic, in effect "stealing" the port from the previous listener. - */ - UDP_REUSEADDR UdpFlags = 4 - /* - * Indicates that the message was received by recvmmsg, so the buffer provided - * must not be freed by the recv_cb callback. - */ - UDP_MMSG_CHUNK UdpFlags = 8 - /* - * Indicates that the buffer provided has been fully utilized by recvmmsg and - * that it should now be freed by the recv_cb callback. When this flag is set - * in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL. - */ - UDP_MMSG_FREE UdpFlags = 16 - /* - * Indicates if IP_RECVERR/IPV6_RECVERR will be set when binding the handle. - * This sets IP_RECVERR for IPv4 and IPV6_RECVERR for IPv6 UDP sockets on - * Linux. This stops the Linux kernel from suppressing some ICMP error - * messages and enables full ICMP error reporting for faster failover. - * This flag is no-op on platforms other than Linux. - */ - UDP_LINUX_RECVERR UdpFlags = 32 - /* - * Indicates that recvmmsg should be used, if available. - */ - UDP_RECVMMSG UdpFlags = 256 -) - -type TcpFlags c.Int - -type UdpFlags c.Int - -// ---------------------------------------------- - -/* Handle types. */ - -// TODO(spongehah): Handle -type Handle struct { - Data c.Pointer - Unused [88]byte -} - -// TODO(spongehah): Stream -type Stream struct { - Data c.Pointer - Unused [256]byte -} - -// TODO(spongehah): Tcp -type Tcp struct { - Data c.Pointer - Unused [256]byte -} - -// TODO(spongehah): Udp -type Udp struct { - Unused [224]byte -} - -/* Request types. */ - -// TODO(spongehah): Req -type Req struct { - Unused [64]byte -} - -// TODO(spongehah): UdpSend -type UdpSend struct { - Unused [320]byte -} - -// TODO(spongehah): Write -type Write struct { - Data c.Pointer - Unused [184]byte -} - -// TODO(spongehah): Connect -type Connect struct { - Data c.Pointer - Unused [88]byte -} - -// TODO(spongehah): GetAddrInfo -type GetAddrInfo struct { - Unused [160]byte -} - -// TODO(spongehah): GetNameInfo -type GetNameInfo struct { - Unused [1320]byte -} - -// TODO(spongehah): Shutdown -type Shutdown struct { - Unused [80]byte -} - -// ---------------------------------------------- - -/* Function type */ - -// llgo:type C -type CloseCb func(handle *Handle) - -// llgo:type C -type ConnectCb func(req *Connect, status c.Int) - -// llgo:type C -type UdpSendCb func(req *UdpSend, status c.Int) - -// llgo:type C -type UdpRecvCb func(handle *Udp, nread c.Long, buf *Buf, addr *net.SockAddr, flags c.Uint) - -// llgo:type C -type ReadCb func(stream *Stream, nread c.Long, buf *Buf) - -// llgo:type C -type WriteCb func(req *Write, status c.Int) - -// llgo:type C -type ConnectionCb func(server *Stream, status c.Int) - -// llgo:type C -type ShutdownCb func(req *Shutdown, status c.Int) - -// ---------------------------------------------- - -/* Handle related function and method */ - -//go:linkname HandleSize C.uv_handle_size -func HandleSize(handleType HandleType) uintptr - -//go:linkname HandleTypeName C.uv_handle_type_name -func HandleTypeName(handleType HandleType) *c.Char - -// llgo:link (*Handle).Ref C.uv_ref -func (handle *Handle) Ref() {} - -// llgo:link (*Handle).Unref C.uv_unref -func (handle *Handle) Unref() {} - -// llgo:link (*Handle).HasRef C.uv_has_ref -func (handle *Handle) HasRef() c.Int { - return 0 -} - -// llgo:link (*Handle).GetType C.uv_handle_get_type -func (handle *Handle) GetType() HandleType { - return 0 -} - -// llgo:link (*Handle).GetData C.uv_handle_get_data -func (handle *Handle) GetData() c.Pointer { - return nil -} - -// llgo:link (*Handle).GetLoop C.uv_handle_get_loop -func (handle *Handle) GetLoop() *Loop { - return nil -} - -// llgo:link (*Handle).SetData C.uv_handle_set_data -func (handle *Handle) SetData(data c.Pointer) {} - -// llgo:link (*Handle).IsActive C.uv_is_active -func (handle *Handle) IsActive() c.Int { - return 0 -} - -// llgo:link (*Handle).Close C.uv_close -func (handle *Handle) Close(closeCb CloseCb) {} - -// llgo:link (*Handle).SendBufferSize C.uv_send_buffer_size -func (handle *Handle) SendBufferSize(value *c.Int) c.Int { - return 0 -} - -// llgo:link (*Handle).RecvBufferSize C.uv_recv_buffer_size -func (handle *Handle) RecvBufferSize(value *c.Int) c.Int { - return 0 -} - -// llgo:link (*Handle).Fileno C.uv_fileno -func (handle *Handle) Fileno(fd *OsFd) c.Int { - return 0 -} - -// llgo:link (*Handle).IsClosing C.uv_is_closing -func (handle *Handle) IsClosing() c.Int { - return 0 -} - -// llgo:link (*Handle).IsReadable C.uv_is_readable -func (handle *Handle) IsReadable() c.Int { - return 0 -} - -// llgo:link (*Handle).IsWritable C.uv_is_writable -func (handle *Handle) IsWritable() c.Int { - return 0 -} - -//go:linkname Pipe C.uv_pipe -func Pipe(fds [2]File, readFlags c.Int, writeFlags c.Int) c.Int { - return 0 -} - -//go:linkname Socketpair C.uv_socketpair -func Socketpair(_type c.Int, protocol c.Int, socketVector [2]OsSock, flag0 c.Int, flag1 c.Int) c.Int { - return 0 -} - -// ---------------------------------------------- - -/* Req related function and method */ - -//go:linkname ReqSize C.uv_req_size -func ReqSize(reqType ReqType) uintptr - -//go:linkname TypeName C.uv_req_type_name -func TypeName(reqType ReqType) *c.Char - -// llgo:link (*Req).GetData C.uv_req_get_data -func (req *Req) GetData() c.Pointer { - return nil -} - -// llgo:link (*Req).SetData C.uv_req_set_data -func (req *Req) SetData(data c.Pointer) {} - -// llgo:link (*Req).GetType C.uv_req_get_type -func (req *Req) GetType() ReqType { - return 0 -} - -// llgo:link (*Req).Cancel C.uv_cancel -func (req *Req) Cancel() c.Int { - return 0 -} - -// ---------------------------------------------- - -/* Stream related function and method */ - -// llgo:link (*Stream).GetWriteQueueSize C.uv_stream_get_write_queue_size -func (stream *Stream) GetWriteQueueSize() uintptr { - return 0 -} - -// llgo:link (*Stream).Listen C.uv_listen -func (stream *Stream) Listen(backlog c.Int, connectionCb ConnectionCb) c.Int { - return 0 -} - -// llgo:link (*Stream).Accept C.uv_accept -func (server *Stream) Accept(client *Stream) c.Int { - return 0 -} - -// llgo:link (*Stream).StartRead C.uv_read_start -func (stream *Stream) StartRead(allocCb AllocCb, readCb ReadCb) c.Int { - return 0 -} - -// llgo:link (*Stream).StopRead C.uv_read_stop -func (stream *Stream) StopRead() c.Int { - return 0 -} - -// llgo:link (*Write).Write C.uv_write -func (req *Write) Write(stream *Stream, bufs *Buf, nbufs c.Uint, writeCb WriteCb) c.Int { - return 0 -} - -// llgo:link (*Write).Write2 C.uv_write2 -func (req *Write) Write2(stream *Stream, bufs *Buf, nbufs c.Uint, sendStream *Stream, writeCb WriteCb) c.Int { - return 0 -} - -// llgo:link (*Stream).TryWrite C.uv_try_write -func (stream *Stream) TryWrite(bufs *Buf, nbufs c.Uint) c.Int { - return 0 -} - -// llgo:link (*Stream).TryWrite2 C.uv_try_write2 -func (stream *Stream) TryWrite2(bufs *Buf, nbufs c.Uint, sendStream *Stream) c.Int { - return 0 -} - -// llgo:link (*Stream).IsReadable C.uv_is_readable -func (stream *Stream) IsReadable() c.Int { - return 0 -} - -// llgo:link (*Stream).IsWritable C.uv_is_writable -func (stream *Stream) IsWritable() c.Int { - return 0 -} - -// llgo:link (*Stream).SetBlocking C.uv_stream_set_blocking -func (stream *Stream) SetBlocking(blocking c.Int) c.Int { - return 0 -} - -//go:linkname StreamShutdown C.uv_shutdown -func StreamShutdown(shutdown *Shutdown, stream *Stream, shutdownCb ShutdownCb) c.Int { - return 0 -} - -// ---------------------------------------------- - -/* Tcp related function and method */ - -//go:linkname InitTcp C.uv_tcp_init -func InitTcp(loop *Loop, tcp *Tcp) c.Int - -//go:linkname InitTcpEx C.uv_tcp_init_ex -func InitTcpEx(loop *Loop, tcp *Tcp, flags c.Uint) c.Int - -// llgo:link (*Tcp).Open C.uv_tcp_open -func (tcp *Tcp) Open(sock OsSock) c.Int { - return 0 -} - -// llgo:link (*Tcp).Nodelay C.uv_tcp_nodelay -func (tcp *Tcp) Nodelay(enable c.Int) c.Int { - return 0 -} - -// llgo:link (*Tcp).KeepAlive C.uv_tcp_keepalive -func (tcp *Tcp) KeepAlive(enable c.Int, delay c.Uint) c.Int { - return 0 -} - -// llgo:link (*Tcp).SimultaneousAccepts C.uv_tcp_simultaneous_accepts -func (tcp *Tcp) SimultaneousAccepts(enable c.Int) c.Int { - return 0 -} - -// llgo:link (*Tcp).Bind C.uv_tcp_bind -func (tcp *Tcp) Bind(addr *net.SockAddr, flags c.Uint) c.Int { - return 0 -} - -// llgo:link (*Tcp).Getsockname C.uv_tcp_getsockname -func (tcp *Tcp) Getsockname(name *net.SockAddr, nameLen *c.Int) c.Int { - return 0 -} - -// llgo:link (*Tcp).Getpeername C.uv_tcp_getpeername -func (tcp *Tcp) Getpeername(name *net.SockAddr, nameLen *c.Int) c.Int { - return 0 -} - -// llgo:link (*Tcp).CloseReset C.uv_tcp_close_reset -func (tcp *Tcp) CloseReset(closeCb CloseCb) c.Int { - return 0 -} - -// llgo:link (*Tcp).GetIoWatcherFd C.uv_tcp_get_io_watcher_fd -func (tcp *Tcp) GetIoWatcherFd() c.Int { - return 0 -} - -//go:linkname TcpConnect C.uv_tcp_connect -func TcpConnect(req *Connect, tcp *Tcp, addr *net.SockAddr, connectCb ConnectCb) c.Int - -// ---------------------------------------------- - -/* Udp related function and method */ - -//go:linkname InitUdp C.uv_udp_init -func InitUdp(loop *Loop, udp *Udp) c.Int - -//go:linkname InitUdpEx C.uv_udp_init_ex -func InitUdpEx(loop *Loop, udp *Udp, flags c.Uint) c.Int - -// llgo:link (*Udp).Open C.uv_udp_open -func (udp *Udp) Open(sock OsSock) c.Int { - return 0 -} - -// llgo:link (*Udp).Bind C.uv_udp_bind -func (udp *Udp) Bind(addr *net.SockAddr, flags c.Uint) c.Int { - return 0 -} - -// llgo:link (*Udp).Connect C.uv_udp_connect -func (udp *Udp) Connect(addr *net.SockAddr) c.Int { - return 0 -} - -// llgo:link (*Udp).Getpeername C.uv_udp_getpeername -func (udp *Udp) Getpeername(name *net.SockAddr, nameLen *c.Int) c.Int { - return 0 -} - -// llgo:link (*Udp).Getsockname C.uv_udp_getsockname -func (udp *Udp) Getsockname(name *net.SockAddr, nameLen *c.Int) c.Int { - return 0 -} - -// llgo:link (*Udp).SetMembership C.uv_udp_set_membership -func (udp *Udp) SetMembership(multicastAddr *c.Char, interfaceAddr *c.Char, membership Membership) c.Int { - return 0 -} - -// llgo:link (*Udp).SourceMembership C.uv_udp_set_source_membership -func (udp *Udp) SourceMembership(multicastAddr *c.Char, interfaceAddr *c.Char, sourceAddr *c.Char, membership Membership) c.Int { - return 0 -} - -// llgo:link (*Udp).SetMulticastLoop C.uv_udp_set_multicast_loop -func (udp *Udp) SetMulticastLoop(on c.Int) c.Int { - return 0 -} - -// llgo:link (*Udp).SetMulticastTTL C.uv_udp_set_multicast_ttl -func (udp *Udp) SetMulticastTTL(ttl c.Int) c.Int { - return 0 -} - -// llgo:link (*Udp).SetMulticastInterface C.uv_udp_set_multicast_interface -func (udp *Udp) SetMulticastInterface(interfaceAddr *c.Char) c.Int { - return 0 -} - -// llgo:link (*Udp).SetBroadcast C.uv_udp_set_broadcast -func (udp *Udp) SetBroadcast(on c.Int) c.Int { - return 0 -} - -// llgo:link (*Udp).SetTTL C.uv_udp_set_ttl -func (udp *Udp) SetTTL(ttl c.Int) c.Int { - return 0 -} - -// llgo:link (*Udp).TrySend C.uv_udp_try_send -func (udp *Udp) TrySend(bufs *Buf, nbufs c.Uint, addr *net.SockAddr) c.Int { - return 0 -} - -// llgo:link (*Udp).StartRecv C.uv_udp_recv_start -func (udp *Udp) StartRecv(allocCb AllocCb, recvCb UdpRecvCb) c.Int { - return 0 -} - -// llgo:link (*Udp).UsingRecvmmsg C.uv_udp_using_recvmmsg -func (udp *Udp) UsingRecvmmsg() c.Int { - return 0 -} - -// llgo:link (*Udp).StopRecv C.uv_udp_recv_stop -func (udp *Udp) StopRecv() c.Int { - return 0 -} - -// llgo:link (*Udp).GetSendQueueSize C.uv_udp_get_send_queue_size -func (udp *Udp) GetSendQueueSize() uintptr { - return 0 -} - -// llgo:link (*Udp).GetSendQueueCount C.uv_udp_get_send_queue_count -func (udp *Udp) GetSendQueueCount() uintptr { - return 0 -} - -//go:linkname Send C.uv_udp_send -func Send(req *UdpSend, udp *Udp, bufs *Buf, nbufs c.Uint, addr *net.SockAddr, sendCb UdpSendCb) c.Int - -// ---------------------------------------------- - -/* DNS related function and method */ - -//go:linkname Ip4Addr C.uv_ip4_addr -func Ip4Addr(ip *c.Char, port c.Int, addr *net.SockaddrIn) c.Int - -//go:linkname Ip6Addr C.uv_ip6_addr -func Ip6Addr(ip *c.Char, port c.Int, addr *net.SockaddrIn6) c.Int - -//go:linkname Ip4Name C.uv_ip4_name -func Ip4Name(src *net.SockaddrIn, dst *c.Char, size uintptr) c.Int - -//go:linkname Ip6Name C.uv_ip6_name -func Ip6Name(src *net.SockaddrIn6, dst *c.Char, size uintptr) c.Int - -//go:linkname IpName C.uv_ip_name -func IpName(src *net.SockAddr, dst *c.Char, size uintptr) c.Int - -//go:linkname InetNtop C.uv_inet_ntop -func InetNtop(af c.Int, src c.Pointer, dst *c.Char, size uintptr) c.Int - -//go:linkname InetPton C.uv_inet_pton -func InetPton(af c.Int, src *c.Char, dst c.Pointer) c.Int - -// ---------------------------------------------- - -/* Getaddrinfo related function and method */ - -//go:linkname Getaddrinfo C.uv_getaddrinfo -func Getaddrinfo(loop *Loop, req *GetAddrInfo, getaddrinfoCb GetaddrinfoCb, node *c.Char, service *c.Char, hints *net.AddrInfo) c.Int - -//go:linkname Freeaddrinfo C.uv_freeaddrinfo -func Freeaddrinfo(addrInfo *net.AddrInfo) - -// ---------------------------------------------- - -/* Getnameinfo related function and method */ - -//go:linkname Getnameinfo C.uv_getnameinfo -func Getnameinfo(loop *Loop, req *GetNameInfo, getnameinfoCb GetnameinfoCb, addr *net.SockAddr, flags c.Int) c.Int diff --git a/c/libuv/signal.go b/c/libuv/signal.go deleted file mode 100644 index 3425acb8..00000000 --- a/c/libuv/signal.go +++ /dev/null @@ -1,42 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -/* Handle types. */ - -type Signal struct { - Unused [152]byte -} - -// ---------------------------------------------- - -/* Function type */ - -// llgo:type C -type SignalCb func(handle *Signal, sigNum c.Int) - -// ---------------------------------------------- - -/* Signal related functions and method. */ - -//go:linkname SignalInit C.uv_signal_init -func SignalInit(loop *Loop, handle *Signal) c.Int - -// llgo:link (*Signal).Start C.uv_signal_start -func (handle *Signal) Start(cb SignalCb, signum c.Int) c.Int { - return 0 -} - -// llgo:link (*Signal).StartOneshot C.uv_signal_start_oneshot -func (handle *Signal) StartOneshot(cb SignalCb, signum c.Int) c.Int { - return 0 -} - -// llgo:link (*Signal).Stop C.uv_signal_stop -func (handle *Signal) Stop() c.Int { - return 0 -} diff --git a/c/libuv/thread.go b/c/libuv/thread.go deleted file mode 100644 index 9ba44553..00000000 --- a/c/libuv/thread.go +++ /dev/null @@ -1,78 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -type Thread struct { - Unused [8]byte -} - -type ThreadOptions struct { - flags c.Uint - stackSize uintptr -} - -type Work struct { - Unused [128]byte -} - -// ---------------------------------------------- - -/* Function type */ - -// llgo:type C -type ThreadCb func(arg c.Pointer) - -//llgo:type C -type WorkCb func(req *Work) - -//llgo:type C -type AfterWorkCb func(req *Work, status c.Int) - -// ---------------------------------------------- - -/* Thread related functions and method. */ - -//go:linkname ThreadEqual C.uv_thread_equal -func ThreadEqual(t1 *Thread, t2 *Thread) c.Int - -//go:linkname ThreadGetCPU C.uv_thread_getcpu -func ThreadGetCPU() c.Int - -//go:linkname ThreadSelf C.uv_thread_self -func ThreadSelf() Thread - -// llgo:link (*Thread).Create C.uv_thread_create -func (t *Thread) Create(entry ThreadCb, arg c.Pointer) c.Int { - return 0 -} - -// llgo:link (*Thread).CreateEx C.uv_thread_create_ex -func (t *Thread) CreateEx(entry ThreadCb, params *ThreadOptions, arg c.Pointer) c.Int { - return 0 -} - -// llgo:link (*Thread).Join C.uv_thread_join -func (t *Thread) Join() c.Int { - return 0 -} - -// llgo:link (*Thread).SetAffinity C.uv_thread_set_affinity -func (t *Thread) SetAffinity(cpuMask *c.Char, oldMask *c.Char, maskSize uintptr) c.Int { - return 0 -} - -// llgo:link (*Thread).GetAffinity C.uv_thread_get_affinity -func (t *Thread) GetAffinity(cpuMask *c.Char, maskSize uintptr) c.Int { - return 0 -} - -// ---------------------------------------------- - -/* Work related functions and method. */ - -//go:linkname QueueWork C.uv_queue_work -func QueueWork(loop *Loop, req *Work, workCb WorkCb, afterWorkCb AfterWorkCb) c.Int diff --git a/c/libuv/timer.go b/c/libuv/timer.go deleted file mode 100644 index 566d9a22..00000000 --- a/c/libuv/timer.go +++ /dev/null @@ -1,56 +0,0 @@ -package libuv - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// ---------------------------------------------- - -/* Handle types. */ - -// TODO(spongehah): Timer -type Timer struct { - Unused [152]byte -} - -// ---------------------------------------------- - -// llgo:type C -type TimerCb func(timer *Timer) - -// ---------------------------------------------- - -/* Timer related function and method */ - -//go:linkname InitTimer C.uv_timer_init -func InitTimer(loop *Loop, timer *Timer) c.Int - -// llgo:link (*Timer).Start C.uv_timer_start -func (timer *Timer) Start(cb TimerCb, timeoutMs uint64, repeat uint64) c.Int { - return 0 -} - -// llgo:link (*Timer).Stop C.uv_timer_stop -func (timer *Timer) Stop() c.Int { - return 0 -} - -// llgo:link (*Timer).Again C.uv_timer_again -func (timer *Timer) Again() c.Int { - return 0 -} - -// llgo:link (*Timer).SetRepeat C.uv_timer_set_repeat -func (timer *Timer) SetRepeat(repeat uint64) {} - -// llgo:link (*Timer).GetRepeat C.uv_timer_get_repeat -func (timer *Timer) GetRepeat() uint64 { - return 0 -} - -// llgo:link (*Timer).GetDueIn C.uv_timer_get_due_in -func (timer *Timer) GetDueIn() uint64 { - return 0 -} diff --git a/c/llama2/.gitignore b/c/llama2/.gitignore deleted file mode 100644 index 1eab1ce5..00000000 --- a/c/llama2/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -stories*.bin -.DS_Store -err.log - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out -*.swp - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work* diff --git a/c/llama2/README.md b/c/llama2/README.md deleted file mode 100644 index 1fd624a1..00000000 --- a/c/llama2/README.md +++ /dev/null @@ -1,10 +0,0 @@ -LLGo wrapper of karpathy/llama2.c -===== - -## How to update source to llgo - -``` -git submodule init -git submodule update -cp llama2.c/run.c llama2/run.c -``` diff --git a/c/llama2/llama2.c b/c/llama2/llama2.c deleted file mode 160000 index b3c4b6c3..00000000 --- a/c/llama2/llama2.c +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b3c4b6c3c4bbff42e5211293280307019368ccb5 diff --git a/c/llama2/llama2.go b/c/llama2/llama2.go deleted file mode 100644 index cb0d65be..00000000 --- a/c/llama2/llama2.go +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package llama2 - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoFiles = "llama2/llama2.c" - LLGoPackage = "link: -lm" -) - -// ----------------------------------------------------------------------------- - -// llgo:type C -type TokenIndex struct { - Str *c.Char - Id c.Int -} - -// llgo:type C -type Tokenizer struct { - Vocab **c.Char - VocabScores *c.Float - SortedVocab *TokenIndex - VocabSize c.Int - MaxTokenLength c.Uint - BytePieces [512]uint8 // stores all single-byte strings -} - -//go:linkname BuildTokenizer C.build_tokenizer -func BuildTokenizer(t *Tokenizer, tokenizerPath *c.Char, vocabSize c.Int) - -//go:linkname FreeTokenizer C.free_tokenizer -func FreeTokenizer(t *Tokenizer) - -// ----------------------------------------------------------------------------- - -// llgo:type C -type Config struct { - Dim c.Int // transformer dimension - HiddenDim c.Int // for ffn layers - NLayers c.Int // number of layers - NHeads c.Int // number of query heads - NKVHeads c.Int // number of key/value heads (can be < query heads because of multiquery) - VocabSize c.Int // vocabulary size, usually 256 (byte-level) - SeqLen c.Int // max sequence length -} - -// llgo:type C -type TransformerWeights struct { - // token embedding table - TokenEmbeddingTable *c.Float // (vocab_size, dim) - // weights for rmsnorms - RmsAttWeight *c.Float // (layer, dim) rmsnorm weights - RmsFfnWeight *c.Float // (layer, dim) - // weights for matmuls. note dim == n_heads * head_size - Wq *c.Float // (layer, dim, n_heads * head_size) - Wk *c.Float // (layer, dim, n_kv_heads * head_size) - Wv *c.Float // (layer, dim, n_kv_heads * head_size) - Wo *c.Float // (layer, n_heads * head_size, dim) - // weights for ffn - W1 *c.Float // (layer, hidden_dim, dim) - W2 *c.Float // (layer, dim, hidden_dim) - W3 *c.Float // (layer, hidden_dim, dim) - // final rmsnorm - RmsFinalWeight *c.Float // (dim,) - // (optional) classifier weights for the logits, on the last layer - Wcls *c.Float -} - -// llgo:type C -type RunState struct { - // current wave of activations - X *c.Float // activation at current time stamp (dim,) - Xb *c.Float // same, but inside a residual branch (dim,) - Xb2 *c.Float // an additional buffer just for convenience (dim,) - Hb *c.Float // buffer for hidden dimension in the ffn (hidden_dim,) - Hb2 *c.Float // buffer for hidden dimension in the ffn (hidden_dim,) - Q *c.Float // query (dim,) - K *c.Float // key (dim,) - V *c.Float // value (dim,) - Att *c.Float // buffer for scores/attention values (n_heads, seq_len) - Logits *c.Float // output logits - // kv cache - KeyCache *c.Float // (layer, seq_len, dim) - ValueCache *c.Float // (layer, seq_len, dim) -} - -// llgo:type C -type Transformer struct { - Config Config // the hyperparameters of the architecture (the blueprint) - Weights TransformerWeights // the weights of the model - State RunState // buffers for the "wave" of activations in the forward pass - - // some more state needed to properly clean up the memory mapping (sigh) - Fd c.Int // file descriptor for memory mapping - Data *c.Float // memory mapped data pointer - FileSize uintptr // size of the checkpoint file in bytes -} - -//go:linkname BuildTransformer C.build_transformer -func BuildTransformer(t *Transformer, checkpointPath *c.Char) - -//go:linkname FreeTransformer C.free_transformer -func FreeTransformer(t *Transformer) - -// ----------------------------------------------------------------------------- - -// llgo:type C -type ProbIndex struct { - Prob c.Float - Index c.Int -} // struct used when sorting probabilities during top-p sampling - -// llgo:type C -type Sampler struct { - VocabSize c.Int - Probindex *ProbIndex // buffer used in top-p sampling - Temperature c.Float - Topp c.Float - RngState uint64 -} - -//go:linkname BuildSampler C.build_sampler -func BuildSampler(sampler *Sampler, vocabSize c.Int, temperature c.Float, topp c.Float, rngSeed uint64) - -//go:linkname FreeSampler C.free_sampler -func FreeSampler(sampler *Sampler) - -// ----------------------------------------------------------------------------- - -//go:linkname Generate C.generate -func Generate( - transformer *Transformer, tokenizer *Tokenizer, sampler *Sampler, - prompt *c.Char, steps c.Int) - -//go:linkname Chat C.chat -func Chat( - transformer *Transformer, tokenizer *Tokenizer, sampler *Sampler, - cliUserPrompt *c.Char, cliSystemPrompt *c.Char, steps c.Int) - -// ----------------------------------------------------------------------------- diff --git a/c/llama2/llama2/llama2.c b/c/llama2/llama2/llama2.c deleted file mode 100644 index 8a93d945..00000000 --- a/c/llama2/llama2/llama2.c +++ /dev/null @@ -1,2 +0,0 @@ -#define TESTING -#include "./run.c" diff --git a/c/llama2/llama2/run.c b/c/llama2/llama2/run.c deleted file mode 100644 index 2fcd687a..00000000 --- a/c/llama2/llama2/run.c +++ /dev/null @@ -1,973 +0,0 @@ -/* Inference for Llama-2 Transformer model in pure C */ - -#include -#include -#include -#include -#include -#include -#include -#if defined _WIN32 - #include "win.h" -#else - #include - #include -#endif -// ---------------------------------------------------------------------------- -// Transformer model - -typedef struct { - int dim; // transformer dimension - int hidden_dim; // for ffn layers - int n_layers; // number of layers - int n_heads; // number of query heads - int n_kv_heads; // number of key/value heads (can be < query heads because of multiquery) - int vocab_size; // vocabulary size, usually 256 (byte-level) - int seq_len; // max sequence length -} Config; - -typedef struct { - // token embedding table - float* token_embedding_table; // (vocab_size, dim) - // weights for rmsnorms - float* rms_att_weight; // (layer, dim) rmsnorm weights - float* rms_ffn_weight; // (layer, dim) - // weights for matmuls. note dim == n_heads * head_size - float* wq; // (layer, dim, n_heads * head_size) - float* wk; // (layer, dim, n_kv_heads * head_size) - float* wv; // (layer, dim, n_kv_heads * head_size) - float* wo; // (layer, n_heads * head_size, dim) - // weights for ffn - float* w1; // (layer, hidden_dim, dim) - float* w2; // (layer, dim, hidden_dim) - float* w3; // (layer, hidden_dim, dim) - // final rmsnorm - float* rms_final_weight; // (dim,) - // (optional) classifier weights for the logits, on the last layer - float* wcls; -} TransformerWeights; - -typedef struct { - // current wave of activations - float *x; // activation at current time stamp (dim,) - float *xb; // same, but inside a residual branch (dim,) - float *xb2; // an additional buffer just for convenience (dim,) - float *hb; // buffer for hidden dimension in the ffn (hidden_dim,) - float *hb2; // buffer for hidden dimension in the ffn (hidden_dim,) - float *q; // query (dim,) - float *k; // key (dim,) - float *v; // value (dim,) - float *att; // buffer for scores/attention values (n_heads, seq_len) - float *logits; // output logits - // kv cache - float* key_cache; // (layer, seq_len, dim) - float* value_cache; // (layer, seq_len, dim) -} RunState; - -typedef struct { - Config config; // the hyperparameters of the architecture (the blueprint) - TransformerWeights weights; // the weights of the model - RunState state; // buffers for the "wave" of activations in the forward pass - // some more state needed to properly clean up the memory mapping (sigh) - int fd; // file descriptor for memory mapping - float* data; // memory mapped data pointer - ssize_t file_size; // size of the checkpoint file in bytes -} Transformer; - -void malloc_run_state(RunState* s, Config* p) { - // we calloc instead of malloc to keep valgrind happy - int kv_dim = (p->dim * p->n_kv_heads) / p->n_heads; - s->x = calloc(p->dim, sizeof(float)); - s->xb = calloc(p->dim, sizeof(float)); - s->xb2 = calloc(p->dim, sizeof(float)); - s->hb = calloc(p->hidden_dim, sizeof(float)); - s->hb2 = calloc(p->hidden_dim, sizeof(float)); - s->q = calloc(p->dim, sizeof(float)); - s->key_cache = calloc(p->n_layers * p->seq_len * kv_dim, sizeof(float)); - s->value_cache = calloc(p->n_layers * p->seq_len * kv_dim, sizeof(float)); - s->att = calloc(p->n_heads * p->seq_len, sizeof(float)); - s->logits = calloc(p->vocab_size, sizeof(float)); - // ensure all mallocs went fine - if (!s->x || !s->xb || !s->xb2 || !s->hb || !s->hb2 || !s->q - || !s->key_cache || !s->value_cache || !s->att || !s->logits) { - fprintf(stderr, "malloc failed!\n"); - exit(EXIT_FAILURE); - } -} - -void free_run_state(RunState* s) { - free(s->x); - free(s->xb); - free(s->xb2); - free(s->hb); - free(s->hb2); - free(s->q); - free(s->att); - free(s->logits); - free(s->key_cache); - free(s->value_cache); -} - -void memory_map_weights(TransformerWeights *w, Config* p, float* ptr, int shared_weights) { - int head_size = p->dim / p->n_heads; - // make sure the multiplications below are done in 64bit to fit the parameter counts of 13B+ models - unsigned long long n_layers = p->n_layers; - w->token_embedding_table = ptr; - ptr += p->vocab_size * p->dim; - w->rms_att_weight = ptr; - ptr += n_layers * p->dim; - w->wq = ptr; - ptr += n_layers * p->dim * (p->n_heads * head_size); - w->wk = ptr; - ptr += n_layers * p->dim * (p->n_kv_heads * head_size); - w->wv = ptr; - ptr += n_layers * p->dim * (p->n_kv_heads * head_size); - w->wo = ptr; - ptr += n_layers * (p->n_heads * head_size) * p->dim; - w->rms_ffn_weight = ptr; - ptr += n_layers * p->dim; - w->w1 = ptr; - ptr += n_layers * p->dim * p->hidden_dim; - w->w2 = ptr; - ptr += n_layers * p->hidden_dim * p->dim; - w->w3 = ptr; - ptr += n_layers * p->dim * p->hidden_dim; - w->rms_final_weight = ptr; - ptr += p->dim; - ptr += p->seq_len * head_size / 2; // skip what used to be freq_cis_real (for RoPE) - ptr += p->seq_len * head_size / 2; // skip what used to be freq_cis_imag (for RoPE) - w->wcls = shared_weights ? w->token_embedding_table : ptr; -} - -void read_checkpoint(char* checkpoint, Config* config, TransformerWeights* weights, - int* fd, float** data, ssize_t* file_size) { - FILE *file = fopen(checkpoint, "rb"); - if (!file) { fprintf(stderr, "Couldn't open file %s\n", checkpoint); exit(EXIT_FAILURE); } - // read in the config header - if (fread(config, sizeof(Config), 1, file) != 1) { exit(EXIT_FAILURE); } - // negative vocab size is hacky way of signaling unshared weights. bit yikes. - int shared_weights = config->vocab_size > 0 ? 1 : 0; - config->vocab_size = abs(config->vocab_size); - // figure out the file size - fseek(file, 0, SEEK_END); // move file pointer to end of file - *file_size = ftell(file); // get the file size, in bytes - fclose(file); - // memory map the Transformer weights into the data pointer - *fd = open(checkpoint, O_RDONLY); // open in read only mode - if (*fd == -1) { fprintf(stderr, "open failed!\n"); exit(EXIT_FAILURE); } - *data = mmap(NULL, *file_size, PROT_READ, MAP_PRIVATE, *fd, 0); - if (*data == MAP_FAILED) { fprintf(stderr, "mmap failed!\n"); exit(EXIT_FAILURE); } - float* weights_ptr = *data + sizeof(Config)/sizeof(float); - memory_map_weights(weights, config, weights_ptr, shared_weights); -} - -void build_transformer(Transformer *t, char* checkpoint_path) { - // read in the Config and the Weights from the checkpoint - read_checkpoint(checkpoint_path, &t->config, &t->weights, &t->fd, &t->data, &t->file_size); - // allocate the RunState buffers - malloc_run_state(&t->state, &t->config); -} - -void free_transformer(Transformer* t) { - // close the memory mapping - if (t->data != MAP_FAILED) { munmap(t->data, t->file_size); } - if (t->fd != -1) { close(t->fd); } - // free the RunState buffers - free_run_state(&t->state); -} - -// ---------------------------------------------------------------------------- -// neural net blocks; the dynamics of the Transformer - -void rmsnorm(float* o, float* x, float* weight, int size) { - // calculate sum of squares - float ss = 0.0f; - for (int j = 0; j < size; j++) { - ss += x[j] * x[j]; - } - ss /= size; - ss += 1e-5f; - ss = 1.0f / sqrtf(ss); - // normalize and scale - for (int j = 0; j < size; j++) { - o[j] = weight[j] * (ss * x[j]); - } -} - -void softmax(float* x, int size) { - // find max value (for numerical stability) - float max_val = x[0]; - for (int i = 1; i < size; i++) { - if (x[i] > max_val) { - max_val = x[i]; - } - } - // exp and sum - float sum = 0.0f; - for (int i = 0; i < size; i++) { - x[i] = expf(x[i] - max_val); - sum += x[i]; - } - // normalize - for (int i = 0; i < size; i++) { - x[i] /= sum; - } -} - -void matmul(float* xout, float* x, float* w, int n, int d) { - // W (d,n) @ x (n,) -> xout (d,) - // by far the most amount of time is spent inside this little function - int i; - #pragma omp parallel for private(i) - for (i = 0; i < d; i++) { - float val = 0.0f; - for (int j = 0; j < n; j++) { - val += w[i * n + j] * x[j]; - } - xout[i] = val; - } -} - -float* forward(Transformer* transformer, int token, int pos) { - - // a few convenience variables - Config* p = &transformer->config; - TransformerWeights* w = &transformer->weights; - RunState* s = &transformer->state; - float *x = s->x; - int dim = p->dim; - int kv_dim = (p->dim * p->n_kv_heads) / p->n_heads; - int kv_mul = p->n_heads / p->n_kv_heads; // integer multiplier of the kv sharing in multiquery - int hidden_dim = p->hidden_dim; - int head_size = dim / p->n_heads; - - // copy the token embedding into x - float* content_row = w->token_embedding_table + token * dim; - memcpy(x, content_row, dim*sizeof(*x)); - - // forward all the layers - for(unsigned long long l = 0; l < p->n_layers; l++) { - - // attention rmsnorm - rmsnorm(s->xb, x, w->rms_att_weight + l*dim, dim); - - // key and value point to the kv cache - int loff = l * p->seq_len * kv_dim; // kv cache layer offset for convenience - s->k = s->key_cache + loff + pos * kv_dim; - s->v = s->value_cache + loff + pos * kv_dim; - - // qkv matmuls for this position - matmul(s->q, s->xb, w->wq + l*dim*dim, dim, dim); - matmul(s->k, s->xb, w->wk + l*dim*kv_dim, dim, kv_dim); - matmul(s->v, s->xb, w->wv + l*dim*kv_dim, dim, kv_dim); - - // RoPE relative positional encoding: complex-valued rotate q and k in each head - for (int i = 0; i < dim; i+=2) { - int head_dim = i % head_size; - float freq = 1.0f / powf(10000.0f, head_dim / (float)head_size); - float val = pos * freq; - float fcr = cosf(val); - float fci = sinf(val); - int rotn = i < kv_dim ? 2 : 1; // how many vectors? 2 = q & k, 1 = q only - for (int v = 0; v < rotn; v++) { - float* vec = v == 0 ? s->q : s->k; // the vector to rotate (query or key) - float v0 = vec[i]; - float v1 = vec[i+1]; - vec[i] = v0 * fcr - v1 * fci; - vec[i+1] = v0 * fci + v1 * fcr; - } - } - - // multihead attention. iterate over all heads - int h; - #pragma omp parallel for private(h) - for (h = 0; h < p->n_heads; h++) { - // get the query vector for this head - float* q = s->q + h * head_size; - // attention scores for this head - float* att = s->att + h * p->seq_len; - // iterate over all timesteps, including the current one - for (int t = 0; t <= pos; t++) { - // get the key vector for this head and at this timestep - float* k = s->key_cache + loff + t * kv_dim + (h / kv_mul) * head_size; - // calculate the attention score as the dot product of q and k - float score = 0.0f; - for (int i = 0; i < head_size; i++) { - score += q[i] * k[i]; - } - score /= sqrtf(head_size); - // save the score to the attention buffer - att[t] = score; - } - - // softmax the scores to get attention weights, from 0..pos inclusively - softmax(att, pos + 1); - - // weighted sum of the values, store back into xb - float* xb = s->xb + h * head_size; - memset(xb, 0, head_size * sizeof(float)); - for (int t = 0; t <= pos; t++) { - // get the value vector for this head and at this timestep - float* v = s->value_cache + loff + t * kv_dim + (h / kv_mul) * head_size; - // get the attention weight for this timestep - float a = att[t]; - // accumulate the weighted value into xb - for (int i = 0; i < head_size; i++) { - xb[i] += a * v[i]; - } - } - } - - // final matmul to get the output of the attention - matmul(s->xb2, s->xb, w->wo + l*dim*dim, dim, dim); - - // residual connection back into x - for (int i = 0; i < dim; i++) { - x[i] += s->xb2[i]; - } - - // ffn rmsnorm - rmsnorm(s->xb, x, w->rms_ffn_weight + l*dim, dim); - - // Now for FFN in PyTorch we have: self.w2(F.silu(self.w1(x)) * self.w3(x)) - // first calculate self.w1(x) and self.w3(x) - matmul(s->hb, s->xb, w->w1 + l*dim*hidden_dim, dim, hidden_dim); - matmul(s->hb2, s->xb, w->w3 + l*dim*hidden_dim, dim, hidden_dim); - - // SwiGLU non-linearity - for (int i = 0; i < hidden_dim; i++) { - float val = s->hb[i]; - // silu(x)=x*σ(x), where σ(x) is the logistic sigmoid - val *= (1.0f / (1.0f + expf(-val))); - // elementwise multiply with w3(x) - val *= s->hb2[i]; - s->hb[i] = val; - } - - // final matmul to get the output of the ffn - matmul(s->xb, s->hb, w->w2 + l*dim*hidden_dim, hidden_dim, dim); - - // residual connection - for (int i = 0; i < dim; i++) { - x[i] += s->xb[i]; - } - } - - // final rmsnorm - rmsnorm(x, x, w->rms_final_weight, dim); - - // classifier into logits - matmul(s->logits, x, w->wcls, p->dim, p->vocab_size); - return s->logits; -} - -// ---------------------------------------------------------------------------- -// The Byte Pair Encoding (BPE) Tokenizer that translates strings <-> tokens - -typedef struct { - char *str; - int id; -} TokenIndex; - -typedef struct { - char** vocab; - float* vocab_scores; - TokenIndex *sorted_vocab; - int vocab_size; - unsigned int max_token_length; - unsigned char byte_pieces[512]; // stores all single-byte strings -} Tokenizer; - -int compare_tokens(const void *a, const void *b) { - return strcmp(((TokenIndex*)a)->str, ((TokenIndex*)b)->str); -} - -void build_tokenizer(Tokenizer* t, char* tokenizer_path, int vocab_size) { - // i should have written the vocab_size into the tokenizer file... sigh - t->vocab_size = vocab_size; - // malloc space to hold the scores and the strings - t->vocab = (char**)malloc(vocab_size * sizeof(char*)); - t->vocab_scores = (float*)malloc(vocab_size * sizeof(float)); - t->sorted_vocab = NULL; // initialized lazily - for (int i = 0; i < 256; i++) { - t->byte_pieces[i * 2] = (unsigned char)i; - t->byte_pieces[i * 2 + 1] = '\0'; - } - // read in the file - FILE *file = fopen(tokenizer_path, "rb"); - if (!file) { fprintf(stderr, "couldn't load %s\n", tokenizer_path); exit(EXIT_FAILURE); } - if (fread(&t->max_token_length, sizeof(int), 1, file) != 1) { fprintf(stderr, "failed read\n"); exit(EXIT_FAILURE); } - int len; - for (int i = 0; i < vocab_size; i++) { - if (fread(t->vocab_scores + i, sizeof(float), 1, file) != 1) { fprintf(stderr, "failed read\n"); exit(EXIT_FAILURE);} - if (fread(&len, sizeof(int), 1, file) != 1) { fprintf(stderr, "failed read\n"); exit(EXIT_FAILURE); } - t->vocab[i] = (char *)malloc(len + 1); - if (fread(t->vocab[i], len, 1, file) != 1) { fprintf(stderr, "failed read\n"); exit(EXIT_FAILURE); } - t->vocab[i][len] = '\0'; // add the string terminating token - } - fclose(file); -} - -void free_tokenizer(Tokenizer* t) { - for (int i = 0; i < t->vocab_size; i++) { free(t->vocab[i]); } - free(t->vocab); - free(t->vocab_scores); - free(t->sorted_vocab); -} - -char* decode(Tokenizer* t, int prev_token, int token) { - char *piece = t->vocab[token]; - // following BOS (1) token, sentencepiece decoder strips any leading whitespace (see PR #89) - if (prev_token == 1 && piece[0] == ' ') { piece++; } - // careful, some tokens designate raw bytes, and look like e.g. '<0x01>' - // parse this and convert and return the actual byte - unsigned char byte_val; - if (sscanf(piece, "<0x%02hhX>", &byte_val) == 1) { - piece = (char*)t->byte_pieces + byte_val * 2; - } - return piece; -} - -void safe_printf(char *piece) { - // piece might be a raw byte token, and we only want to print printable chars or whitespace - // because some of the other bytes can be various control codes, backspace, etc. - if (piece == NULL) { return; } - if (piece[0] == '\0') { return; } - if (piece[1] == '\0') { - unsigned char byte_val = piece[0]; - if (!(isprint(byte_val) || isspace(byte_val))) { - return; // bad byte, don't print it - } - } - printf("%s", piece); -} - -int str_lookup(char *str, TokenIndex *sorted_vocab, int vocab_size) { - // efficiently find the perfect match for str in vocab, return its index or -1 if not found - TokenIndex tok = { .str = str }; // acts as the key to search for - TokenIndex *res = bsearch(&tok, sorted_vocab, vocab_size, sizeof(TokenIndex), compare_tokens); - return res != NULL ? res->id : -1; -} - -void encode(Tokenizer* t, char *text, int8_t bos, int8_t eos, int *tokens, int *n_tokens) { - // encode the string text (input) into an upper-bound preallocated tokens[] array - // bos != 0 means prepend the BOS token (=1), eos != 0 means append the EOS token (=2) - if (text == NULL) { fprintf(stderr, "cannot encode NULL text\n"); exit(EXIT_FAILURE); } - - if (t->sorted_vocab == NULL) { - // lazily malloc and sort the vocabulary - t->sorted_vocab = malloc(t->vocab_size * sizeof(TokenIndex)); - for (int i = 0; i < t->vocab_size; i++) { - t->sorted_vocab[i].str = t->vocab[i]; - t->sorted_vocab[i].id = i; - } - qsort(t->sorted_vocab, t->vocab_size, sizeof(TokenIndex), compare_tokens); - } - - // create a temporary buffer that will store merge candidates of always two consecutive tokens - // *2 for concat, +1 for null terminator +2 for UTF8 (in case max_token_length is 1) - char* str_buffer = malloc((t->max_token_length*2 +1 +2) * sizeof(char)); - size_t str_len = 0; - - // start at 0 tokens - *n_tokens = 0; - - // add optional BOS (=1) token, if desired - if (bos) tokens[(*n_tokens)++] = 1; - - // add_dummy_prefix is true by default - // so prepend a dummy prefix token to the input string, but only if text != "" - // TODO: pretty sure this isn't correct in the general case but I don't have the - // energy to read more of the sentencepiece code to figure out what it's doing - if (text[0] != '\0') { - int dummy_prefix = str_lookup(" ", t->sorted_vocab, t->vocab_size); - tokens[(*n_tokens)++] = dummy_prefix; - } - - // Okay UTF-8 time. This will get messy. Here is the reference from Wikipedia: - // Code point ↔ UTF-8 conversion - // First code point Last code point Byte 1 Byte 2 Byte 3 Byte 4 - // U+0000 U+007F 0xxxxxxx - // U+0080 U+07FF 110xxxxx 10xxxxxx - // U+0800 U+FFFF 1110xxxx 10xxxxxx 10xxxxxx - // U+10000 U+10FFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - - // process the raw (UTF-8) byte sequence of the input string - for (char *c = text; *c != '\0'; c++) { - - // reset buffer if the current byte is ASCII or a leading byte - // 0xC0 is 11000000, so (*c & 0xC0) keeps the first 2 bits and zeros the rest - // 0x80 is 10000000 - // in UTF-8, all continuation bytes start with "10" in first two bits - // so in English this is: "if this byte is not a continuation byte" - if ((*c & 0xC0) != 0x80) { - // this byte must be either a leading byte (11...) or an ASCII char (0x...) - // => reset our location, as we're starting a new UTF-8 codepoint - str_len = 0; - } - - // append the current byte to the buffer - str_buffer[str_len++] = *c; // ++ is post-increment, incremented after this line - str_buffer[str_len] = '\0'; - - // while the next character is a continuation byte, continue appending - // but if there are too many of them, just stop to avoid overruning str_buffer size. - if ((*(c+1) & 0xC0) == 0x80 && str_len < 4) { - continue; - } - - // ok c+1 is not a continuation byte, so we've read in a full codepoint - int id = str_lookup(str_buffer, t->sorted_vocab, t->vocab_size); - - if (id != -1) { - // we found this codepoint in vocab, add it as a token - tokens[(*n_tokens)++] = id; - } else { - // byte_fallback encoding: just encode each byte as a token - // +3 is here because the first 3 vocab elements are , , - // so the individual bytes only start at index 3 - for (int i=0; i < str_len; i++) { - tokens[(*n_tokens)++] = (unsigned char)str_buffer[i] + 3; - } - } - str_len = 0; // protect against a sequence of stray UTF8 continuation bytes - } - - // merge the best consecutive pair each iteration, according the scores in vocab_scores - while (1) { - float best_score = -1e10; - int best_id = -1; - int best_idx = -1; - - for (int i=0; i < (*n_tokens-1); i++) { - // check if we can merge the pair (tokens[i], tokens[i+1]) - sprintf(str_buffer, "%s%s", t->vocab[tokens[i]], t->vocab[tokens[i+1]]); - int id = str_lookup(str_buffer, t->sorted_vocab, t->vocab_size); - if (id != -1 && t->vocab_scores[id] > best_score) { - // this merge pair exists in vocab! record its score and position - best_score = t->vocab_scores[id]; - best_id = id; - best_idx = i; - } - } - - if (best_idx == -1) { - break; // we couldn't find any more pairs to merge, so we're done - } - - // merge the consecutive pair (best_idx, best_idx+1) into new token best_id - tokens[best_idx] = best_id; - // delete token at position best_idx+1, shift the entire sequence back 1 - for (int i = best_idx+1; i < (*n_tokens-1); i++) { - tokens[i] = tokens[i+1]; - } - (*n_tokens)--; // token length decreased - } - - // add optional EOS (=2) token, if desired - if (eos) tokens[(*n_tokens)++] = 2; - - free(str_buffer); -} - -// ---------------------------------------------------------------------------- -// The Sampler, which takes logits and returns a sampled token -// sampling can be done in a few ways: greedy argmax, sampling, top-p sampling - -typedef struct { - float prob; - int index; -} ProbIndex; // struct used when sorting probabilities during top-p sampling - -typedef struct { - int vocab_size; - ProbIndex* probindex; // buffer used in top-p sampling - float temperature; - float topp; - unsigned long long rng_state; -} Sampler; - -int sample_argmax(float* probabilities, int n) { - // return the index that has the highest probability - int max_i = 0; - float max_p = probabilities[0]; - for (int i = 1; i < n; i++) { - if (probabilities[i] > max_p) { - max_i = i; - max_p = probabilities[i]; - } - } - return max_i; -} - -int sample_mult(float* probabilities, int n, float coin) { - // sample index from probabilities (they must sum to 1!) - // coin is a random number in [0, 1), usually from random_f32() - float cdf = 0.0f; - for (int i = 0; i < n; i++) { - cdf += probabilities[i]; - if (coin < cdf) { - return i; - } - } - return n - 1; // in case of rounding errors -} - -int compare(const void* a, const void* b) { - ProbIndex* a_ = (ProbIndex*) a; - ProbIndex* b_ = (ProbIndex*) b; - if (a_->prob > b_->prob) return -1; - if (a_->prob < b_->prob) return 1; - return 0; -} - -int sample_topp(float* probabilities, int n, float topp, ProbIndex* probindex, float coin) { - // top-p sampling (or "nucleus sampling") samples from the smallest set of - // tokens that exceed probability topp. This way we never sample tokens that - // have very low probabilities and are less likely to go "off the rails". - // coin is a random number in [0, 1), usually from random_f32() - - int n0 = 0; - // quicksort indices in descending order of probabilities - // values smaller than (1 - topp) / (n - 1) cannot be part of the result - // so for efficiency we crop these out as candidates before sorting - const float cutoff = (1.0f - topp) / (n - 1); - for (int i = 0; i < n; i++) { - if (probabilities[i] >= cutoff) { - probindex[n0].index = i; - probindex[n0].prob = probabilities[i]; - n0++; - } - } - qsort(probindex, n0, sizeof(ProbIndex), compare); - - // truncate the list where cumulative probability exceeds topp - float cumulative_prob = 0.0f; - int last_idx = n0 - 1; // in case of rounding errors consider all elements - for (int i = 0; i < n0; i++) { - cumulative_prob += probindex[i].prob; - if (cumulative_prob > topp) { - last_idx = i; - break; // we've exceeded topp by including last_idx - } - } - - // sample from the truncated list - float r = coin * cumulative_prob; - float cdf = 0.0f; - for (int i = 0; i <= last_idx; i++) { - cdf += probindex[i].prob; - if (r < cdf) { - return probindex[i].index; - } - } - return probindex[last_idx].index; // in case of rounding errors -} - -void build_sampler(Sampler* sampler, int vocab_size, float temperature, float topp, unsigned long long rng_seed) { - sampler->vocab_size = vocab_size; - sampler->temperature = temperature; - sampler->topp = topp; - sampler->rng_state = rng_seed; - // buffer only used with nucleus sampling; may not need but it's ~small - sampler->probindex = malloc(sampler->vocab_size * sizeof(ProbIndex)); -} - -void free_sampler(Sampler* sampler) { - free(sampler->probindex); -} - -unsigned int random_u32(unsigned long long *state) { - // xorshift rng: https://en.wikipedia.org/wiki/Xorshift#xorshift.2A - *state ^= *state >> 12; - *state ^= *state << 25; - *state ^= *state >> 27; - return (*state * 0x2545F4914F6CDD1Dull) >> 32; -} -float random_f32(unsigned long long *state) { // random float32 in [0,1) - return (random_u32(state) >> 8) / 16777216.0f; -} - -int sample(Sampler* sampler, float* logits) { - // sample the token given the logits and some hyperparameters - int next; - if (sampler->temperature == 0.0f) { - // greedy argmax sampling: take the token with the highest probability - next = sample_argmax(logits, sampler->vocab_size); - } else { - // apply the temperature to the logits - for (int q=0; qvocab_size; q++) { logits[q] /= sampler->temperature; } - // apply softmax to the logits to get the probabilities for next token - softmax(logits, sampler->vocab_size); - // flip a (float) coin (this is our source of entropy for sampling) - float coin = random_f32(&sampler->rng_state); - // we sample from this distribution to get the next token - if (sampler->topp <= 0 || sampler->topp >= 1) { - // simply sample from the predicted probability distribution - next = sample_mult(logits, sampler->vocab_size, coin); - } else { - // top-p (nucleus) sampling, clamping the least likely tokens to zero - next = sample_topp(logits, sampler->vocab_size, sampler->topp, sampler->probindex, coin); - } - } - return next; -} - -// ---------------------------------------------------------------------------- -// utilities: time - -long time_in_ms() { - // return time in milliseconds, for benchmarking the model speed - struct timespec time; - clock_gettime(CLOCK_REALTIME, &time); - return time.tv_sec * 1000 + time.tv_nsec / 1000000; -} - -// ---------------------------------------------------------------------------- -// generation loop - -void generate(Transformer *transformer, Tokenizer *tokenizer, Sampler *sampler, char *prompt, int steps) { - char *empty_prompt = ""; - if (prompt == NULL) { prompt = empty_prompt; } - - // encode the (string) prompt into tokens sequence - int num_prompt_tokens = 0; - int* prompt_tokens = (int*)malloc((strlen(prompt)+3) * sizeof(int)); // +3 for '\0', ?BOS, ?EOS - encode(tokenizer, prompt, 1, 0, prompt_tokens, &num_prompt_tokens); - if (num_prompt_tokens < 1) { - fprintf(stderr, "something is wrong, expected at least 1 prompt token\n"); - exit(EXIT_FAILURE); - } - - // start the main loop - long start = 0; // used to time our code, only initialized after first iteration - int next; // will store the next token in the sequence - int token = prompt_tokens[0]; // kick off with the first token in the prompt - int pos = 0; // position in the sequence - while (pos < steps) { - - // forward the transformer to get logits for the next token - float* logits = forward(transformer, token, pos); - - // advance the state machine - if (pos < num_prompt_tokens - 1) { - // if we are still processing the input prompt, force the next prompt token - next = prompt_tokens[pos + 1]; - } else { - // otherwise sample the next token from the logits - next = sample(sampler, logits); - } - pos++; - - // data-dependent terminating condition: the BOS (=1) token delimits sequences - if (next == 1) { break; } - - // print the token as string, decode it with the Tokenizer object - char* piece = decode(tokenizer, token, next); - safe_printf(piece); // same as printf("%s", piece), but skips "unsafe" bytes - fflush(stdout); - token = next; - - // init the timer here because the first iteration can be slower - if (start == 0) { start = time_in_ms(); } - } - printf("\n"); - - // report achieved tok/s (pos-1 because the timer starts after first iteration) - if (pos > 1) { - long end = time_in_ms(); - fprintf(stderr, "achieved tok/s: %f\n", (pos-1) / (double)(end-start)*1000); - } - - free(prompt_tokens); -} - -void read_stdin(const char* guide, char* buffer, size_t bufsize) { - // read a line from stdin, up to but not including \n - printf("%s", guide); - if (fgets(buffer, bufsize, stdin) != NULL) { - size_t len = strlen(buffer); - if (len > 0 && buffer[len - 1] == '\n') { - buffer[len - 1] = '\0'; // strip newline - } - } -} - -// ---------------------------------------------------------------------------- -// chat loop -// I manually inspected the tokens for a few chat conversations compared to -// python reference and that seemed ok, but this was not thoroughly tested and -// is not safely implemented, it's more a proof of concept atm. - -void chat(Transformer *transformer, Tokenizer *tokenizer, Sampler *sampler, - char *cli_user_prompt, char *cli_system_prompt, int steps) { - - // buffers for reading the system prompt and user prompt from stdin - // you'll notice they are soomewhat haphazardly and unsafely set atm - char system_prompt[512]; - char user_prompt[512]; - char rendered_prompt[1152]; - int num_prompt_tokens = 0; - int* prompt_tokens = (int*)malloc(1152 * sizeof(int)); - int user_idx; - - // start the main loop - int8_t user_turn = 1; // user starts - int next; // will store the next token in the sequence - int token; // stores the current token to feed into the transformer - int prev_token; - int pos = 0; // position in the sequence - while (pos < steps) { - - // when it is the user's turn to contribute tokens to the dialog... - if (user_turn) { - // get the (optional) system prompt at position 0 - if (pos == 0) { - // at position 0, the user can also contribute a system prompt - if (cli_system_prompt == NULL) { - // system prompt was not passed in, attempt to get it from stdin - read_stdin("Enter system prompt (optional): ", system_prompt, sizeof(system_prompt)); - } else { - // system prompt was passed in, use it - strcpy(system_prompt, cli_system_prompt); - } - } - // get the user prompt - if (pos == 0 && cli_user_prompt != NULL) { - // user prompt for position 0 was passed in, use it - strcpy(user_prompt, cli_user_prompt); - } else { - // otherwise get user prompt from stdin - read_stdin("User: ", user_prompt, sizeof(user_prompt)); - } - // render user/system prompts into the Llama 2 Chat schema - if (pos == 0 && system_prompt[0] != '\0') { - char system_template[] = "[INST] <>\n%s\n<>\n\n%s [/INST]"; - sprintf(rendered_prompt, system_template, system_prompt, user_prompt); - } else { - char user_template[] = "[INST] %s [/INST]"; - sprintf(rendered_prompt, user_template, user_prompt); - } - // encode the rendered prompt into tokens - encode(tokenizer, rendered_prompt, 1, 0, prompt_tokens, &num_prompt_tokens); - user_idx = 0; // reset the user index - user_turn = 0; - printf("Assistant: "); - } - - // determine the token to pass into the transformer next - if (user_idx < num_prompt_tokens) { - // if we are still processing the input prompt, force the next prompt token - token = prompt_tokens[user_idx++]; - } else { - // otherwise use the next token sampled from previous turn - token = next; - } - // EOS (=2) token ends the Assistant turn - if (token == 2) { user_turn = 1; } - - // forward the transformer to get logits for the next token - float* logits = forward(transformer, token, pos); - next = sample(sampler, logits); - pos++; - - if (user_idx >= num_prompt_tokens && next != 2) { - // the Assistant is responding, so print its output - char* piece = decode(tokenizer, token, next); - safe_printf(piece); // same as printf("%s", piece), but skips "unsafe" bytes - fflush(stdout); - } - if (next == 2) { printf("\n"); } - } - printf("\n"); - free(prompt_tokens); -} - - -// ---------------------------------------------------------------------------- -// CLI, include only if not testing -#ifndef TESTING - -void error_usage() { - fprintf(stderr, "Usage: run [options]\n"); - fprintf(stderr, "Example: run model.bin -n 256 -i \"Once upon a time\"\n"); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -t temperature in [0,inf], default 1.0\n"); - fprintf(stderr, " -p p value in top-p (nucleus) sampling in [0,1] default 0.9\n"); - fprintf(stderr, " -s random seed, default time(NULL)\n"); - fprintf(stderr, " -n number of steps to run for, default 256. 0 = max_seq_len\n"); - fprintf(stderr, " -i input prompt\n"); - fprintf(stderr, " -z optional path to custom tokenizer\n"); - fprintf(stderr, " -m mode: generate|chat, default: generate\n"); - fprintf(stderr, " -y (optional) system prompt in chat mode\n"); - exit(EXIT_FAILURE); -} - -int main(int argc, char *argv[]) { - - // default parameters - char *checkpoint_path = NULL; // e.g. out/model.bin - char *tokenizer_path = "tokenizer.bin"; - float temperature = 1.0f; // 0.0 = greedy deterministic. 1.0 = original. don't set higher - float topp = 0.9f; // top-p in nucleus sampling. 1.0 = off. 0.9 works well, but slower - int steps = 256; // number of steps to run for - char *prompt = NULL; // prompt string - unsigned long long rng_seed = 0; // seed rng with time by default - char *mode = "generate"; // generate|chat - char *system_prompt = NULL; // the (optional) system prompt to use in chat mode - - // poor man's C argparse so we can override the defaults above from the command line - if (argc >= 2) { checkpoint_path = argv[1]; } else { error_usage(); } - for (int i = 2; i < argc; i+=2) { - // do some basic validation - if (i + 1 >= argc) { error_usage(); } // must have arg after flag - if (argv[i][0] != '-') { error_usage(); } // must start with dash - if (strlen(argv[i]) != 2) { error_usage(); } // must be -x (one dash, one letter) - // read in the args - if (argv[i][1] == 't') { temperature = atof(argv[i + 1]); } - else if (argv[i][1] == 'p') { topp = atof(argv[i + 1]); } - else if (argv[i][1] == 's') { rng_seed = atoi(argv[i + 1]); } - else if (argv[i][1] == 'n') { steps = atoi(argv[i + 1]); } - else if (argv[i][1] == 'i') { prompt = argv[i + 1]; } - else if (argv[i][1] == 'z') { tokenizer_path = argv[i + 1]; } - else if (argv[i][1] == 'm') { mode = argv[i + 1]; } - else if (argv[i][1] == 'y') { system_prompt = argv[i + 1]; } - else { error_usage(); } - } - - // parameter validation/overrides - if (rng_seed <= 0) rng_seed = (unsigned int)time(NULL); - if (temperature < 0.0) temperature = 0.0; - if (topp < 0.0 || 1.0 < topp) topp = 0.9; - if (steps < 0) steps = 0; - - // build the Transformer via the model .bin file - Transformer transformer; - build_transformer(&transformer, checkpoint_path); - if (steps == 0 || steps > transformer.config.seq_len) steps = transformer.config.seq_len; // override to ~max length - - // build the Tokenizer via the tokenizer .bin file - Tokenizer tokenizer; - build_tokenizer(&tokenizer, tokenizer_path, transformer.config.vocab_size); - - // build the Sampler - Sampler sampler; - build_sampler(&sampler, transformer.config.vocab_size, temperature, topp, rng_seed); - - // run! - if (strcmp(mode, "generate") == 0) { - generate(&transformer, &tokenizer, &sampler, prompt, steps); - } else if (strcmp(mode, "chat") == 0) { - chat(&transformer, &tokenizer, &sampler, prompt, system_prompt, steps); - } else { - fprintf(stderr, "unknown mode: %s\n", mode); - error_usage(); - } - - // memory and file handles cleanup - free_sampler(&sampler); - free_tokenizer(&tokenizer); - free_transformer(&transformer); - return 0; -} -#endif diff --git a/c/llcppg.pub b/c/llcppg.pub deleted file mode 100644 index bb117a59..00000000 --- a/c/llcppg.pub +++ /dev/null @@ -1,19 +0,0 @@ -FILE -size_t SizeT -ssize_t SsizeT -intptr_t IntptrT -uintptr_t UintptrT -int8_t Int8T -int16_t Int16T -int32_t Int32T -int64_t Int64T -uint8_t Uint8T -uint16_t Uint16T -uint32_t Uint32T -uint64_t Uint64T -intmax_t IntmaxT -uintmax_t UintmaxT -va_list VaList -iconv_t IconvT -locale_t LocaleT -option Option diff --git a/c/lua/_demo/coroutine-cfunc/coroutine.go b/c/lua/_demo/coroutine-cfunc/coroutine.go deleted file mode 100644 index 8be4e405..00000000 --- a/c/lua/_demo/coroutine-cfunc/coroutine.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func coroutineFunc(L *lua.State) c.Int { - c.Printf(c.Str("Coroutine started\n")) - L.Yield(0) // Pause the coroutine - c.Printf(c.Str("Coroutine resumed\n")) - return 0 -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - co := L.Newthread() - L.Pushcfunction(coroutineFunc) - L.Xmove(co, 1) - - var nres c.Int - - c.Printf(c.Str("Resuming coroutine for the first time\n")) - result := co.Resume(nil, 0, &nres) - if result == lua.YIELD { - c.Printf(c.Str("Coroutine yielded\n")) - result = co.Resume(nil, 0, &nres) - if result == 0 { - c.Printf(c.Str("Coroutine finished\n")) - } - } -} - -/* Expected output: -Resuming coroutine for the first time -Coroutine started -Coroutine yielded -Coroutine finished -*/ diff --git a/c/lua/_demo/coroutine/coroutine.go b/c/lua/_demo/coroutine/coroutine.go deleted file mode 100644 index 7d5e9c69..00000000 --- a/c/lua/_demo/coroutine/coroutine.go +++ /dev/null @@ -1,80 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func coroutineFunc(L *lua.State) { - L.Loadstring(c.Str(` - function coro_func() - for i = 1, 5 do - coroutine.yield(i) - end - end - `)) - L.Pcall(0, 0, 0) - L.Getglobal(c.Str("coro_func")) -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - - coroutineFunc(L) // Load and get the coroutine function - - co := L.Newthread() // Create a new coroutine/thread - L.Pushvalue(-2) // Move the function to the top of the stack - L.Xmove(co, 1) // Move the function to the new coroutine - - var nres c.Int - var status c.Int - - c.Printf(c.Str("Resuming coroutine...\n")) - // Resume coroutine and handle yields - for { - status = co.Resume(nil, 0, &nres) - if status == lua.YIELD { - c.Printf(c.Str("Resuming coroutine %d...\n"), status) - yieldValue := co.Tointeger(-1) - c.Printf(c.Str("Yield value: %d\n"), yieldValue) - co.Pop(1) // Clean up the stack - - // Check if the coroutine is yieldable - if co.Isyieldable() != 0 { - c.Printf(c.Str("Coroutine is yieldable.\n")) - } else { - c.Printf(c.Str("Coroutine is not yieldable.\n")) - } - - } else { - break - } - } - - // Check the final status of the coroutine - finalStatus := co.Status() - c.Printf(c.Str("Final status of coroutine: %d\n"), finalStatus) -} - -/* Expected output: -Resuming coroutine... -Resuming coroutine 1... -Yield value: 1 -Coroutine is yieldable. -Resuming coroutine 1... -Yield value: 2 -Coroutine is yieldable. -Resuming coroutine 1... -Yield value: 3 -Coroutine is yieldable. -Resuming coroutine 1... -Yield value: 4 -Coroutine is yieldable. -Resuming coroutine 1... -Yield value: 5 -Coroutine is yieldable. -Final status of coroutine: 0 -*/ diff --git a/c/lua/_demo/crroutine-continue/corroutine.go b/c/lua/_demo/crroutine-continue/corroutine.go deleted file mode 100644 index 8070cb94..00000000 --- a/c/lua/_demo/crroutine-continue/corroutine.go +++ /dev/null @@ -1,72 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func countdownContinue(L *lua.State, status c.Int, ctx lua.KContext) c.Int { - return countdown(L) -} - -func countdown(L *lua.State) c.Int { - arg := L.Tointeger(lua.Upvalueindex(1)) - c.Printf(c.Str("resume called with %d\n"), arg) - if arg > 0 { - L.Pushinteger(arg - 1) - L.Replace(lua.Upvalueindex(1)) - L.Pushinteger(arg) - return L.Yieldk(1, c.Pointer(uintptr(0)), countdownContinue) - } - return 0 -} - -func createCountdown(L *lua.State) c.Int { - max := L.Checkinteger(1) - L.Pushinteger(max) - L.Pushcclosure(countdown, 1) - return 1 -} - -func main() { - L := lua.Newstate__1() - L.Openlibs() - defer L.Close() - L.Register(c.Str("create_countdown"), createCountdown) - - testcode := c.Str(` - local countdown = create_countdown(5) - local co = coroutine.create(countdown) - while true do - local success, value = coroutine.resume(co) - if not success then - print('Error:', value) - break - end - if value == nil then break end - print('Lua received:', value) - end - print('Countdown finished'); - `) - - if L.Dostring(testcode) != lua.OK { - c.Printf(c.Str("Error: %s\n"), L.Tostring(-1)) - } - - L.Openlibs() -} - -/* Expected output: -resume called with 5 -Lua received: 5 -resume called with 4 -Lua received: 4 -resume called with 3 -Lua received: 3 -resume called with 2 -Lua received: 2 -resume called with 1 -Lua received: 1 -resume called with 0 -Countdown finished -*/ diff --git a/c/lua/_demo/custom-panic/panic.go b/c/lua/_demo/custom-panic/panic.go deleted file mode 100644 index 6c22dbb5..00000000 --- a/c/lua/_demo/custom-panic/panic.go +++ /dev/null @@ -1,64 +0,0 @@ -package main - -import ( - "os" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func triggerError(L *lua.State) c.Int { - L.Pushstring(c.Str("This is an error triggered")) - return L.Error() -} - -func triggerFormatError(L *lua.State) c.Int { - return L.LError(c.Str("This is an error code:(%d)"), 42) -} - -func customPanic(L *lua.State) c.Int { - msg := L.Tostring(-1) - c.Printf(c.Str("Pani'c: %s\n"), msg) - os.Exit(1) - return 0 -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - - L.Atpanic(customPanic) - - L.Register(c.Str("trigger_error"), triggerError) - L.Register(c.Str("trigger_format_error"), triggerFormatError) - - c.Printf(c.Str("1. error (protected):\n")) - L.Getglobal(c.Str("trigger_error")) - if L.Pcall(0, 0, 0) != lua.OK { - c.Printf(c.Str("Error: %s\n"), L.Tostring(-1)) - L.Pop(1) - } - - c.Printf(c.Str("2. format_error (protected):\n")) - L.Getglobal(c.Str("trigger_format_error")) - if L.Pcall(0, 0, 0) != lua.OK { - c.Printf(c.Str("Error: %s\n"), L.Tostring(-1)) - L.Pop(1) - } - - c.Printf(c.Str("3. Unprotected call (panic):\n")) - L.Getglobal(c.Str("trigger_error")) - // This will trigger unprotected panic and catch by customPanic - L.Call(0, 0) -} - -/* Expected output: -1. error (protected): -Error: This is an error triggered -2. format_error (protected): -Error: This is an error code:(42) -3. Unprotected call (panic): -Panic: This is an error triggered -*/ diff --git a/c/lua/_demo/debug/debug.go b/c/lua/_demo/debug/debug.go deleted file mode 100644 index 5604a76d..00000000 --- a/c/lua/_demo/debug/debug.go +++ /dev/null @@ -1,48 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func Hook(L *lua.State, ar *lua.Debug) { - L.Getinfo(c.Str("nSl"), ar) - c.Printf(c.Str("Hook called:")) - if name := ar.Name; name != nil { - c.Printf(c.Str("name: %s,"), name) - } - if what := ar.What; what != nil { - c.Printf(c.Str("what: %s,"), what) - } - c.Printf(c.Str("source: %s,"), c.Pointer(unsafe.SliceData(ar.ShortSrc[:]))) - c.Printf(c.Str("line: %d\n"), ar.Currentline) -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - - L.Sethook(Hook, lua.MASKLINE, 0) - - code := - `function hello(name) - print('Hello, ' .. name .. '!') - end - hello('llgo')` - if res := L.Dostring(c.Str(code)); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - -} - -/* Expected output: -Hook called:what: main,source: [string "function hello(name) ..."],line: 3 -Hook called:what: main,source: [string "function hello(name) ..."],line: 1 -Hook called:what: main,source: [string "function hello(name) ..."],line: 4 -Hook called:name: hello,what: Lua,source: [string "function hello(name) ..."],line: 2 -Hello, llgo! -Hook called:name: hello,what: Lua,source: [string "function hello(name) ..."],line: 3 -*/ diff --git a/c/lua/_demo/dump/load/load.go b/c/lua/_demo/dump/load/load.go deleted file mode 100644 index f86ee32c..00000000 --- a/c/lua/_demo/dump/load/load.go +++ /dev/null @@ -1,68 +0,0 @@ -package main - -import ( - "os" - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func reader(L *lua.State, data c.Pointer, size *c.Ulong) *c.Char { - file := (*os.File)(data) - - fileInfo, err := file.Stat() - if err != nil { - return nil - } - fileSize := fileInfo.Size() - - buffer := make([]byte, fileSize) - bytesRead, err := file.Read(buffer) - if err != nil { - return nil - } - - *size = c.Ulong(bytesRead) - - if bytesRead > 0 { - return (*c.Char)(unsafe.Pointer(unsafe.SliceData(buffer))) - } - - return nil -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - - file, err := os.Open("../llgofunc.luac") - if err != nil { - c.Printf(c.Str("Failed to open file for reading\n")) - return - } - defer file.Close() - - if L.Load(reader, c.Pointer(file), c.Str("greet"), nil) != lua.OK { - c.Printf(c.Str("Failed to dump Lua function\n")) - } - - c.Printf(c.Str("Stack size before call: %d\n"), L.Gettop()) - c.Printf(c.Str("Top element type after call: %s\n"), L.Typename(L.Type(-1))) - - L.Pushstring(c.Str("World")) - if L.Pcall(1, 1, 0) != lua.OK { - c.Printf(c.Str("Failed to call function: %s\n")) - } - - if L.Isstring(-1) != 0 { - c.Printf(c.Str("Result: %s\n"), L.Tostring(-1)) - } -} - -/* Expected output: -Stack size before call: 1 -Top element type after call: function -Result: Hello, World! -*/ diff --git a/c/lua/_demo/dump/save/save.go b/c/lua/_demo/dump/save/save.go deleted file mode 100644 index 0e6b61b2..00000000 --- a/c/lua/_demo/dump/save/save.go +++ /dev/null @@ -1,56 +0,0 @@ -package main - -import ( - "os" - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func writer(L *lua.State, p c.Pointer, sz c.Ulong, ud c.Pointer) c.Int { - file := (*os.File)(ud) - data := unsafe.Slice((*byte)(p), sz) - - n, err := file.Write(data) - if err != nil || n != int(sz) { - return 1 - } - - return lua.OK -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - - if res := L.Loadstring(c.Str(` - function greet(name) - return 'Hello, ' .. name .. '!' - end - return greet - `)); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - - if res := L.Pcall(0, 1, 0); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - - if !L.Isfunction(-1) { - c.Printf(c.Str("Expected a function, but got %s"), L.Typename(L.Type(-1))) - } - - file, err := os.Create("../llgofunc.luac") - if err != nil { - c.Printf(c.Str("Failed to open file for writing\n")) - return - } - defer file.Close() - - if L.Dump(writer, c.Pointer(file), 0) != lua.OK { - c.Printf(c.Str("Failed to dump Lua function\n")) - } - -} diff --git a/c/lua/_demo/error/error.go b/c/lua/_demo/error/error.go deleted file mode 100644 index 3ca86754..00000000 --- a/c/lua/_demo/error/error.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func main() { - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - if res := L.Loadstring(c.Str("function doubleNumber(x) ! return x * 2 end")); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } -} - -/* Expected output: -error: [string "function doubleNumber(x) ! return x * 2 end"]:1: unexpected symbol near '!' -*/ diff --git a/c/lua/_demo/extraspace/extraspace.go b/c/lua/_demo/extraspace/extraspace.go deleted file mode 100644 index 75089a0c..00000000 --- a/c/lua/_demo/extraspace/extraspace.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "unsafe" - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func GetData(L *lua.State) c.Int { - extra := (*int)(L.Getextraspace()) - L.Pushfstring(c.Str("Stored integer is: %d"), *extra) - return 1 -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - - extra := (*int)(L.Getextraspace()) - *extra = 42 - - difference := uintptr(unsafe.Pointer(L)) - uintptr(L.Getextraspace()) - if difference == unsafe.Sizeof(uintptr(0)) { - c.Printf(c.Str("Extra space is pointer size\n"), unsafe.Sizeof(uintptr(0))) - } - - L.Pushcfunction(GetData) - L.Setglobal(c.Str("GetData")) - - if L.Dostring(c.Str("print(GetData())")) != lua.OK { - c.Printf(c.Str("Error: %s\n"), L.Tostring(-1)) - } -} - -/* Expected output: -Extra space is pointer size -Stored integer is: 42 -*/ diff --git a/c/lua/_demo/funccall-concat/funccall.go b/c/lua/_demo/funccall-concat/funccall.go deleted file mode 100644 index 4168425d..00000000 --- a/c/lua/_demo/funccall-concat/funccall.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - if res := L.Dostring(c.Str("function combineParams(num, str) return 'Result: ' .. str .. ' ' .. num end")); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - L.Getglobal(c.Str("combineParams")) - L.Pushnumber(3.14159) - L.Pushstring(c.Str("Hello, World!")) - if res := L.Pcall(2, 1, 0); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - if res := L.Isstring(-1); res != 0 { - result := L.Tostring(-1) - c.Printf(result) - } -} - -/* Expected output: -Result: Hello, World! 3.14159 -*/ diff --git a/c/lua/_demo/funccall-number/funccall.go b/c/lua/_demo/funccall-number/funccall.go deleted file mode 100644 index 9db886f7..00000000 --- a/c/lua/_demo/funccall-number/funccall.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - if res := L.Loadstring(c.Str("function doubleNumber(x) return x * 2 end")); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - if res := L.Pcall(0, 0, 0); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - - L.Getglobal(c.Str("doubleNumber")) - L.Pushnumber(10) - - if res := L.Pcall(1, 1, 0); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - - if res := L.Isnumber(-1); res != 0 { - result := L.Tointeger(-1) - c.Printf(c.Str("result: %lld\n"), result) - } else { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } -} - -/* Expected output: -result: 20 -*/ diff --git a/c/lua/_demo/funccall-string/funccall.go b/c/lua/_demo/funccall-string/funccall.go deleted file mode 100644 index 066ce601..00000000 --- a/c/lua/_demo/funccall-string/funccall.go +++ /dev/null @@ -1,48 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - code := c.Str( - `function processStrings(a, b, c) - print('Received string a: ' .. a) - print('Received string b: ', b) - print('Received string c (formatted): ' .. c) - return a .. b .. c -end`) - - if res := L.Dostring(code); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - - L.Getglobal(c.Str("processStrings")) - - L.Pushstring(c.Str("Hello, World!")) - L.Pushlstring(c.Str(`Hello Lua In LLGO`), 17) - L.Pushfstring(c.Str(`Hello %s In %d`), c.Str("LLGO"), 2024) - - if res := L.Pcall(3, 1, 0); res != lua.OK { - c.Printf(c.Str("error: %s\n"), L.Tostring(-1)) - } - - if res := L.Isstring(-1); res != 0 { - result := L.Tostring(-1) - c.Printf(c.Str("result: %s\n"), result) - } -} - -/* Expected output: -Received string a: Hello, World! -Received string b: Hello Lua In LLGO -Received string c (formatted): Hello LLGO In 2024 -result: Hello, World!Hello Lua In LLGOHello LLGO In 2024 -*/ diff --git a/c/lua/_demo/hello/hello.go b/c/lua/_demo/hello/hello.go deleted file mode 100644 index e640e78b..00000000 --- a/c/lua/_demo/hello/hello.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func main() { - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - if res := L.Dostring(c.Str("print('hello world')")); res != lua.OK { - println("error") - } -} - -/* Expected output: -hello world -*/ diff --git a/c/lua/_demo/loadcall/loadcall.go b/c/lua/_demo/loadcall/loadcall.go deleted file mode 100644 index 8b3247a3..00000000 --- a/c/lua/_demo/loadcall/loadcall.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - if res := L.Loadstring(c.Str("print('hello world')")); res != lua.OK { - println("error") - } - if res := L.Pcall(0, 0, 0); res != lua.OK { - println("error") - } - -} - -/* Expected output: -hello world -*/ diff --git a/c/lua/_demo/metatable/metatable.go b/c/lua/_demo/metatable/metatable.go deleted file mode 100644 index f952f72c..00000000 --- a/c/lua/_demo/metatable/metatable.go +++ /dev/null @@ -1,125 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func toString(L *lua.State) c.Int { - L.Pushstring(c.Str("Hello from metatable!")) - return 1 -} - -func printStack(L *lua.State, message string) { - top := L.Gettop() - c.Printf(c.Str("%s - Stack size: %d\n"), c.AllocaCStr(message), c.Int(top)) - for i := c.Int(1); i <= top; i++ { - t := L.Type(i) - switch t { - case c.Int(lua.STRING): - c.Printf(c.Str(" %d: string: %s\n"), c.Int(i), L.Tostring(i)) - case c.Int(lua.BOOLEAN): - c.Printf(c.Str(" %d: boolean: %v\n"), c.Int(i), L.Toboolean(i)) - case c.Int(lua.NUMBER): - c.Printf(c.Str(" %d: number: %f\n"), c.Int(i), L.Tonumber(i)) - default: - c.Printf(c.Str(" %d: %s\n"), c.Int(i), L.Typename(t)) - } - } -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - - L.Newtable() - printStack(L, "After creating main table") - - L.Newtable() - printStack(L, "After creating metatable") - - L.Pushcfunction(toString) - printStack(L, "After Push CFunction") - - L.Setfield(-2, c.Str("__tostring")) - printStack(L, "After setting __tostring") - - if L.Setmetatable(-2) == 0 { - c.Printf(c.Str("Failed to set metatable\n")) - } - printStack(L, "After setting metatable") - - L.Setglobal(c.Str("obj")) - printStack(L, "After setting global obj") - - testcode := c.Str(` - if obj == nil then - print('obj is not defined') - else - local mt = getmetatable(obj) - if not mt then - print('Metatable not set') - elseif not mt.__tostring then - print('__tostring not set in metatable') - else - print(mt.__tostring(obj)) - end - end - `) - - if L.Dostring(testcode) != lua.OK { - c.Printf(c.Str("Error: %s\n"), L.Tostring(-1)) - } - - L.Getglobal(c.Str("obj")) - if L.Getmetatable(-1) != 0 { - c.Printf(c.Str("Metatable get success\n")) - L.Pushstring(c.Str("__tostring")) - L.Gettable(-2) - if L.Isfunction(-1) { - c.Printf(c.Str("__tostring function found in metatable\n")) - if L.Iscfunction(-1) != 0 { - c.Printf(c.Str("__tostring is a C function\n")) - cfunc := L.Tocfunction(-1) - if cfunc != nil { - c.Printf(c.Str("Successfully retrieved __tostring C function pointer\n")) - L.Pushcfunction(cfunc) - if L.Call(0, 1) == lua.OK { - result := L.Tostring(-1) - c.Printf(c.Str("Result of calling __tostring: %s\n"), result) - } - } - } - } else { - c.Printf(c.Str("__tostring function not found in metatable\n")) - } - } else { - c.Printf(c.Str("No metatable found using GetTable\n")) - } -} - -/* Expected output: -After creating main table - Stack size: 1 - 1: table -After creating metatable - Stack size: 2 - 1: table - 2: table -After Push CFunction - Stack size: 3 - 1: table - 2: table - 3: function -After setting __tostring - Stack size: 2 - 1: table - 2: table -After setting metatable - Stack size: 1 - 1: table -After setting global obj - Stack size: 0 -Hello from metatable! -Metatable get success -__tostring function found in metatable -__tostring is a C function -Successfully retrieved __tostring C function pointer -Result of calling __tostring: Hello from metatable! -*/ diff --git a/c/lua/_demo/stack/stack.go b/c/lua/_demo/stack/stack.go deleted file mode 100644 index a7e13f1d..00000000 --- a/c/lua/_demo/stack/stack.go +++ /dev/null @@ -1,104 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -// printStack prints the current stack of the given Lua state. -func printStack(L *lua.State, stateName *c.Char) { - top := L.Gettop() - c.Printf(c.Str("%s stack (top=%d):"), stateName, top) - for i := 1; i <= int(top); i++ { - c.Printf(c.Str("%s "), L.Tostring(c.Int(i))) - } - c.Printf(c.Str("\n")) -} - -func main() { - // Create a new Lua state and open libraries - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - - // Push initial values onto the stack - L.Pushstring(c.Str("Hello")) - L.Pushstring(c.Str("LLGO")) - L.Pushnumber(2024) - - // Print initial stack - c.Printf(c.Str("Initial stack:\n")) - printStack(L, c.Str("L1")) - - // Use absindex to ensure the index is positive - idx := -2 - absIdx := L.Absindex(c.Int(idx)) - c.Printf(c.Str("Absolute index of 'LLGO': %d\n"), absIdx) - - // Copy 'LLGO' to the top of the stack - L.Pushvalue(absIdx) - c.Printf(c.Str("\nAfter pushing 'LLGO' to the top:\n")) - printStack(L, c.Str("L1")) - - // Rotate stack elements - L.Rotate(c.Int(1), c.Int(-1)) - c.Printf(c.Str("\nAfter rotating the stack:\n")) - printStack(L, c.Str("L1")) - - // Copy the top element to index 2 - L.Copy(c.Int(-1), c.Int(2)) - c.Printf(c.Str("\nAfter copying the top element to index 2:\n")) - printStack(L, c.Str("L1")) - - // Check if we can grow the stack - if L.Checkstack(c.Int(2)) == 0 { - c.Printf(c.Str("Cannot grow stack\n")) - return - } - - // Push additional elements - L.Pushnumber(3.14) - L.Pushstring(c.Str("Lua")) - c.Printf(c.Str("\nAfter pushing more elements:\n")) - printStack(L, c.Str("L1")) - - // Set the top of the stack, clearing extra elements - L.Settop(c.Int(5)) - c.Printf(c.Str("\nAfter setting top to 5:\n")) - printStack(L, c.Str("L1")) - - // Create a second Lua state - L1 := lua.Newstate__1() - defer L1.Close() - - // Move two elements to the new state - L.Xmove(L1, c.Int(2)) - c.Printf(c.Str("\nAfter moving two elements to L1:\n")) - printStack(L, c.Str("L1")) - printStack(L1, c.Str("L2")) -} - -/* Expected output: -Initial stack: -L1 stack (top=3):Hello LLGO 2024.0 -Absolute index of 'LLGO': 2 - -After pushing 'LLGO' to the top: -L1 stack (top=4):Hello LLGO 2024.0 LLGO - -After rotating the stack: -L1 stack (top=4):LLGO 2024.0 LLGO Hello - -After copying the top element to index 2: -L1 stack (top=4):LLGO Hello LLGO Hello - -After pushing more elements: -L1 stack (top=6):LLGO Hello LLGO Hello 3.14 Lua - -After setting top to 5: -L1 stack (top=5):LLGO Hello LLGO Hello 3.14 - -After moving two elements to L1: -L1 stack (top=3):LLGO Hello LLGO -L2 stack (top=2):Hello 3.14 -*/ diff --git a/c/lua/_demo/state-alloc/alloc.go b/c/lua/_demo/state-alloc/alloc.go deleted file mode 100644 index 0b4ee76c..00000000 --- a/c/lua/_demo/state-alloc/alloc.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func alloc(ud c.Pointer, ptr c.Pointer, osize c.Ulong, nsize c.Ulong) c.Pointer { - if nsize == 0 { - c.Free(ptr) - return nil - } else { - return c.Realloc(ptr, uintptr(nsize)) - } -} - -func main() { - L := lua.Newstate__0(alloc, nil) - defer L.Close() - L.Openlibs() - if res := L.Dostring(c.Str("print('new state success')")); res != lua.OK { - println("newstate error") - } - - allocf := L.Getallocf(nil) - L.Setallocf(allocf, nil) - - if res := L.Dostring(c.Str("print('set newstate success')")); res != lua.OK { - println("set newstate error") - } -} - -/* Expected output: -new state success -set newstate success -*/ diff --git a/c/lua/_demo/table/table.go b/c/lua/_demo/table/table.go deleted file mode 100644 index 14407617..00000000 --- a/c/lua/_demo/table/table.go +++ /dev/null @@ -1,100 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func printTable(L *lua.State) { - L.Pushnil() - for L.Next(-2) != 0 { - value := L.Tostring(-1) - switch L.Type(-2) { - case lua.STRING: - key := L.Tostring(-2) - c.Printf(c.Str("%s - %s\n"), key, value) - case lua.NUMBER: - key := L.Tonumber(-2) - c.Printf(c.Str("[%.0f] - %s\n"), key, value) - case lua.LIGHTUSERDATA: - c.Printf(c.Str("[pointer] - %s\n"), value) - default: - c.Printf(c.Str("unknown key type %s %d\n"), L.Typename(-2), L.Type(-2)) - } - L.Pop(1) - } - L.Pop(1) -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - - L.Newtable() - - // set table name:John - L.Pushstring(c.Str("name")) - L.Pushstring(c.Str("John")) - L.Settable(-3) - - // set table age:30 - L.Pushstring(c.Str("age")) - L.Pushnumber(30) - L.Settable(-3) - - // set table field fullname:John Doe - L.Pushstring(c.Str("John Doe")) - L.Setfield(-2, c.Str("fullname")) - - // set index field - L.Pushinteger(123) - L.Seti(-2, c.Int(1)) - - // set pointer key field - pointerKey := c.AllocaCStr("pointer key") - L.Pushstring(c.Str("pointer value")) - L.Rawsetp(-2, unsafe.Pointer(pointerKey)) - - // get field by Getfield - L.Getfield(-1, c.Str("name")) - c.Printf(c.Str("name: %s\n"), L.Tostring(-1)) - L.Pop(1) - - // get field by Rawget - L.Pushstring(c.Str("fullname")) - L.Rawget(-2) - c.Printf(c.Str("fullname: %s\n"), L.Tostring(-1)) - L.Pop(1) - - // get field by Gettable - L.Pushstring(c.Str("age")) - L.Gettable(-2) - age := int(L.Tonumber(-1)) - c.Printf(c.Str("Age: %d\n"), age) - L.Pop(1) - - // get index field - L.Geti(-1, c.Int(1)) - c.Printf(c.Str("Index[%d] value: %d\n"), 1, L.Tointeger(-1)) - L.Pop(1) - - c.Printf(c.Str("All entries in the table:\n")) - printTable(L) -} - -/* Expected output: -name: John -fullname: John Doe -Age: 30 -Index[1] value: 123 -All entries in the table: -[1] - 123 -name - John -[pointer] - pointer value -fullname - John Doe -age - 30.0 -*/ diff --git a/c/lua/_demo/thread/thread.go b/c/lua/_demo/thread/thread.go deleted file mode 100644 index f4a25d5c..00000000 --- a/c/lua/_demo/thread/thread.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -func pushThread(state *lua.State, name string) { - isMain := state.Pushthread() - if isMain != 0 { - c.Printf(c.Str("%s Thread is main\n"), c.AllocaCStr(name)) - } else { - c.Printf(c.Str("%s Thread is not main\n"), c.AllocaCStr(name)) - } -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - - L.Openlibs() - pushThread(L, "main") - L.Pop(1) - newThread := L.Newthread() - pushThread(newThread, "newthread") - - state := newThread.Tothread(-1) - if newThread == state { - c.Printf(c.Str("Successfully retrieved thread from stack\n")) - } - status := state.Status() - c.Printf(c.Str("New thread status: %d"), status) - - if L.Closethread(newThread) != lua.OK { - println("Failed to close thread status %d", state.Status()) - } -} - -/* Expected output: -main Thread is main -newthread Thread is not main -Successfully retrieved thread from stack -New thread status: 0 -*/ diff --git a/c/lua/_demo/userdata/userdata.go b/c/lua/_demo/userdata/userdata.go deleted file mode 100644 index 3d2c2c35..00000000 --- a/c/lua/_demo/userdata/userdata.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/lua" -) - -type lightdata struct { - value int -} - -func main() { - L := lua.Newstate__1() - defer L.Close() - L.Openlibs() - - data := L.Newuserdata(unsafe.Sizeof(0)) - *((*int)(data)) = 42 - L.Setglobal(c.Str("data")) - - light := &lightdata{value: 24} - L.Pushlightuserdata(unsafe.Pointer(light)) - L.Setglobal(c.Str("lightdata")) - - L.Getglobal(c.Str("data")) - if L.Isuserdata(-1) != 0 { - data := L.Touserdata(-1) - c.Printf(c.Str("userdata %d\n"), *(*int)(data)) - } - - L.Getglobal(c.Str("lightdata")) - if L.Islightuserdata(-1) { - light := (*lightdata)(L.Touserdata(-1)) - c.Printf(c.Str("lightdata %d\n"), light.value) - } -} - -/* Expected output: -userdata 42 -lightdata 24 -*/ diff --git a/c/lua/lauxlib.go b/c/lua/lauxlib.go deleted file mode 100644 index e12978ae..00000000 --- a/c/lua/lauxlib.go +++ /dev/null @@ -1,110 +0,0 @@ -package lua - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// /* global table */ - -// /* extra error code for 'luaL_loadfilex' */ - -// /* key, in the registry, for table of loaded modules */ - -// /* key, in the registry, for table of preloaded loaders */ - -// llgo:link (*State).Checkinteger C.luaL_checkinteger -func (L *State) Checkinteger(arg c.Int) Integer { return 0 } - -// llgo:link (*State).Checknumber C.luaL_checknumber -func (L *State) Checknumber(arg c.Int) Number { return 0 } - -// llgo:link (*State).LError C.luaL_error -func (L *State) LError(format *c.Char, __llgo_va_list ...any) c.Int { return 0 } - -// /* predefined references */ - -// llgo:link (*State).Loadfilex C.luaL_loadfilex -func (L *State) Loadfilex(filename *c.Char, mode *c.Char) c.Int { return 0 } - -func (L *State) Loadfile(filename *c.Char) c.Int { return L.Loadfilex(filename, nil) } - -// llgo:link (*State).Loadstring C.luaL_loadstring -func (L *State) Loadstring(s *c.Char) c.Int { return 0 } - -//go:linkname Newstate__1 C.luaL_newstate -func Newstate__1() *State - -// /* -// ** =============================================================== -// ** some useful macros -// ** =============================================================== -// */ - -func (L *State) Dofile(filename *c.Char) c.Int { - if loadResult := L.Loadfile(filename); loadResult != 0 { - return loadResult - } - return L.Pcall(c.Int(0), c.Int(MULTRET), c.Int(0)) -} - -func (L *State) Dostring(str *c.Char) c.Int { - if loadResult := L.Loadstring(str); loadResult != 0 { - return loadResult - } - return L.Pcall(c.Int(0), c.Int(MULTRET), c.Int(0)) -} - -// /* -// ** Perform arithmetic operations on lua_Integer values with wrap-around -// ** semantics, as the Lua core does. -// */ - -// /* push the value used to represent failure/error */ - -// /* -// ** {====================================================== -// ** Generic Buffer manipulation -// ** ======================================================= -// */ - -// /* }====================================================== */ - -// /* -// ** {====================================================== -// ** File handles for IO library -// ** ======================================================= -// */ - -// /* -// ** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and -// ** initial structure 'luaL_Stream' (it may contain other fields -// ** after that initial structure). -// */ - -// #define LUA_FILEHANDLE "FILE*" - -// /* }====================================================== */ - -// /* -// ** {================================================================== -// ** "Abstraction Layer" for basic report of messages and errors -// ** =================================================================== -// */ - -// /* print a string */ - -// /* print a newline and flush the output */ - -// /* print an error message */ - -// /* }================================================================== */ - -// /* -// ** {============================================================ -// ** Compatibility with deprecated conversions -// ** ============================================================= -// */ - -// /* }============================================================ */ diff --git a/c/lua/lua.go b/c/lua/lua.go deleted file mode 100644 index c5e35da5..00000000 --- a/c/lua/lua.go +++ /dev/null @@ -1,627 +0,0 @@ -package lua - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs lua); -llua -lm" -) - -/* mark for precompiled code ('Lua') */ - -/* option for multiple returns in 'lua_pcall' and 'lua_call' */ -const ( - MULTRET = -1 -) - -/* - * Pseudo-indices - * (-LUAI_MAXSTACK is the minimum valid index; we keep some free empty - * space after that to help overflow detection) - */ - -const ( - REGISTRYINDEX = -MAXSTACK - 1000 -) - -func Upvalueindex(i c.Int) c.Int { - return c.Int(REGISTRYINDEX) - i -} - -/* thread status */ -const ( - OK = 0 - YIELD = 1 - ERRRUN = 2 - ERRSYNTAX = 3 - ERRMEM = 4 - ERRERR = 5 -) - -type State struct { - Unused [8]byte -} - -/* - * basic types - */ -const ( - NONE c.Int = -1 - NIL c.Int = 0 - BOOLEAN c.Int = 1 - LIGHTUSERDATA c.Int = 2 - NUMBER c.Int = 3 - STRING c.Int = 4 - TABLE c.Int = 5 - FUNCTION c.Int = 6 - USERDATA c.Int = 7 - THREAD c.Int = 8 - NUMTYPES c.Int = 9 -) - -/* minimum Lua stack available to a C function */ -const ( - MINSTACK = 20 -) - -/* predefined values in the registry */ -const ( - RIDX_MAINTHREAD = 1 - RIDX_GLOBALS = 2 - RIDX_LAST = RIDX_GLOBALS -) - -/* type of numbers in Lua */ -type Number = c.Double - -/* type for integer functions */ -type Integer = c.Int - -/* unsigned integer type */ -type Unsigned = c.Uint - -/* type for continuation-function contexts */ -type KContext = c.Pointer - -/* - * Type for C functions registered with Lua - */ - -// llgo:type C -type CFunction func(L *State) c.Int - -/* - * Type for continuation functions - */ - -// llgo:type C -type KFunction func(L *State, status c.Int, ctx KContext) c.Int - -/* - * Type for functions that read/write blocks when loading/dumping Lua chunks - */ - -// llgo:type C -type Reader func(L *State, ud c.Pointer, sz *c.Ulong) *c.Char - -// llgo:type C -type Writer func(L *State, p c.Pointer, sz c.Ulong, ud c.Pointer) c.Int - -/* - * Type for memory-allocation functions - */ - -// llgo:type C -type Alloc func(ud c.Pointer, ptr c.Pointer, osize c.Ulong, nsize c.Ulong) c.Pointer - -/* - * Type for warning functions - */ - -// llgo:type C -type WarnFunction func(ud c.Pointer, msg c.Char, tocont c.Int) - -/* - * Functions to be called by the debugger in specific events - */ - -// llgo:type C -type Hook func(L *State, ar *Debug) - -/* - * RCS ident string - */ - -// extern const char lua_ident[]; - -/* - ** state manipulation - */ - -// llgo:link (*State).Close C.lua_close -func (L *State) Close() {} - -// llgo:link Newstate__0 C.lua_newstate -func Newstate__0(f Alloc, ud c.Pointer) *State { return nil } - -// llgo:link (*State).Newthread C.lua_newthread -func (L *State) Newthread() *State { return nil } - -// llgo:link (*State).Closethread C.lua_closethread -func (L *State) Closethread(from *State) c.Int { return 0 } - -// llgo:link (*State).Resetthread C.lua_resetthread -func (L *State) Resetthread(from *State) c.Int { return 0 } - -// llgo:link (*State).Atpanic C.lua_atpanic -func (L *State) Atpanic(panicf CFunction) CFunction { return nil } - -// llgo:link (*State).Version C.lua_version -func (L *State) Version() Number { return 0 } - -/* - * basic stack manipulation - */ - -// llgo:link (*State).Absindex C.lua_absindex -func (L *State) Absindex(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Gettop C.lua_gettop -func (L *State) Gettop() c.Int { return 0 } - -// llgo:link (*State).Settop C.lua_settop -func (L *State) Settop(idx c.Int) {} - -// llgo:link (*State).Pushvalue C.lua_pushvalue -func (L *State) Pushvalue(idx c.Int) {} - -// llgo:link (*State).Rotate C.lua_rotate -func (L *State) Rotate(idx c.Int, n c.Int) {} - -// llgo:link (*State).Copy C.lua_copy -func (L *State) Copy(fromidx c.Int, toidx c.Int) {} - -// llgo:link (*State).Checkstack C.lua_checkstack -func (L *State) Checkstack(n c.Int) c.Int { return 0 } - -// llgo:link (*State).Xmove C.lua_xmove -func (L *State) Xmove(to *State, n c.Int) {} - -/* - * access functions (stack -> C) - */ - -// llgo:link (*State).Isnumber C.lua_isnumber -func (L *State) Isnumber(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Isstring C.lua_isstring -func (L *State) Isstring(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Iscfunction C.lua_iscfunction -func (L *State) Iscfunction(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Isinteger C.lua_isinteger -func (L *State) Isinteger(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Isuserdata C.lua_isuserdata -func (L *State) Isuserdata(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Type C.lua_type -func (L *State) Type(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Typename C.lua_typename -func (L *State) Typename(tp c.Int) *c.Char { return nil } - -// llgo:link (*State).Tonumberx C.lua_tonumberx -func (L *State) Tonumberx(idx c.Int, isnum *c.Int) Number { return 0 } - -// llgo:link (*State).Tointegerx C.lua_tointegerx -func (L *State) Tointegerx(idx c.Int, isnum *c.Int) Integer { return 0 } - -// llgo:link (*State).Toboolean C.lua_toboolean -func (L *State) Toboolean(idx c.Int) bool { return false } - -// llgo:link (*State).Tolstring C.lua_tolstring -func (L *State) Tolstring(idx c.Int, len *c.Ulong) *c.Char { return nil } - -// LUA_API lua_Unsigned (lua_rawlen) (State *L, int idx); - -// llgo:link (*State).Tocfunction C.lua_tocfunction -func (L *State) Tocfunction(idx c.Int) CFunction { return nil } - -// llgo:link (*State).Touserdata C.lua_touserdata -func (L *State) Touserdata(idx c.Int) c.Pointer { return nil } - -// llgo:link (*State).Tothread C.lua_tothread -func (L *State) Tothread(idx c.Int) *State { return nil } - -// llgo:link (*State).Topointer C.lua_topointer -func (L *State) Topointer(idx c.Int) c.Pointer { return nil } - -/* - * Comparison and arithmetic functions - */ - -/* - * push functions (C -> stack) - */ - -// llgo:link (*State).Pushnil C.lua_pushnil -func (L *State) Pushnil() {} - -// llgo:link (*State).Pushnumber C.lua_pushnumber -func (L *State) Pushnumber(n Number) {} - -// llgo:link (*State).Pushinteger C.lua_pushinteger -func (L *State) Pushinteger(n Integer) {} - -// llgo:link (*State).Pushlstring C.lua_pushlstring -func (L *State) Pushlstring(s *c.Char, len c.Ulong) *c.Char { return nil } - -// llgo:link (*State).Pushstring C.lua_pushstring -func (L *State) Pushstring(s *c.Char) *c.Char { return nil } - -// llgo:link (*State).Pushfstring C.lua_pushfstring -func (L *State) Pushfstring(format *c.Char, __llgo_va_list ...any) *c.Char { return nil } - -// llgo:link (*State).Pushcclosure C.lua_pushcclosure -func (L *State) Pushcclosure(fn CFunction, n c.Int) {} - -// llgo:link (*State).Pushboolean C.lua_pushboolean -func (L *State) Pushboolean(b c.Int) {} - -// llgo:link (*State).Pushlightuserdata C.lua_pushlightuserdata -func (L *State) Pushlightuserdata(p c.Pointer) {} - -// llgo:link (*State).Pushthread C.lua_pushthread -func (L *State) Pushthread() c.Int { return 0 } - -/* - * get functions (Lua -> stack) - */ - -// llgo:link (*State).Getglobal C.lua_getglobal -func (L *State) Getglobal(name *c.Char) c.Int { return 0 } - -// llgo:link (*State).Gettable C.lua_gettable -func (L *State) Gettable(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Getfield C.lua_getfield -func (L *State) Getfield(idx c.Int, k *c.Char) c.Int { return 0 } - -// llgo:link (*State).Geti C.lua_geti -func (L *State) Geti(idx c.Int, n Integer) c.Int { return 0 } - -// llgo:link (*State).Rawget C.lua_rawget -func (L *State) Rawget(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Rawgeti C.lua_rawgeti -func (L *State) Rawgeti(idx c.Int, n Integer) c.Int { return 0 } - -// llgo:link (*State).Rawgetp C.lua_rawgetp -func (L *State) Rawgetp(idx c.Int, p c.Pointer) c.Int { return 0 } - -// llgo:link (*State).Createtable C.lua_createtable -func (L *State) Createtable(narr c.Int, nrec c.Int) {} - -// llgo:link (*State).Newuserdatauv C.lua_newuserdatauv -func (L *State) Newuserdatauv(sz uintptr, nuvalue c.Int) c.Pointer { return nil } - -// llgo:link (*State).Getmetatable C.lua_getmetatable -func (L *State) Getmetatable(objindex c.Int) c.Int { return 0 } - -// llgo:link (*State).Getiuservalue C.lua_getiuservalue -func (L *State) Getiuservalue(idx c.Int, n c.Int) c.Int { return 0 } - -/* - * set functions (stack -> Lua) - */ - -// llgo:link (*State).Setglobal C.lua_setglobal -func (L *State) Setglobal(name *c.Char) {} - -// llgo:link (*State).Settable C.lua_settable -func (L *State) Settable(idx c.Int) {} - -// llgo:link (*State).Setfield C.lua_setfield -func (L *State) Setfield(idx c.Int, k *c.Char) {} - -// llgo:link (*State).Seti C.lua_seti -func (L *State) Seti(idx c.Int, n Integer) {} - -// llgo:link (*State).Rawset C.lua_rawset -func (L *State) Rawset(idx c.Int) {} - -// llgo:link (*State).Rawseti C.lua_rawseti -func (L *State) Rawseti(idx c.Int, n Integer) {} - -// llgo:link (*State).Rawsetp C.lua_rawsetp -func (L *State) Rawsetp(idx c.Int, p c.Pointer) {} - -// llgo:link (*State).Setmetatable C.lua_setmetatable -func (L *State) Setmetatable(objindex c.Int) c.Int { return 0 } - -// llgo:link (*State).Setiuservalue C.lua_setiuservalue -func (L *State) Setiuservalue(idx c.Int, n c.Int) c.Int { return 0 } - -/* - * 'load' and 'call' functions (load and run Lua code) - */ - -// llgo:link (*State).Callk C.lua_callk -func (L *State) Callk(nargs c.Int, nresults c.Int, ctx KContext, k KFunction) c.Int { - return 0 -} - -func (L *State) Call(nargs c.Int, nresults c.Int) c.Int { - return L.Callk(nargs, nresults, nil, nil) -} - -// llgo:link (*State).Pcallk C.lua_pcallk -func (L *State) Pcallk(nargs c.Int, nresults c.Int, errfunc c.Int, ctx KContext, k KFunction) c.Int { - return 0 -} - -func (L *State) Pcall(nargs c.Int, nresults c.Int, errfunc c.Int) c.Int { - return L.Pcallk(nargs, nresults, errfunc, nil, nil) -} - -// llgo:link (*State).Load C.lua_load -func (L *State) Load(reader Reader, dt c.Pointer, chunkname *c.Char, mode *c.Char) c.Int { return 0 } - -// llgo:link (*State).Dump C.lua_dump -func (L *State) Dump(writer Writer, data c.Pointer, strip c.Int) c.Int { return 0 } - -/* - * coroutine functions - */ - -// llgo:link (*State).Resume C.lua_resume -func (L *State) Resume(from *State, narg c.Int, nres *c.Int) c.Int { return 0 } - -// llgo:link (*State).Status C.lua_status -func (L *State) Status() c.Int { return 0 } - -// llgo:link (*State).Isyieldable C.lua_isyieldable -func (L *State) Isyieldable() c.Int { return 0 } - -// llgo:link (*State).Yieldk C.lua_yieldk -func (L *State) Yieldk(nresults c.Int, ctx KContext, k KFunction) c.Int { return 0 } -func (L *State) Yield(nresults c.Int) c.Int { return L.Yieldk(nresults, nil, nil) } - -/* - * Warning-related functions - */ - -// llgo:link (*State).Setwarnf C.lua_setwarnf -func (L *State) Setwarnf(f WarnFunction, ud c.Pointer) {} - -// llgo:link (*State).Warning C.lua_warning -func (L *State) Warning(msg *c.Char, tocont c.Int) {} - -/* - * garbage-collection function and options - */ - -const ( - GCSTOP = 0 - GCRESTART = 1 - GCCOLLECT = 2 - GCCOUNT = 3 - GCCOUNTB = 4 - GCSTEP = 5 - GCSETPAUSE = 6 - GCSETSTEPMUL = 7 - GCISRUNNING = 9 - GCGEN = 10 - GCINC = 11 -) - -// llgo:link (*State).Gc C.lua_gc -func (L *State) Gc(what c.Int, __llgo_va_list ...any) c.Int { return 0 } - -/* - * miscellaneous functions - */ - -// llgo:link (*State).Next C.lua_next -func (L *State) Next(idx c.Int) c.Int { return 0 } - -// llgo:link (*State).Error C.lua_error -func (L *State) Error() c.Int { return 0 } - -// llgo:link (*State).Concat C.lua_concat -func (L *State) Concat(n c.Int) {} - -// llgo:link (*State).Len C.lua_len -func (L *State) Len(idx c.Int) {} - -// llgo:link (*State).Stringtonumber C.lua_stringtonumber -func (L *State) Stringtonumber(s *c.Char) c.Ulong { return 0 } - -// llgo:link (*State).Getallocf C.lua_getallocf -func (L *State) Getallocf(ud *c.Pointer) Alloc { return nil } - -// llgo:link (*State).Setallocf C.lua_setallocf -func (L *State) Setallocf(f Alloc, ud c.Pointer) Alloc { return nil } - -// llgo:link (*State).Toclose C.lua_toclose -func (L *State) Toclose(idx c.Int) {} - -// llgo:link (*State).Closeslot C.lua_closeslot -func (L *State) Closeslot(idx c.Int) {} - -/* - ** {============================================================== - ** some useful macros - ** =============================================================== - */ - -func (L *State) Getextraspace() c.Pointer { - return c.Pointer(uintptr(c.Pointer(L)) - EXTRASPACE) -} -func (L *State) Tonumber(idx c.Int) Number { return L.Tonumberx(idx, nil) } -func (L *State) Tostring(idx c.Int) *c.Char { return L.Tolstring(idx, nil) } -func (L *State) Tointeger(idx c.Int) Integer { return L.Tointegerx(idx, nil) } -func (L *State) Pop(n c.Int) { L.Settop(-(n) - 1) } -func (L *State) Newtable() { L.Createtable(0, 0) } - -func (L *State) Register(name *c.Char, f CFunction) { - L.Pushcfunction(f) - L.Setglobal(name) -} -func (L *State) Pushcfunction(f CFunction) { L.Pushcclosure(f, 0) } - -func (L *State) Isfunction(n c.Int) bool { return L.Type(n) == c.Int(FUNCTION) } -func (L *State) Istable(n c.Int) bool { return L.Type(n) == c.Int(TABLE) } -func (L *State) Islightuserdata(n c.Int) bool { return L.Type(n) == c.Int(LIGHTUSERDATA) } -func (L *State) Isnil(n c.Int) bool { return L.Type(n) == c.Int(NIL) } -func (L *State) Isboolean(n c.Int) bool { return L.Type(n) == c.Int(BOOLEAN) } -func (L *State) Isthread(n c.Int) bool { return L.Type(n) == c.Int(THREAD) } -func (L *State) Isnone(n c.Int) bool { return L.Type(n) == c.Int(NONE) } -func (L *State) Isnoneornil(n c.Int) bool { return L.Type(n) <= 0 } -func (L *State) Pushliteral(s *c.Char) *c.Char { - return L.Pushstring(s) -} - -func (L *State) Pushglobaltable() c.Int { - return L.Rawgeti(REGISTRYINDEX, RIDX_GLOBALS) -} - -func (L *State) Insert(idx c.Int) { - L.Rotate(idx, 1) -} - -func (L *State) Remove(idx c.Int) { - L.Rotate(idx, -1) - L.Pop(1) -} - -func (L *State) Replace(idx c.Int) { - L.Copy(-1, idx) - L.Pop(1) -} - -/* }============================================================== */ - -/* -** {============================================================== -** compatibility macros -** =============================================================== - */ - -func (L *State) Newuserdata(sz uintptr) c.Pointer { - return L.Newuserdatauv(sz, 1) -} - -func (L *State) Getuservalue(idx c.Int) c.Int { - return L.Getiuservalue(idx, 1) -} - -func (L *State) Setuservalue(idx c.Int) c.Int { - return L.Setiuservalue(idx, 1) -} - -const ( - NUMTAGS = NUMTYPES -) - -/* }============================================================== */ - -/* -** {====================================================================== -** Debug API -** ======================================================================= - */ - -/* - * Event codes - */ - -const ( - HOOKCALL = 0 - HOOKRET = 1 - HOOKLINE = 2 - HOOKCOUNT = 3 - HOOKTAILCALL = 4 -) - -/* - * Event masks - */ - -const ( - MASKCALL = 1 << HOOKCOUNT - MASKRET = 1 << HOOKRET - MASKLINE = 1 << HOOKLINE - MASKCOUNT = 1 << HOOKCOUNT -) - -// llgo:link (*State).Getstack C.lua_getstack -func (L *State) Getstack(level c.Int, ar *Debug) c.Int { return 0 } - -// llgo:link (*State).Getinfo C.lua_getinfo -func (L *State) Getinfo(what *c.Char, ar *Debug) c.Int { return 0 } - -// llgo:link (*State).Getlocal C.lua_getlocal -func (L *State) Getlocal(ar *Debug, n c.Int) *c.Char { return nil } - -// llgo:link (*State).Setlocal C.lua_setlocal -func (L *State) Setlocal(ar *Debug, n c.Int) *c.Char { return nil } - -// llgo:link (*State).Getupvalue C.lua_getupvalue -func (L *State) Getupvalue(funcindex c.Int, n c.Int) *c.Char { return nil } - -// llgo:link (*State).Setupvalue C.lua_setupvalue -func (L *State) Setupvalue(funcindex c.Int, n c.Int) *c.Char { return nil } - -// llgo:link (*State).Upvalueid C.lua_upvalueid -func (L *State) Upvalueid(fidx c.Int, n c.Int) c.Pointer { return nil } - -// llgo:link (*State).Upvaluejoin C.lua_upvaluejoin -func (L *State) Upvaluejoin(fidx1 c.Int, n1 c.Int, fidx2 c.Int, n2 c.Int) {} - -// llgo:link (*State).Sethook C.lua_sethook -func (L *State) Sethook(fn Hook, mask c.Int, count c.Int) {} - -// llgo:link (*State).Gethook C.lua_gethook -func (L *State) Gethook() Hook { return nil } - -// llgo:link (*State).Gethookmask C.lua_gethookmask -func (L *State) Gethookmask() c.Int { return 0 } - -// llgo:link (*State).Gethookcount C.lua_gethookcount -func (L *State) Gethookcount() c.Int { return 0 } - -// llgo:link (*State).Setcstacklimit C.lua_setcstacklimit -func (L *State) Setcstacklimit(limit c.Uint) c.Int { return 0 } - -type CallInfo struct { - Unused [8]byte -} - -type Debug struct { - Event c.Int - Name *c.Char /* (n) */ - Namewhat *c.Char /* (n) 'global', 'local', 'field', 'method' */ - What *c.Char /* (S) 'Lua', 'C', 'main', 'tail' */ - Source *c.Char /* (S) */ - Srclen uintptr /* (S) */ - Currentline c.Int /* (l) */ - Linedefined c.Int /* (S) */ - Lastlinedefined c.Int /* (S) */ - Nups byte /* (u) number of upvalues */ - Nparams byte /* (u) number of parameters */ - Isvararg c.Char /* (u) */ - Istailcall c.Char /* (t) */ - Ftransfer uint16 /* (r) index of first value transferred */ - Ntransfer uint16 /* (r) number of transferred values */ - ShortSrc [IDSIZE]c.Char /* (S) */ - /* private part */ - ICi *CallInfo -} - -/* }====================================================================== */ diff --git a/c/lua/luaconf.go b/c/lua/luaconf.go deleted file mode 100644 index 03bac83c..00000000 --- a/c/lua/luaconf.go +++ /dev/null @@ -1,41 +0,0 @@ -package lua - -import "unsafe" - -/* -** {================================================================== -** Macros that affect the API and must be stable (that is, must be the -** same when you compile Lua and when you compile code that links to -** Lua). -** ===================================================================== - */ - -/* -@@ LUAI_MAXSTACK limits the size of the Lua stack. -** CHANGE it if you need a different limit. This limit is arbitrary; -** its only purpose is to stop Lua from consuming unlimited stack -** space (and to reserve some numbers for pseudo-indices). -** (It must fit into max(size_t)/32 and max(int)/2.) -*/ - -const ( - MAXSTACK = 1000000 -) - -/* -@@ LUA_EXTRASPACE defines the size of a raw memory area associated with -** a Lua state with very fast access. -** CHANGE it if you need a different size. -*/ -const ( - EXTRASPACE = unsafe.Sizeof(uintptr(0)) -) - -/* -@@ LUA_IDSIZE gives the maximum size for the description of the source -** of a function in debug information. -** CHANGE it if you want a different size. -*/ -const ( - IDSIZE = 60 -) diff --git a/c/lua/lualib.go b/c/lua/lualib.go deleted file mode 100644 index 557ccc2a..00000000 --- a/c/lua/lualib.go +++ /dev/null @@ -1,8 +0,0 @@ -package lua - -import ( - _ "unsafe" -) - -// llgo:link (*State).Openlibs C.luaL_openlibs -func (L *State) Openlibs() {} diff --git a/c/math/cmplx/complex.go b/c/math/cmplx/complex.go deleted file mode 100644 index bae82a19..00000000 --- a/c/math/cmplx/complex.go +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package cmplx - -import ( - _ "unsafe" -) - -const ( - LLGoPackage = "decl" -) - -// ----------------------------------------------------------------------------- - -//go:linkname Abs C.cabs -func Abs(z complex128) float64 - -//go:linkname Acos C.cacos -func Acos(z complex128) complex128 - -//go:linkname Acosh C.cacosh -func Acosh(z complex128) complex128 - -//go:linkname Asin C.casin -func Asin(z complex128) complex128 - -//go:linkname Asinh C.casinh -func Asinh(z complex128) complex128 - -//go:linkname Atan C.catan -func Atan(z complex128) complex128 - -//go:linkname Atanh C.catanh -func Atanh(z complex128) complex128 - -//go:linkname Cos C.ccos -func Cos(z complex128) complex128 - -//go:linkname Cosh C.ccosh -func Cosh(z complex128) complex128 - -//go:linkname Exp C.cexp -func Exp(z complex128) complex128 - -//go:linkname Log C.clog -func Log(z complex128) complex128 - -//go:linkname Log10 C.clog10 -func Log10(z complex128) complex128 - -//go:linkname Arg C.carg -func Arg(z complex128) float64 - -//go:linkname Phase C.carg -func Phase(z complex128) float64 - -//go:linkname Pow C.cpow -func Pow(x, y complex128) complex128 - -//go:linkname Sin C.csin -func Sin(z complex128) complex128 - -//go:linkname Sinh C.csinh -func Sinh(z complex128) complex128 - -//go:linkname Sqrt C.csqrt -func Sqrt(z complex128) complex128 - -//go:linkname Tan C.ctan -func Tan(z complex128) complex128 - -//go:linkname Tanh C.ctanh -func Tanh(z complex128) complex128 - -// ----------------------------------------------------------------------------- - -//go:linkname Absf C.cabsf -func Absf(z complex64) float32 - -//go:linkname Acosf C.cacosf -func Acosf(z complex64) complex64 - -//go:linkname Acoshf C.cacoshf -func Acoshf(z complex64) complex64 - -//go:linkname Asinf C.casinf -func Asinf(z complex64) complex64 - -//go:linkname Asinhf C.casinhf -func Asinhf(z complex64) complex64 - -//go:linkname Atanf C.catanf -func Atanf(z complex64) complex64 - -//go:linkname Atanhf C.catanhf -func Atanhf(z complex64) complex64 - -//go:linkname Cosf C.ccosf -func Cosf(z complex64) complex64 - -//go:linkname Coshf C.ccoshf -func Coshf(z complex64) complex64 - -//go:linkname Expf C.cexpf -func Expf(z complex64) complex64 - -//go:linkname Logf C.clogf -func Logf(z complex64) complex64 - -//go:linkname Log10f C.clog10f -func Log10f(z complex64) complex64 - -//go:linkname Argf C.cargf -func Argf(z complex64) float32 - -//go:linkname Phasef C.cargf -func Phasef(z complex64) float32 - -//go:linkname Powf C.cpowf -func Powf(x, y complex64) complex64 - -//go:linkname Sinf C.csinf -func Sinf(z complex64) complex64 - -//go:linkname Sinhf C.csinhf -func Sinhf(z complex64) complex64 - -//go:linkname Sqrtf C.csqrtf -func Sqrtf(z complex64) complex64 - -//go:linkname Tanf C.ctanf -func Tanf(z complex64) complex64 - -//go:linkname Tanhf C.ctanhf -func Tanhf(z complex64) complex64 - -// ----------------------------------------------------------------------------- diff --git a/c/math/math.go b/c/math/math.go deleted file mode 100644 index bd1b416b..00000000 --- a/c/math/math.go +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package math - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "decl" -) - -// ----------------------------------------------------------------------------- - -//go:linkname Acos C.acos -func Acos(x float64) float64 - -//go:linkname Acosh C.acosh -func Acosh(x float64) float64 - -//go:linkname Asin C.asin -func Asin(x float64) float64 - -//go:linkname Asinh C.asinh -func Asinh(x float64) float64 - -//go:linkname Atan C.atan -func Atan(x float64) float64 - -//go:linkname Atan2 C.atan2 -func Atan2(y, x float64) float64 - -//go:linkname Atanh C.atanh -func Atanh(x float64) float64 - -//go:linkname Cbrt C.cbrt -func Cbrt(x float64) float64 - -//go:linkname Ceil C.ceil -func Ceil(x float64) float64 - -//go:linkname Cos C.cos -func Cos(x float64) float64 - -//go:linkname Cosh C.cosh -func Cosh(x float64) float64 - -//go:linkname Copysign C.copysign -func Copysign(x, y float64) float64 - -//go:linkname Erf C.erf -func Erf(x float64) float64 - -//go:linkname Erfc C.erfc -func Erfc(x float64) float64 - -//go:linkname Exp C.exp -func Exp(x float64) float64 - -//go:linkname Exp2 C.exp2 -func Exp2(x float64) float64 - -//go:linkname Expm1 C.expm1 -func Expm1(x float64) float64 - -//go:linkname Fdim C.fdim -func Fdim(x, y float64) float64 - -//go:linkname Floor C.floor -func Floor(x float64) float64 - -//go:linkname Fma C.fma -func Fma(x, y, z float64) float64 - -//go:linkname Fmax C.fmax -func Fmax(x, y float64) float64 - -//go:linkname Fmin C.fmin -func Fmin(x, y float64) float64 - -//go:linkname Fmod C.fmod -func Fmod(x, y float64) float64 - -//go:linkname Frexp C.frexp -func Frexp(x float64, exp *c.Int) float64 - -//go:linkname Gamma C.gamma -func Gamma(x float64) float64 - -//go:linkname Hypot C.hypot -func Hypot(x, y float64) float64 - -//go:linkname Ilogb C.ilogb -func Ilogb(x float64) c.Int - -//go:linkname J0 C.j0 -func J0(x float64) float64 - -//go:linkname J1 C.j1 -func J1(x float64) float64 - -//go:linkname Jn C.jn -func Jn(n c.Int, x float64) float64 - -//go:linkname Ldexp C.ldexp -func Ldexp(x float64, exp c.Int) float64 - -//go:linkname Lgamma C.lgamma -func Lgamma(x float64) float64 - -//go:linkname Log C.log -func Log(x float64) float64 - -//go:linkname Log10 C.log10 -func Log10(x float64) float64 - -//go:linkname Log1p C.log1p -func Log1p(x float64) float64 - -//go:linkname Log2 C.log2 -func Log2(x float64) float64 - -//go:linkname Logb C.logb -func Logb(x float64) float64 - -//go:linkname Modf C.modf -func Modf(x float64, ipart *float64) float64 - -//go:linkname Nan C.nan -func Nan(tag *c.Char) float64 - -//go:linkname Nextafter C.nextafter -func Nextafter(x, y float64) float64 - -//go:linkname Pow C.pow -func Pow(x, y float64) float64 - -//go:linkname Remainder C.remainder -func Remainder(x, y float64) float64 - -//go:linkname Round C.round -func Round(x float64) float64 - -//go:linkname Sin C.sin -func Sin(x float64) float64 - -//go:linkname Sinh C.sinh -func Sinh(x float64) float64 - -//go:linkname Sqrt C.sqrt -func Sqrt(x float64) float64 - -//go:linkname Tan C.tan -func Tan(x float64) float64 - -//go:linkname Tanh C.tanh -func Tanh(x float64) float64 - -//go:linkname Tgamma C.tgamma -func Tgamma(x float64) float64 - -//go:linkname Trunc C.trunc -func Trunc(x float64) float64 - -// ----------------------------------------------------------------------------- - -//go:linkname Acosf C.acosf -func Acosf(x float32) float32 - -//go:linkname Acoshf C.acoshf -func Acoshf(x float32) float32 - -//go:linkname Asinf C.asinf -func Asinf(x float32) float32 - -//go:linkname Asinhf C.asinhf -func Asinhf(x float32) float32 - -//go:linkname Atanf C.atanf -func Atanf(x float32) float32 - -//go:linkname Atan2f C.atan2f -func Atan2f(y, x float32) float32 - -//go:linkname Atanhf C.atanhf -func Atanhf(x float32) float32 - -//go:linkname Cbrtf C.cbrtf -func Cbrtf(x float32) float32 - -//go:linkname Ceilf C.ceilf -func Ceilf(x float32) float32 - -//go:linkname Cosf C.cosf -func Cosf(x float32) float32 - -//go:linkname Coshf C.coshf -func Coshf(x float32) float32 - -//go:linkname Copysignf C.copysignf -func Copysignf(x, y float32) float32 - -//go:linkname Erff C.erff -func Erff(x float32) float32 - -//go:linkname Erfcf C.erfcf -func Erfcf(x float32) float32 - -//go:linkname Expf C.expf -func Expf(x float32) float32 - -//go:linkname Exp2f C.exp2f -func Exp2f(x float32) float32 - -//go:linkname Expm1f C.expm1f -func Expm1f(x float32) float32 - -//go:linkname Fdimf C.fdimf -func Fdimf(x, y float32) float32 - -//go:linkname Floorf C.floorf -func Floorf(x float32) float32 - -//go:linkname Fmaf C.fmaf -func Fmaf(x, y, z float32) float32 - -//go:linkname Fmaxf C.fmaxf -func Fmaxf(x, y float32) float32 - -//go:linkname Fminf C.fminf -func Fminf(x, y float32) float32 - -//go:linkname Fmodf C.fmodf -func Fmodf(x, y float32) float32 - -//go:linkname Frexpf C.frexpf -func Frexpf(x float32, exp *c.Int) float32 - -//go:linkname Gammaf C.gammaf -func Gammaf(x float32) float32 - -//go:linkname Hypotf C.hypotf -func Hypotf(x, y float32) float32 - -//go:linkname Ilogbf C.ilogbf -func Ilogbf(x float32) c.Int - -//go:linkname J0f C.j0f -func J0f(x float32) float32 - -//go:linkname J1f C.j1f -func J1f(x float32) float32 - -//go:linkname Jnf C.jnf -func Jnf(n c.Int, x float32) float32 - -//go:linkname Ldexpf C.ldexpf -func Ldexpf(x float32, exp c.Int) float32 - -//go:linkname Lgammaf C.lgammaf -func Lgammaf(x float32) float32 - -//go:linkname Logf C.logf -func Logf(x float32) float32 - -//go:linkname Log10f C.log10f -func Log10f(x float32) float32 - -//go:linkname Log1pf C.log1pf -func Log1pf(x float32) float32 - -//go:linkname Log2f C.log2f -func Log2f(x float32) float32 - -//go:linkname Logbf C.logbf -func Logbf(x float32) float32 - -//go:linkname Modff C.modff -func Modff(x float32, ipart *float32) float32 - -//go:linkname Nanf C.nanf -func Nanf(tag *c.Char) float32 - -//go:linkname Nextafterf C.nextafterf -func Nextafterf(x, y float32) float32 - -//go:linkname Powf C.powf -func Powf(x, y float32) float32 - -//go:linkname Remainderf C.remainderf -func Remainderf(x, y float32) float32 - -//go:linkname Roundf C.roundf -func Roundf(x float32) float32 - -//go:linkname Sinf C.sinf -func Sinf(x float32) float32 - -//go:linkname Sinhf C.sinhf -func Sinhf(x float32) float32 - -//go:linkname Sqrtf C.sqrtf -func Sqrtf(x float32) float32 - -//go:linkname Tanf C.tanf -func Tanf(x float32) float32 - -//go:linkname Tanhf C.tanhf -func Tanhf(x float32) float32 - -//go:linkname Tgammaf C.tgammaf -func Tgammaf(x float32) float32 - -//go:linkname Truncf C.truncf -func Truncf(x float32) float32 - -// ----------------------------------------------------------------------------- diff --git a/c/math/rand/rand.go b/c/math/rand/rand.go deleted file mode 100644 index 365e0232..00000000 --- a/c/math/rand/rand.go +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package rand - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "decl" -) - -// ----------------------------------------------------------------------------- - -//go:linkname Rand C.rand -func Rand() c.Int - -//go:linkname RandR C.rand_r -func RandR(*c.Uint) c.Int - -//go:linkname Srand C.srand -func Srand(c.Uint) - -//go:linkname Sranddev C.sranddev -func Sranddev() - -// ----------------------------------------------------------------------------- - -//go:linkname Random C.random -func Random() c.Long - -//go:linkname Srandom C.srandom -func Srandom(c.Uint) - -//go:linkname Srandomdev C.srandomdev -func Srandomdev() - -// ----------------------------------------------------------------------------- diff --git a/c/neco/README.md b/c/neco/README.md deleted file mode 100644 index e0f04421..00000000 --- a/c/neco/README.md +++ /dev/null @@ -1,8 +0,0 @@ -llgo wrapper of tidwall/neco -===== - -## How to update source to llgo - -```sh -TODO -``` diff --git a/c/neco/_demo/cgen/_c/gen.c b/c/neco/_demo/cgen/_c/gen.c deleted file mode 100644 index b71c5d81..00000000 --- a/c/neco/_demo/cgen/_c/gen.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "../../../_wrap/neco.h" -#include -#include - -void coroutine(int argc, void *argv[]) { - // Yield each int to the caller, one at a time. - for (int i = 0; i < 10; i++) { - neco_gen_yield(&i); - } -} - -static int __neco_main() { - - // Create a new generator coroutine that is used to send ints. - neco_gen *gen; - neco_gen_start(&gen, sizeof(int), coroutine, 0); - - // Iterate over each int until the generator is closed. - int i; - while (neco_gen_next(gen, &i) != NECO_CLOSED) { - printf("%d\n", i); - } - - // This coroutine no longer needs the generator. - neco_gen_release(gen); - return 0; -} -static void _neco_main() { __neco_exit_prog(__neco_main()); } -void run_main() { - neco_env_setpaniconerror(true); - neco_env_setcanceltype(NECO_CANCEL_ASYNC); - int ret = neco_start(_neco_main, 0); - fprintf(stderr, "neco_start: %s (code %d)\n", neco_strerror(ret), ret); -}; diff --git a/c/neco/_demo/cgen/cgen.go b/c/neco/_demo/cgen/cgen.go deleted file mode 100644 index d00b04f4..00000000 --- a/c/neco/_demo/cgen/cgen.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - _ "unsafe" - - _ "github.com/goplus/llgo/c" -) - -const ( - LLGoFiles = "_c/gen.c; ../../_wrap/neco.c" - LLGoPackage = "link" -) - -func main() { - runMain() -} - -//go:linkname runMain C.run_main -func runMain() diff --git a/c/neco/_demo/gen/gen.go b/c/neco/_demo/gen/gen.go deleted file mode 100644 index 0de37f01..00000000 --- a/c/neco/_demo/gen/gen.go +++ /dev/null @@ -1,37 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/neco" -) - -func coroutine(argc c.Int, argv *c.Pointer) { - // Yield each int to the caller, one at a time. - for i := 0; i < 10; i++ { - neco.GenYield(unsafe.Pointer(&i)) - } -} - -func necoMain(argc c.Int, argv *c.Pointer) { - // Create a new generator coroutine that is used to send ints. - var gen *neco.Gen - neco.GenStart(&gen, unsafe.Sizeof(0), coroutine, 0) - - // Iterate over each int until the generator is closed. - var i int - for neco.GenNext(gen, unsafe.Pointer(&i)) != neco.CLOSED { - c.Printf(c.Str("%d\n"), i) - } - - neco.GenRelease(gen) - neco.ExitProg(0) -} - -func main() { - neco.EnvSetpaniconerror(true) - neco.EnvSetcanceltype(neco.CANCEL_ASYNC) - var ret = neco.Start(necoMain, 0) - c.Fprintf(c.Stderr, c.Str("neco_start: %s (code %d)\n"), neco.Strerror(ret), ret) -} diff --git a/c/neco/_wrap/neco.c b/c/neco/_wrap/neco.c deleted file mode 100644 index 5735360b..00000000 --- a/c/neco/_wrap/neco.c +++ /dev/null @@ -1,8762 +0,0 @@ -// https://github.com/tidwall/neco -// -// Copyright 2024 Joshua J Baker. All rights reserved. -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. -// -// Neco: Coroutine library for C - -/* -//////////////////////////////////////////////////////////////////////////////// -// Compilation options -//////////////////////////////////////////////////////////////////////////////// - -NECO_STACKSIZE // Size of each stack -NECO_DEFCAP // Default stack_group capacity -NECO_MAXCAP // Max stack_group capacity -NECO_GAPSIZE // Size of gap (guard) pages -NECO_SIGSTKSZ // Size of signal stack on main thread -NECO_BURST // Number of read attempts before waiting, def: disabled -NECO_MAXWORKERS // Max number of worker threads, def: 64 -NECO_MAXIOWORKERS // Max number of io threads, def: 2 - -// Additional options that activate features - -NECO_USEGUARDS // Use mprotect'ed guard pages -NECO_NOPAGERELEASE // Do not early release mmapped pages -NECO_NOSTACKFREELIST // Do not use a stack free list -NECO_NOPOOL // Do not use a coroutine and channel pools -NECO_USEHEAPSTACK // Allocate stacks on the heap using malloc -NECO_NOSIGNALS // Disable signal handling -NECO_NOWORKERS // Disable all worker threads, work will run in coroutine -NECO_USEREADWORKERS // Use read workers, disabled by default -NECO_USEWRITEWORKERS // Use write workers, enabled by default on Linux -NECO_NOREADWORKERS // Disable all read workers -NECO_NOWRITEWORKERS // Disable all write workers -*/ - -// Windows and Webassembly have limited features. -#if defined(__EMSCRIPTEN__) || defined(__WIN32) -#define DEF_STACKSIZE 1048576 -#define DEF_DEFCAP 0 -#define DEF_MAXCAP 0 -#define DEF_GAPSIZE 0 -#define DEF_SIGSTKSZ 0 -#define DEF_BURST -1 -#define NECO_USEHEAPSTACK -#define NECO_NOSIGNALS -#define NECO_NOWORKERS -#else -#define DEF_STACKSIZE 8388608 -#define DEF_DEFCAP 4 -#define DEF_MAXCAP 8192 -#define DEF_GAPSIZE 1048576 -#define DEF_SIGSTKSZ 1048576 -#define DEF_BURST -1 -#define DEF_MAXWORKERS 64 -#define DEF_MAXRINGSIZE 32 -#define DEF_MAXIOWORKERS 2 -#endif - -#ifdef __linux__ -#ifndef NECO_USEWRITEWORKERS -#define NECO_USEWRITEWORKERS -#endif -#endif - -#ifndef NECO_STACKSIZE -#define NECO_STACKSIZE DEF_STACKSIZE -#endif -#ifndef NECO_DEFCAP -#define NECO_DEFCAP DEF_DEFCAP -#endif -#ifndef NECO_MAXCAP -#define NECO_MAXCAP DEF_MAXCAP -#endif -#ifndef NECO_GAPSIZE -#define NECO_GAPSIZE DEF_GAPSIZE -#endif -#ifndef NECO_SIGSTKSZ -#define NECO_SIGSTKSZ DEF_SIGSTKSZ -#endif -#ifndef NECO_BURST -#define NECO_BURST DEF_BURST -#endif -#ifndef NECO_MAXWORKERS -#define NECO_MAXWORKERS DEF_MAXWORKERS -#endif -#ifndef NECO_MAXRINGSIZE -#define NECO_MAXRINGSIZE DEF_MAXRINGSIZE -#endif -#ifndef NECO_MAXIOWORKERS -#define NECO_MAXIOWORKERS DEF_MAXIOWORKERS -#endif - -#ifdef NECO_TESTING -#if NECO_BURST <= 0 -#undef NECO_BURST -#define NECO_BURST 1 -#endif -#if NECO_MAXWORKERS > 8 -#undef NECO_MAXWORKERS -#define NECO_MAXWORKERS 8 -#endif -#if NECO_MAXRINGSIZE > 4 -#undef NECO_MAXRINGSIZE -#define NECO_MAXRINGSIZE 4 -#endif -#endif - -// The following is only needed when LLCO_NOASM or LLCO_STACKJMP is defined. -// This same block is duplicated in the llco.c block below. -#ifdef _FORTIFY_SOURCE -#define LLCO_FORTIFY_SOURCE _FORTIFY_SOURCE -// Disable __longjmp_chk validation so that we can jump between stacks. -#pragma push_macro("_FORTIFY_SOURCE") -#undef _FORTIFY_SOURCE -#include -#define _FORTIFY_SOURCE LLCO_FORTIFY_SOURCE -#undef LLCO_FORTIFY_SOURCE -#pragma pop_macro("_FORTIFY_SOURCE") -#endif - -#ifdef _WIN32 -#define _POSIX -#define __USE_MINGW_ALARM -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Embedded dependencies -// The deps/embed.sh command embeds all dependencies into this source file to -// create a single amalgamation file. -//////////////////////////////////////////////////////////////////////////////// -#ifdef NECO_NOAMALGA - -#include "deps/sco.h" -#include "deps/aat.h" -#include "deps/stack.h" - -#ifndef NECO_NOWORKERS -#include "deps/worker.h" -#endif - -#else - -#define SCO_STATIC -#define STACK_STATIC -#define WORKER_STATIC - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif - -// BEGIN sco.c -// https://github.com/tidwall/sco -// -// Copyright 2023 Joshua J Baker. All rights reserved. -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Coroutine scheduler - -#include -#include - -#ifndef SCO_STATIC -#include "sco.h" -#else -#define SCO_EXTERN static -#include -#include -struct sco_desc { - void *stack; - size_t stack_size; - void (*entry)(void *udata); - void (*cleanup)(void *stack, size_t stack_size, void *udata); - void *udata; -}; -struct sco_symbol { - void *cfa; // Canonical Frame Address - void *ip; // Instruction Pointer - const char *fname; // Pathname of shared object - void *fbase; // Base address of shared object - const char *sname; // Name of nearest symbol - void *saddr; // Address of nearest symbol -}; -#define SCO_MINSTACKSIZE 131072 -#endif - -#ifndef SCO_EXTERN -#define SCO_EXTERN -#endif - -//////////////////////////////////////////////////////////////////////////////// -// llco.c -//////////////////////////////////////////////////////////////////////////////// -#ifdef SCO_NOAMALGA - -#include "deps/llco.h" - -#else - -#define LLCO_STATIC - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif - -// BEGIN llco.c -// https://github.com/tidwall/llco -// -// Copyright (c) 2024 Joshua J Baker. -// This software is available as a choice of Public Domain or MIT-0. - -#ifdef _FORTIFY_SOURCE -#define LLCO_FORTIFY_SOURCE _FORTIFY_SOURCE -// Disable __longjmp_chk validation so that we can jump between stacks. -#pragma push_macro("_FORTIFY_SOURCE") -#undef _FORTIFY_SOURCE -#include -#define _FORTIFY_SOURCE LLCO_FORTIFY_SOURCE -#undef LLCO_FORTIFY_SOURCE -#pragma pop_macro("_FORTIFY_SOURCE") -#endif - -#ifndef LLCO_STATIC -#include "llco.h" -#else -#include -#include -#define LLCO_MINSTACKSIZE 16384 -#define LLCO_EXTERN static -struct llco_desc { - void *stack; - size_t stack_size; - void (*entry)(void *udata); - void (*cleanup)(void *stack, size_t stack_size, void *udata); - void *udata; -}; -struct llco_symbol { - void *cfa; - void *ip; - const char *fname; - void *fbase; - const char *sname; - void *saddr; -}; -#endif - -#include - -#ifdef LLCO_VALGRIND -#include -#endif - -#ifndef LLCO_EXTERN -#define LLCO_EXTERN -#endif - -#if defined(__GNUC__) -#ifdef noinline -#define LLCO_NOINLINE noinline -#else -#define LLCO_NOINLINE __attribute__ ((noinline)) -#endif -#ifdef noreturn -#define LLCO_NORETURN noreturn -#else -#define LLCO_NORETURN __attribute__ ((noreturn)) -#endif -#else -#define LLCO_NOINLINE -#define LLCO_NORETURN -#endif - -#if defined(_MSC_VER) -#define __thread __declspec(thread) -#endif - -static void llco_entry(void *arg); - -LLCO_NORETURN -static void llco_exit(void) { - _Exit(0); -} - -#ifdef LLCO_ASM -#error LLCO_ASM must not be defined -#endif - -// Passing the entry function into assembly requires casting the function -// pointer to an object pointer, which is forbidden in the ISO C spec but -// allowed in posix. Ignore the warning attributed to this requirement when -// the -pedantic compiler flag is provide. -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Below is various assembly code adapted from the Lua Coco [MIT] and Minicoro -// [MIT-0] projects by Mike Pall and Eduardo Bart respectively. -//////////////////////////////////////////////////////////////////////////////// - -/* -Lua Coco (coco.luajit.org) -Copyright (C) 2004-2016 Mike Pall. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -//////////////////////////////////////////////////////////////////////////////// -// ARM -//////////////////////////////////////////////////////////////////////////////// -#if defined(__ARM_EABI__) && !defined(LLCO_NOASM) -#define LLCO_ASM -#define LLCO_READY -#define LLCO_METHOD "asm,arm_eabi" - -struct llco_asmctx { -#ifndef __SOFTFP__ - void* f[16]; -#endif - void *d[4]; /* d8-d15 */ - void *r[4]; /* r4-r11 */ - void *lr; - void *sp; -}; - -void _llco_asm_entry(void); -int _llco_asm_switch(struct llco_asmctx *from, struct llco_asmctx *to); - -__asm__( - ".text\n" -#ifdef __APPLE__ - ".globl __llco_asm_switch\n" - "__llco_asm_switch:\n" -#else - ".globl _llco_asm_switch\n" - ".type _llco_asm_switch #function\n" - ".hidden _llco_asm_switch\n" - "_llco_asm_switch:\n" -#endif -#ifndef __SOFTFP__ - " vstmia r0!, {d8-d15}\n" -#endif - " stmia r0, {r4-r11, lr}\n" - " str sp, [r0, #9*4]\n" -#ifndef __SOFTFP__ - " vldmia r1!, {d8-d15}\n" -#endif - " ldr sp, [r1, #9*4]\n" - " ldmia r1, {r4-r11, pc}\n" -#ifndef __APPLE__ - ".size _llco_asm_switch, .-_llco_asm_switch\n" -#endif -); - -__asm__( - ".text\n" -#ifdef __APPLE__ - ".globl __llco_asm_entry\n" - "__llco_asm_entry:\n" -#else - ".globl _llco_asm_entry\n" - ".type _llco_asm_entry #function\n" - ".hidden _llco_asm_entry\n" - "_llco_asm_entry:\n" -#endif - " mov r0, r4\n" - " mov ip, r5\n" - " mov lr, r6\n" - " bx ip\n" -#ifndef __APPLE__ - ".size _llco_asm_entry, .-_llco_asm_entry\n" -#endif -); - -static void llco_asmctx_make(struct llco_asmctx *ctx, void* stack_base, - size_t stack_size, void *arg) -{ - ctx->d[0] = (void*)(arg); - ctx->d[1] = (void*)(llco_entry); - ctx->d[2] = (void*)(0xdeaddead); /* Dummy return address. */ - ctx->lr = (void*)(_llco_asm_entry); - ctx->sp = (void*)((size_t)stack_base + stack_size); -} - -#endif - -//////////////////////////////////////////////////////////////////////////////// -// ARM 64-bit -//////////////////////////////////////////////////////////////////////////////// -#if defined(__aarch64__) && !defined(LLCO_NOASM) -#define LLCO_ASM -#define LLCO_READY -#define LLCO_METHOD "asm,aarch64" - -struct llco_asmctx { - void *x[12]; /* x19-x30 */ - void *sp; - void *lr; - void *d[8]; /* d8-d15 */ -}; - -void _llco_asm_entry(void); -int _llco_asm_switch(struct llco_asmctx *from, struct llco_asmctx *to); - -__asm__( - ".text\n" -#ifdef __APPLE__ - ".globl __llco_asm_switch\n" - "__llco_asm_switch:\n" -#else - ".globl _llco_asm_switch\n" - ".type _llco_asm_switch #function\n" - ".hidden _llco_asm_switch\n" - "_llco_asm_switch:\n" -#endif - - " mov x10, sp\n" - " mov x11, x30\n" - " stp x19, x20, [x0, #(0*16)]\n" - " stp x21, x22, [x0, #(1*16)]\n" - " stp d8, d9, [x0, #(7*16)]\n" - " stp x23, x24, [x0, #(2*16)]\n" - " stp d10, d11, [x0, #(8*16)]\n" - " stp x25, x26, [x0, #(3*16)]\n" - " stp d12, d13, [x0, #(9*16)]\n" - " stp x27, x28, [x0, #(4*16)]\n" - " stp d14, d15, [x0, #(10*16)]\n" - " stp x29, x30, [x0, #(5*16)]\n" - " stp x10, x11, [x0, #(6*16)]\n" - " ldp x19, x20, [x1, #(0*16)]\n" - " ldp x21, x22, [x1, #(1*16)]\n" - " ldp d8, d9, [x1, #(7*16)]\n" - " ldp x23, x24, [x1, #(2*16)]\n" - " ldp d10, d11, [x1, #(8*16)]\n" - " ldp x25, x26, [x1, #(3*16)]\n" - " ldp d12, d13, [x1, #(9*16)]\n" - " ldp x27, x28, [x1, #(4*16)]\n" - " ldp d14, d15, [x1, #(10*16)]\n" - " ldp x29, x30, [x1, #(5*16)]\n" - " ldp x10, x11, [x1, #(6*16)]\n" - " mov sp, x10\n" - " br x11\n" -#ifndef __APPLE__ - ".size _llco_asm_switch, .-_llco_asm_switch\n" -#endif -); - -__asm__( - ".text\n" -#ifdef __APPLE__ - ".globl __llco_asm_entry\n" - "__llco_asm_entry:\n" -#else - ".globl _llco_asm_entry\n" - ".type _llco_asm_entry #function\n" - ".hidden _llco_asm_entry\n" - "_llco_asm_entry:\n" -#endif - " mov x0, x19\n" - " mov x30, x21\n" - " br x20\n" -#ifndef __APPLE__ - ".size _llco_asm_entry, .-_llco_asm_entry\n" -#endif -); - -static void llco_asmctx_make(struct llco_asmctx *ctx, void* stack_base, - size_t stack_size, void *arg) -{ - ctx->x[0] = (void*)(arg); - ctx->x[1] = (void*)(llco_entry); - ctx->x[2] = (void*)(0xdeaddeaddeaddead); /* Dummy return address. */ - ctx->sp = (void*)((size_t)stack_base + stack_size); - ctx->lr = (void*)(_llco_asm_entry); -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -// RISC-V (rv64/rv32) -//////////////////////////////////////////////////////////////////////////////// -#if defined(__riscv) && !defined(LLCO_NOASM) -#define LLCO_ASM -#define LLCO_READY -#define LLCO_METHOD "asm,riscv" - -struct llco_asmctx { - void* s[12]; /* s0-s11 */ - void* ra; - void* pc; - void* sp; -#ifdef __riscv_flen -#if __riscv_flen == 64 - double fs[12]; /* fs0-fs11 */ -#elif __riscv_flen == 32 - float fs[12]; /* fs0-fs11 */ -#endif -#endif /* __riscv_flen */ -}; - -void _llco_asm_entry(void); -int _llco_asm_switch(struct llco_asmctx *from, struct llco_asmctx *to); - -__asm__( - ".text\n" - ".globl _llco_asm_entry\n" - ".type _llco_asm_entry @function\n" - ".hidden _llco_asm_entry\n" - "_llco_asm_entry:\n" - " mv a0, s0\n" - " jr s1\n" - ".size _llco_asm_entry, .-_llco_asm_entry\n" -); - -__asm__( - ".text\n" - ".globl _llco_asm_switch\n" - ".type _llco_asm_switch @function\n" - ".hidden _llco_asm_switch\n" - "_llco_asm_switch:\n" -#if __riscv_xlen == 64 - " sd s0, 0x00(a0)\n" - " sd s1, 0x08(a0)\n" - " sd s2, 0x10(a0)\n" - " sd s3, 0x18(a0)\n" - " sd s4, 0x20(a0)\n" - " sd s5, 0x28(a0)\n" - " sd s6, 0x30(a0)\n" - " sd s7, 0x38(a0)\n" - " sd s8, 0x40(a0)\n" - " sd s9, 0x48(a0)\n" - " sd s10, 0x50(a0)\n" - " sd s11, 0x58(a0)\n" - " sd ra, 0x60(a0)\n" - " sd ra, 0x68(a0)\n" /* pc */ - " sd sp, 0x70(a0)\n" -#ifdef __riscv_flen -#if __riscv_flen == 64 - " fsd fs0, 0x78(a0)\n" - " fsd fs1, 0x80(a0)\n" - " fsd fs2, 0x88(a0)\n" - " fsd fs3, 0x90(a0)\n" - " fsd fs4, 0x98(a0)\n" - " fsd fs5, 0xa0(a0)\n" - " fsd fs6, 0xa8(a0)\n" - " fsd fs7, 0xb0(a0)\n" - " fsd fs8, 0xb8(a0)\n" - " fsd fs9, 0xc0(a0)\n" - " fsd fs10, 0xc8(a0)\n" - " fsd fs11, 0xd0(a0)\n" - " fld fs0, 0x78(a1)\n" - " fld fs1, 0x80(a1)\n" - " fld fs2, 0x88(a1)\n" - " fld fs3, 0x90(a1)\n" - " fld fs4, 0x98(a1)\n" - " fld fs5, 0xa0(a1)\n" - " fld fs6, 0xa8(a1)\n" - " fld fs7, 0xb0(a1)\n" - " fld fs8, 0xb8(a1)\n" - " fld fs9, 0xc0(a1)\n" - " fld fs10, 0xc8(a1)\n" - " fld fs11, 0xd0(a1)\n" -#else -#error "Unsupported RISC-V FLEN" -#endif -#endif /* __riscv_flen */ - " ld s0, 0x00(a1)\n" - " ld s1, 0x08(a1)\n" - " ld s2, 0x10(a1)\n" - " ld s3, 0x18(a1)\n" - " ld s4, 0x20(a1)\n" - " ld s5, 0x28(a1)\n" - " ld s6, 0x30(a1)\n" - " ld s7, 0x38(a1)\n" - " ld s8, 0x40(a1)\n" - " ld s9, 0x48(a1)\n" - " ld s10, 0x50(a1)\n" - " ld s11, 0x58(a1)\n" - " ld ra, 0x60(a1)\n" - " ld a2, 0x68(a1)\n" /* pc */ - " ld sp, 0x70(a1)\n" - " jr a2\n" -#elif __riscv_xlen == 32 - " sw s0, 0x00(a0)\n" - " sw s1, 0x04(a0)\n" - " sw s2, 0x08(a0)\n" - " sw s3, 0x0c(a0)\n" - " sw s4, 0x10(a0)\n" - " sw s5, 0x14(a0)\n" - " sw s6, 0x18(a0)\n" - " sw s7, 0x1c(a0)\n" - " sw s8, 0x20(a0)\n" - " sw s9, 0x24(a0)\n" - " sw s10, 0x28(a0)\n" - " sw s11, 0x2c(a0)\n" - " sw ra, 0x30(a0)\n" - " sw ra, 0x34(a0)\n" /* pc */ - " sw sp, 0x38(a0)\n" -#ifdef __riscv_flen -#if __riscv_flen == 64 - " fsd fs0, 0x3c(a0)\n" - " fsd fs1, 0x44(a0)\n" - " fsd fs2, 0x4c(a0)\n" - " fsd fs3, 0x54(a0)\n" - " fsd fs4, 0x5c(a0)\n" - " fsd fs5, 0x64(a0)\n" - " fsd fs6, 0x6c(a0)\n" - " fsd fs7, 0x74(a0)\n" - " fsd fs8, 0x7c(a0)\n" - " fsd fs9, 0x84(a0)\n" - " fsd fs10, 0x8c(a0)\n" - " fsd fs11, 0x94(a0)\n" - " fld fs0, 0x3c(a1)\n" - " fld fs1, 0x44(a1)\n" - " fld fs2, 0x4c(a1)\n" - " fld fs3, 0x54(a1)\n" - " fld fs4, 0x5c(a1)\n" - " fld fs5, 0x64(a1)\n" - " fld fs6, 0x6c(a1)\n" - " fld fs7, 0x74(a1)\n" - " fld fs8, 0x7c(a1)\n" - " fld fs9, 0x84(a1)\n" - " fld fs10, 0x8c(a1)\n" - " fld fs11, 0x94(a1)\n" -#elif __riscv_flen == 32 - " fsw fs0, 0x3c(a0)\n" - " fsw fs1, 0x40(a0)\n" - " fsw fs2, 0x44(a0)\n" - " fsw fs3, 0x48(a0)\n" - " fsw fs4, 0x4c(a0)\n" - " fsw fs5, 0x50(a0)\n" - " fsw fs6, 0x54(a0)\n" - " fsw fs7, 0x58(a0)\n" - " fsw fs8, 0x5c(a0)\n" - " fsw fs9, 0x60(a0)\n" - " fsw fs10, 0x64(a0)\n" - " fsw fs11, 0x68(a0)\n" - " flw fs0, 0x3c(a1)\n" - " flw fs1, 0x40(a1)\n" - " flw fs2, 0x44(a1)\n" - " flw fs3, 0x48(a1)\n" - " flw fs4, 0x4c(a1)\n" - " flw fs5, 0x50(a1)\n" - " flw fs6, 0x54(a1)\n" - " flw fs7, 0x58(a1)\n" - " flw fs8, 0x5c(a1)\n" - " flw fs9, 0x60(a1)\n" - " flw fs10, 0x64(a1)\n" - " flw fs11, 0x68(a1)\n" -#else -#error "Unsupported RISC-V FLEN" -#endif -#endif /* __riscv_flen */ - " lw s0, 0x00(a1)\n" - " lw s1, 0x04(a1)\n" - " lw s2, 0x08(a1)\n" - " lw s3, 0x0c(a1)\n" - " lw s4, 0x10(a1)\n" - " lw s5, 0x14(a1)\n" - " lw s6, 0x18(a1)\n" - " lw s7, 0x1c(a1)\n" - " lw s8, 0x20(a1)\n" - " lw s9, 0x24(a1)\n" - " lw s10, 0x28(a1)\n" - " lw s11, 0x2c(a1)\n" - " lw ra, 0x30(a1)\n" - " lw a2, 0x34(a1)\n" /* pc */ - " lw sp, 0x38(a1)\n" - " jr a2\n" -#else -#error "Unsupported RISC-V XLEN" -#endif /* __riscv_xlen */ - ".size _llco_asm_switch, .-_llco_asm_switch\n" -); - -static void llco_asmctx_make(struct llco_asmctx *ctx, - void* stack_base, size_t stack_size, void *arg) -{ - ctx->s[0] = (void*)(arg); - ctx->s[1] = (void*)(llco_entry); - ctx->pc = (void*)(_llco_asm_entry); -#if __riscv_xlen == 64 - ctx->ra = (void*)(0xdeaddeaddeaddead); -#elif __riscv_xlen == 32 - ctx->ra = (void*)(0xdeaddead); -#endif - ctx->sp = (void*)((size_t)stack_base + stack_size); -} - -#endif // riscv - -//////////////////////////////////////////////////////////////////////////////// -// x86 -//////////////////////////////////////////////////////////////////////////////// -#if (defined(__i386) || defined(__i386__)) && !defined(LLCO_NOASM) -#define LLCO_ASM -#define LLCO_READY -#define LLCO_METHOD "asm,i386" - -struct llco_asmctx { - void *eip, *esp, *ebp, *ebx, *esi, *edi; -}; - -void _llco_asm_switch(struct llco_asmctx *from, struct llco_asmctx *to); - -__asm__( -#ifdef __DJGPP__ /* DOS compiler */ - "__llco_asm_switch:\n" -#else - ".text\n" - ".globl _llco_asm_switch\n" - ".type _llco_asm_switch @function\n" - ".hidden _llco_asm_switch\n" - "_llco_asm_switch:\n" -#endif - " call 1f\n" - " 1:\n" - " popl %ecx\n" - " addl $(2f-1b), %ecx\n" - " movl 4(%esp), %eax\n" - " movl 8(%esp), %edx\n" - " movl %ecx, (%eax)\n" - " movl %esp, 4(%eax)\n" - " movl %ebp, 8(%eax)\n" - " movl %ebx, 12(%eax)\n" - " movl %esi, 16(%eax)\n" - " movl %edi, 20(%eax)\n" - " movl 20(%edx), %edi\n" - " movl 16(%edx), %esi\n" - " movl 12(%edx), %ebx\n" - " movl 8(%edx), %ebp\n" - " movl 4(%edx), %esp\n" - " jmp *(%edx)\n" - " 2:\n" - " ret\n" -#ifndef __DJGPP__ - ".size _llco_asm_switch, .-_llco_asm_switch\n" -#endif -); - -static void llco_asmctx_make(struct llco_asmctx *ctx, - void* stack_base, size_t stack_size, void *arg) -{ - void** stack_high_ptr = (void**)((size_t)stack_base + stack_size - 16 - - 1*sizeof(size_t)); - stack_high_ptr[0] = (void*)(0xdeaddead); // Dummy return address. - stack_high_ptr[1] = (void*)(arg); - ctx->eip = (void*)(llco_entry); - ctx->esp = (void*)(stack_high_ptr); -} -#endif // __i386__ - -//////////////////////////////////////////////////////////////////////////////// -// x64 -//////////////////////////////////////////////////////////////////////////////// -#if (defined(__x86_64__) || defined(_M_X64)) && !defined(LLCO_NOASM) -#define LLCO_ASM -#define LLCO_READY -#define LLCO_METHOD "asm,x64" - -#ifdef _WIN32 - -struct llco_asmctx { - void *rip, *rsp, *rbp, *rbx, *r12, *r13, *r14, *r15, *rdi, *rsi; - void* xmm[20]; /* xmm6, xmm7, xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, - xmm14, xmm15 */ - void* fiber_storage; - void* dealloc_stack; - void* stack_limit; - void* stack_base; -}; - -#if defined(__GNUC__) -#define LLCO_ASM_BLOB __attribute__((section(".text"))) -#elif defined(_MSC_VER) -#define LLCO_ASM_BLOB __declspec(allocate(".text")) -#pragma section(".text") -#endif - -LLCO_ASM_BLOB static unsigned char llco_wrap_main_code_entry[] = { - 0x4c,0x89,0xe9, // mov %r13,%rcx - 0x41,0xff,0xe4, // jmpq *%r12 - 0xc3, // retq - 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90 // nop -}; - -LLCO_ASM_BLOB static unsigned char llco_asm_switch_code[] = { - 0x48,0x8d,0x05,0x3e,0x01,0x00,0x00, // lea 0x13e(%rip),%rax - 0x48,0x89,0x01, // mov %rax,(%rcx) - 0x48,0x89,0x61,0x08, // mov %rsp,0x8(%rcx) - 0x48,0x89,0x69,0x10, // mov %rbp,0x10(%rcx) - 0x48,0x89,0x59,0x18, // mov %rbx,0x18(%rcx) - 0x4c,0x89,0x61,0x20, // mov %r12,0x20(%rcx) - 0x4c,0x89,0x69,0x28, // mov %r13,0x28(%rcx) - 0x4c,0x89,0x71,0x30, // mov %r14,0x30(%rcx) - 0x4c,0x89,0x79,0x38, // mov %r15,0x38(%rcx) - 0x48,0x89,0x79,0x40, // mov %rdi,0x40(%rcx) - 0x48,0x89,0x71,0x48, // mov %rsi,0x48(%rcx) - 0x0f,0x11,0x71,0x50, // movups %xmm6,0x50(%rcx) - 0x0f,0x11,0x79,0x60, // movups %xmm7,0x60(%rcx) - 0x44,0x0f,0x11,0x41,0x70, // movups %xmm8,0x70(%rcx) - 0x44,0x0f,0x11,0x89,0x80,0x00,0x00,0x00, // movups %xmm9,0x80(%rcx) - 0x44,0x0f,0x11,0x91,0x90,0x00,0x00,0x00, // movups %xmm10,0x90(%rcx) - 0x44,0x0f,0x11,0x99,0xa0,0x00,0x00,0x00, // movups %xmm11,0xa0(%rcx) - 0x44,0x0f,0x11,0xa1,0xb0,0x00,0x00,0x00, // movups %xmm12,0xb0(%rcx) - 0x44,0x0f,0x11,0xa9,0xc0,0x00,0x00,0x00, // movups %xmm13,0xc0(%rcx) - 0x44,0x0f,0x11,0xb1,0xd0,0x00,0x00,0x00, // movups %xmm14,0xd0(%rcx) - 0x44,0x0f,0x11,0xb9,0xe0,0x00,0x00,0x00, // movups %xmm15,0xe0(%rcx) - 0x65,0x4c,0x8b,0x14,0x25,0x30,0x00,0x00,0x00, // mov %gs:0x30,%r10 - 0x49,0x8b,0x42,0x20, // mov 0x20(%r10),%rax - 0x48,0x89,0x81,0xf0,0x00,0x00,0x00, // mov %rax,0xf0(%rcx) - 0x49,0x8b,0x82,0x78,0x14,0x00,0x00, // mov 0x1478(%r10),%rax - 0x48,0x89,0x81,0xf8,0x00,0x00,0x00, // mov %rax,0xf8(%rcx) - 0x49,0x8b,0x42,0x10, // mov 0x10(%r10),%rax - 0x48,0x89,0x81,0x00,0x01,0x00,0x00, // mov %rax,0x100(%rcx) - 0x49,0x8b,0x42,0x08, // mov 0x8(%r10),%rax - 0x48,0x89,0x81,0x08,0x01,0x00,0x00, // mov %rax,0x108(%rcx) - 0x48,0x8b,0x82,0x08,0x01,0x00,0x00, // mov 0x108(%rdx),%rax - 0x49,0x89,0x42,0x08, // mov %rax,0x8(%r10) - 0x48,0x8b,0x82,0x00,0x01, 0x00, 0x00, // mov 0x100(%rdx),%rax - 0x49,0x89,0x42,0x10, // mov %rax,0x10(%r10) - 0x48,0x8b,0x82,0xf8,0x00, 0x00, 0x00, // mov 0xf8(%rdx),%rax - 0x49,0x89,0x82,0x78,0x14, 0x00, 0x00, // mov %rax,0x1478(%r10) - 0x48,0x8b,0x82,0xf0,0x00, 0x00, 0x00, // mov 0xf0(%rdx),%rax - 0x49,0x89,0x42,0x20, // mov %rax,0x20(%r10) - 0x44,0x0f,0x10,0xba,0xe0,0x00,0x00,0x00, // movups 0xe0(%rdx),%xmm15 - 0x44,0x0f,0x10,0xb2,0xd0,0x00,0x00,0x00, // movups 0xd0(%rdx),%xmm14 - 0x44,0x0f,0x10,0xaa,0xc0,0x00,0x00,0x00, // movups 0xc0(%rdx),%xmm13 - 0x44,0x0f,0x10,0xa2,0xb0,0x00,0x00,0x00, // movups 0xb0(%rdx),%xmm12 - 0x44,0x0f,0x10,0x9a,0xa0,0x00,0x00,0x00, // movups 0xa0(%rdx),%xmm11 - 0x44,0x0f,0x10,0x92,0x90,0x00,0x00,0x00, // movups 0x90(%rdx),%xmm10 - 0x44,0x0f,0x10,0x8a,0x80,0x00,0x00,0x00, // movups 0x80(%rdx),%xmm9 - 0x44,0x0f,0x10,0x42,0x70, // movups 0x70(%rdx),%xmm8 - 0x0f,0x10,0x7a,0x60, // movups 0x60(%rdx),%xmm7 - 0x0f,0x10,0x72,0x50, // movups 0x50(%rdx),%xmm6 - 0x48,0x8b,0x72,0x48, // mov 0x48(%rdx),%rsi - 0x48,0x8b,0x7a,0x40, // mov 0x40(%rdx),%rdi - 0x4c,0x8b,0x7a,0x38, // mov 0x38(%rdx),%r15 - 0x4c,0x8b,0x72,0x30, // mov 0x30(%rdx),%r14 - 0x4c,0x8b,0x6a,0x28, // mov 0x28(%rdx),%r13 - 0x4c,0x8b,0x62,0x20, // mov 0x20(%rdx),%r12 - 0x48,0x8b,0x5a,0x18, // mov 0x18(%rdx),%rbx - 0x48,0x8b,0x6a,0x10, // mov 0x10(%rdx),%rbp - 0x48,0x8b,0x62,0x08, // mov 0x8(%rdx),%rsp - 0xff,0x22, // jmpq *(%rdx) - 0xc3, // retq - 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, // nop - 0x90,0x90, // nop -}; - -void (*_llco_asm_entry)(void) = - (void(*)(void))(void*)llco_wrap_main_code_entry; -void (*_llco_asm_switch)(struct llco_asmctx *from, - struct llco_asmctx *to) = (void(*)(struct llco_asmctx *from, - struct llco_asmctx *to))(void*)llco_asm_switch_code; - -static void llco_asmctx_make(struct llco_asmctx *ctx, - void* stack_base, size_t stack_size, void *arg) -{ - stack_size = stack_size - 32; // Reserve 32 bytes for the shadow space. - void** stack_high_ptr = (void**)((size_t)stack_base + stack_size - - sizeof(size_t)); - stack_high_ptr[0] = (void*)(0xdeaddeaddeaddead); // Dummy return address. - ctx->rip = (void*)(_llco_asm_entry); - ctx->rsp = (void*)(stack_high_ptr); - ctx->r12 = (void*)(llco_entry); - ctx->r13 = (void*)(arg); - void* stack_top = (void*)((size_t)stack_base + stack_size); - ctx->stack_base = stack_top; - ctx->stack_limit = stack_base; - ctx->dealloc_stack = stack_base; -} - -#else - -struct llco_asmctx { - void *rip, *rsp, *rbp, *rbx, *r12, *r13, *r14, *r15; -}; - -void _llco_asm_entry(void); -int _llco_asm_switch(struct llco_asmctx *from, struct llco_asmctx *to); - -__asm__( - ".text\n" -#ifdef __MACH__ /* Mac OS X assembler */ - ".globl __llco_asm_entry\n" - "__llco_asm_entry:\n" -#else /* Linux assembler */ - ".globl _llco_asm_entry\n" - ".type _llco_asm_entry @function\n" - ".hidden _llco_asm_entry\n" - "_llco_asm_entry:\n" -#endif - " movq %r13, %rdi\n" - " jmpq *%r12\n" -#ifndef __MACH__ - ".size _llco_asm_entry, .-_llco_asm_entry\n" -#endif -); - -__asm__( - ".text\n" -#ifdef __MACH__ /* Mac OS assembler */ - ".globl __llco_asm_switch\n" - "__llco_asm_switch:\n" -#else /* Linux assembler */ - ".globl _llco_asm_switch\n" - ".type _llco_asm_switch @function\n" - ".hidden _llco_asm_switch\n" - "_llco_asm_switch:\n" -#endif - " leaq 0x3d(%rip), %rax\n" - " movq %rax, (%rdi)\n" - " movq %rsp, 8(%rdi)\n" - " movq %rbp, 16(%rdi)\n" - " movq %rbx, 24(%rdi)\n" - " movq %r12, 32(%rdi)\n" - " movq %r13, 40(%rdi)\n" - " movq %r14, 48(%rdi)\n" - " movq %r15, 56(%rdi)\n" - " movq 56(%rsi), %r15\n" - " movq 48(%rsi), %r14\n" - " movq 40(%rsi), %r13\n" - " movq 32(%rsi), %r12\n" - " movq 24(%rsi), %rbx\n" - " movq 16(%rsi), %rbp\n" - " movq 8(%rsi), %rsp\n" - " jmpq *(%rsi)\n" - " ret\n" -#ifndef __MACH__ - ".size _llco_asm_switch, .-_llco_asm_switch\n" -#endif -); - -static void llco_asmctx_make(struct llco_asmctx *ctx, - void* stack_base, size_t stack_size, void *arg) -{ - // Reserve 128 bytes for the Red Zone space (System V AMD64 ABI). - stack_size = stack_size - 128; - void** stack_high_ptr = (void**)((size_t)stack_base + stack_size - - sizeof(size_t)); - stack_high_ptr[0] = (void*)(0xdeaddeaddeaddead); // Dummy return address. - ctx->rip = (void*)(_llco_asm_entry); - ctx->rsp = (void*)(stack_high_ptr); - ctx->r12 = (void*)(llco_entry); - ctx->r13 = (void*)(arg); -} - -#endif -#endif // x64 - -// --- END ASM Code --- // - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -//////////////////////////////////////////////////////////////////////////////// -// ASM with stackjmp activated -//////////////////////////////////////////////////////////////////////////////// -#if defined(LLCO_READY) && defined(LLCO_STACKJMP) -LLCO_NOINLINE LLCO_NORETURN -static void llco_stackjmp(void *stack, size_t stack_size, - void(*entry)(void *arg)) -{ - struct llco_asmctx ctx = { 0 }; - llco_asmctx_make(&ctx, stack, stack_size, 0); - struct llco_asmctx ctx0 = { 0 }; - _llco_asm_switch(&ctx0, &ctx); - llco_exit(); -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Windows Fibers -//////////////////////////////////////////////////////////////////////////////// -#if defined(_WIN32) && !defined(LLCO_READY) -#define LLCO_WINDOWS -#define LLCO_READY -#define LLCO_METHOD "fibers,windows" - -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0400 -#endif -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include - -#error Windows fibers unsupported - -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Webassembly Fibers -//////////////////////////////////////////////////////////////////////////////// -#if defined(__EMSCRIPTEN__) && !defined(LLCO_READY) -#define LLCO_WASM -#define LLCO_READY -#define LLCO_METHOD "fibers,emscripten" - -#include -#include - -#ifndef LLCO_ASYNCIFY_STACK_SIZE -#define LLCO_ASYNCIFY_STACK_SIZE 4096 -#endif - -static __thread char llco_main_stack[LLCO_ASYNCIFY_STACK_SIZE]; - -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Ucontext -//////////////////////////////////////////////////////////////////////////////// -#if !defined(LLCO_READY) -#define LLCO_UCONTEXT -#define LLCO_READY -#define LLCO_METHOD "ucontext" -#ifndef LLCO_STACKJMP -#define LLCO_STACKJMP -#endif - -#if defined(__FreeBSD__) || defined(__APPLE__) -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#endif -#define _XOPEN_SOURCE -#endif -#include - -static __thread ucontext_t stackjmp_ucallee; -static __thread int stackjmp_ucallee_gotten = 0; - -#if defined(__APPLE__) && defined(__aarch64__) && !defined(LLCO_NOSTACKADJUST) -// Here we ensure that the initial context switch will *not* page the -// entire stack into process memory before executing the entry point -// function. Which is a behavior that can be observed on Mac OS with -// Apple Silicon. This "trick" can be optionally removed at the expense -// of slower initial jumping into large stacks. -enum llco_stack_grows { DOWNWARDS, UPWARDS }; - -static enum llco_stack_grows llco_stack_grows0(int *addr0) { - int addr1; - return addr0 < &addr1 ? UPWARDS : DOWNWARDS; -} - -static enum llco_stack_grows llco_stack_grows(void) { - int addr0; - return llco_stack_grows0(&addr0); -} - -static void llco_adjust_ucontext_stack(ucontext_t *ucp) { - if (llco_stack_grows() == UPWARDS) { - ucp->uc_stack.ss_sp = (char*)ucp->uc_stack.ss_sp+ucp->uc_stack.ss_size; - ucp->uc_stack.ss_size = 0; - } -} -#else -#define llco_adjust_ucontext_stack(ucp) -#endif - -// Ucontext always uses stackjmp with setjmp/longjmp, instead of swapcontext -// becuase it's much faster. -LLCO_NOINLINE LLCO_NORETURN -static void llco_stackjmp(void *stack, size_t stack_size, - void(*entry)(void *arg)) -{ - if (!stackjmp_ucallee_gotten) { - stackjmp_ucallee_gotten = 1; - getcontext(&stackjmp_ucallee); - } - stackjmp_ucallee.uc_stack.ss_sp = stack; - stackjmp_ucallee.uc_stack.ss_size = stack_size; - llco_adjust_ucontext_stack(&stackjmp_ucallee); - makecontext(&stackjmp_ucallee, (void(*)(void))entry, 0); - setcontext(&stackjmp_ucallee); - llco_exit(); -} - -#endif // Ucontext - -#if defined(LLCO_STACKJMP) -#include -#ifdef _WIN32 -// For reasons outside of my understanding, Windows does not allow for jumping -// between stacks using the setjmp/longjmp mechanism. -#error Windows stackjmp not supported -#endif -#endif - -//////////////////////////////////////////////////////////////////////////////// -// llco switching code -//////////////////////////////////////////////////////////////////////////////// - -#include - -struct llco { - struct llco_desc desc; -#if defined(LLCO_STACKJMP) - jmp_buf buf; -#elif defined(LLCO_ASM) - struct llco_asmctx ctx; -#elif defined(LLCO_WASM) - emscripten_fiber_t fiber; -#elif defined(LLCO_WINDOWS) - LPVOID fiber; -#endif -#ifdef LLCO_VALGRIND - int valgrind_stack_id; -#endif -#if defined(__GNUC__) - void *uw_stop_ip; // record of the last unwind ip. -#endif -}; - -#ifdef LLCO_VALGRIND -static __thread unsigned int llco_valgrind_stack_id = 0; -static __thread unsigned int llco_cleanup_valgrind_stack_id = 0; -#endif - -static __thread struct llco llco_thread = { 0 }; -static __thread struct llco *llco_cur = NULL; -static __thread struct llco_desc llco_desc; -static __thread volatile bool llco_cleanup_needed = false; -static __thread volatile struct llco_desc llco_cleanup_desc; -static __thread volatile bool llco_cleanup_active = false; - -#define llco_cleanup_guard() { \ - if (llco_cleanup_active) { \ - fprintf(stderr, "%s not available during cleanup\n", __func__); \ - abort(); \ - } \ -} - -static void llco_cleanup_last(void) { - if (llco_cleanup_needed) { - if (llco_cleanup_desc.cleanup) { - llco_cleanup_active = true; -#ifdef LLCO_VALGRIND - VALGRIND_STACK_DEREGISTER(llco_cleanup_valgrind_stack_id); -#endif - llco_cleanup_desc.cleanup(llco_cleanup_desc.stack, - llco_cleanup_desc.stack_size, llco_cleanup_desc.udata); - llco_cleanup_active = false; - } - llco_cleanup_needed = false; - } -} - -LLCO_NOINLINE -static void llco_entry_wrap(void *arg) { - llco_cleanup_last(); -#if defined(LLCO_WASM) - llco_cur = arg; - llco_cur->desc = llco_desc; -#else - (void)arg; - struct llco self = { .desc = llco_desc }; - llco_cur = &self; -#endif -#ifdef LLCO_VALGRIND - llco_cur->valgrind_stack_id = llco_valgrind_stack_id; -#endif -#if defined(__GNUC__) && !defined(__EMSCRIPTEN__) - llco_cur->uw_stop_ip = __builtin_return_address(0); -#endif - llco_cur->desc.entry(llco_cur->desc.udata); -} - - -LLCO_NOINLINE LLCO_NORETURN -static void llco_entry(void *arg) { - llco_entry_wrap(arg); - llco_exit(); -} - -LLCO_NOINLINE -static void llco_switch1(struct llco *from, struct llco *to, - void *stack, size_t stack_size) -{ -#ifdef LLCO_VALGRIND - llco_valgrind_stack_id = VALGRIND_STACK_REGISTER(stack, stack + stack_size); -#endif -#if defined(LLCO_STACKJMP) - if (to) { - if (!_setjmp(from->buf)) { - _longjmp(to->buf, 1); - } - } else { - if (!_setjmp(from->buf)) { - llco_stackjmp(stack, stack_size, llco_entry); - } - } -#elif defined(LLCO_ASM) - if (to) { - _llco_asm_switch(&from->ctx, &to->ctx); - } else { - struct llco_asmctx ctx = { 0 }; - llco_asmctx_make(&ctx, stack, stack_size, 0); - _llco_asm_switch(&from->ctx, &ctx); - } -#elif defined(LLCO_WASM) - if (to) { - emscripten_fiber_swap(&from->fiber, &to->fiber); - } else { - if (from == &llco_thread) { - emscripten_fiber_init_from_current_context(&from->fiber, - llco_main_stack, LLCO_ASYNCIFY_STACK_SIZE); - } - stack_size -= LLCO_ASYNCIFY_STACK_SIZE; - char *astack = ((char*)stack) + stack_size; - size_t astack_size = LLCO_ASYNCIFY_STACK_SIZE - sizeof(struct llco); - struct llco *self = (void*)(astack + astack_size); - memset(self, 0, sizeof(struct llco)); - emscripten_fiber_init(&self->fiber, llco_entry, - self, stack, stack_size, astack, astack_size); - emscripten_fiber_swap(&from->fiber, &self->fiber); - } -#elif defined(LLCO_WINDOWS) - // Unsupported -#endif -} - -static void llco_switch0(struct llco_desc *desc, struct llco *co, - bool final) -{ - struct llco *from = llco_cur ? llco_cur : &llco_thread; - struct llco *to = desc ? NULL : co ? co : &llco_thread; - if (from != to) { - if (final) { - llco_cleanup_needed = true; - llco_cleanup_desc = from->desc; -#ifdef LLCO_VALGRIND - llco_cleanup_valgrind_stack_id = from->valgrind_stack_id; -#endif - } - if (desc) { - llco_desc = *desc; - llco_switch1(from, 0, desc->stack, desc->stack_size); - } else { - llco_cur = to; - llco_switch1(from, to, 0, 0); - } - llco_cleanup_last(); - } -} - - - -//////////////////////////////////////////////////////////////////////////////// -// Exported methods -//////////////////////////////////////////////////////////////////////////////// - -// Start a new coroutine. -LLCO_EXTERN -void llco_start(struct llco_desc *desc, bool final) { - if (!desc || desc->stack_size < LLCO_MINSTACKSIZE) { - fprintf(stderr, "stack too small\n"); - abort(); - } - llco_cleanup_guard(); - llco_switch0(desc, 0, final); -} - -// Switch to another coroutine. -LLCO_EXTERN -void llco_switch(struct llco *co, bool final) { -#if defined(LLCO_ASM) - // fast track context switch. Saves a few nanoseconds by checking the - // exception condition first. - if (!llco_cleanup_active && llco_cur && co && llco_cur != co && !final) { - struct llco *from = llco_cur; - llco_cur = co; - _llco_asm_switch(&from->ctx, &co->ctx); - llco_cleanup_last(); - return; - } -#endif - llco_cleanup_guard(); - llco_switch0(0, co, final); -} - -// Return the current coroutine or NULL if not currently running in a -// coroutine. -LLCO_EXTERN -struct llco *llco_current(void) { - llco_cleanup_guard(); - return llco_cur == &llco_thread ? 0 : llco_cur; -} - -// Returns a string that indicates which coroutine method is being used by -// the program. Such as "asm" or "ucontext", etc. -LLCO_EXTERN -const char *llco_method(void *caps) { - (void)caps; - return LLCO_METHOD -#ifdef LLCO_STACKJMP - ",stackjmp" -#endif - ; -} - -#if defined(__GNUC__) && !defined(__EMSCRIPTEN__) && !defined(_WIN32) && \ - !defined(LLCO_NOUNWIND) - -#include -#include -#include - -struct llco_dlinfo { - const char *dli_fname; /* Pathname of shared object */ - void *dli_fbase; /* Base address of shared object */ - const char *dli_sname; /* Name of nearest symbol */ - void *dli_saddr; /* Address of nearest symbol */ -}; - - -#if defined(__linux__) && !defined(_GNU_SOURCE) -int dladdr(const void *, void *); -#endif - -static void llco_getsymbol(struct _Unwind_Context *uwc, - struct llco_symbol *sym) -{ - memset(sym, 0, sizeof(struct llco_symbol)); - sym->cfa = (void*)_Unwind_GetCFA(uwc); - int ip_before; /* unused */ - sym->ip = (void*)_Unwind_GetIPInfo(uwc, &ip_before); - struct llco_dlinfo dlinfo = { 0 }; - if (sym->ip && dladdr(sym->ip, (void*)&dlinfo)) { - sym->fname = dlinfo.dli_fname; - sym->fbase = dlinfo.dli_fbase; - sym->sname = dlinfo.dli_sname; - sym->saddr = dlinfo.dli_saddr; - } -} - -struct llco_unwind_context { - void *udata; - void *start_ip; - bool started; - int nsymbols; - int nsymbols_actual; - struct llco_symbol last; - bool (*func)(struct llco_symbol *, void *); - void *unwind_addr; -}; - -static _Unwind_Reason_Code llco_func(struct _Unwind_Context *uwc, void *ptr) { - struct llco_unwind_context *ctx = ptr; - - struct llco *cur = llco_current(); - if (cur && !cur->uw_stop_ip) { - return _URC_END_OF_STACK; - } - struct llco_symbol sym; - llco_getsymbol(uwc, &sym); - if (ctx->start_ip && !ctx->started && sym.ip != ctx->start_ip) { - return _URC_NO_REASON; - } - ctx->started = true; - if (!sym.ip || (cur && sym.ip == cur->uw_stop_ip)) { - return _URC_END_OF_STACK; - } - ctx->nsymbols++; - if (!cur) { - ctx->nsymbols_actual++; - if (ctx->func && !ctx->func(&sym, ctx->udata)) { - return _URC_END_OF_STACK; - } - } else { - if (ctx->nsymbols > 1) { - ctx->nsymbols_actual++; - if (ctx->func && !ctx->func(&ctx->last, ctx->udata)) { - return _URC_END_OF_STACK; - } - } - ctx->last = sym; - } - return _URC_NO_REASON; -} - -LLCO_EXTERN -int llco_unwind(bool(*func)(struct llco_symbol *sym, void *udata), void *udata){ - struct llco_unwind_context ctx = { -#if defined(__GNUC__) && !defined(__EMSCRIPTEN__) - .start_ip = __builtin_return_address(0), -#endif - .func = func, - .udata = udata - }; - _Unwind_Backtrace(llco_func, &ctx); - return ctx.nsymbols_actual; -} - -#else - -LLCO_EXTERN -int llco_unwind(bool(*func)(struct llco_symbol *sym, void *udata), void *udata){ - (void)func; (void)udata; - /* Unsupported */ - return 0; -} - -#endif -// END llco.c - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -#endif - -#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__linux__) -#include -static void sched_yield0(void) { - sched_yield(); -} -#else -#define sched_yield0() -#endif - -//////////////////////////////////////////////////////////////////////////////// -// aat.h -//////////////////////////////////////////////////////////////////////////////// -#ifdef SCO_NOAMALGA - -#include "deps/aat.h" - -#else - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif - -// BEGIN aat.h -// https://github.com/tidwall/aatree -// -// Copyright 2023 Joshua J Baker. All rights reserved. -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Single header file for generating aat binary search trees. - -#ifndef AAT_H -#define AAT_H - -#define AAT_DEF(specifiers, prefix, type) \ -specifiers type *prefix##_insert(type **root, type *item); \ -specifiers type *prefix##_delete(type **root, type *key); \ -specifiers type *prefix##_search(type **root, type *key); \ -specifiers type *prefix##_delete_first(type **root); \ -specifiers type *prefix##_delete_last(type **root); \ -specifiers type *prefix##_first(type **root); \ -specifiers type *prefix##_last(type **root); \ -specifiers type *prefix##_iter(type **root, type *key); \ -specifiers type *prefix##_prev(type **root, type *item); \ -specifiers type *prefix##_next(type **root, type *item); \ - -#define AAT_FIELDS(type, left, right, level) \ -type *left; \ -type *right; \ -int level; \ - -#define AAT_IMPL(prefix, type, left, right, level, compare) \ -static void prefix##_clear(type *node) { \ - if (node) { \ - node->left = 0; \ - node->right = 0; \ - node->level = 0; \ - } \ -} \ - \ -static type *prefix##_skew(type *node) { \ - if (node && node->left && \ - node->left->level == node->level) \ - { \ - type *left_node = node->left; \ - node->left = left_node->right; \ - left_node->right = node; \ - node = left_node; \ - } \ - return node; \ -} \ - \ -static type *prefix##_split(type *node) { \ - if (node && node->right && node->right->right && \ - node->right->right->level == node->level) \ - { \ - type *right_node = node->right; \ - node->right = right_node->left; \ - right_node->left = node; \ - right_node->level++; \ - node = right_node; \ - } \ - return node; \ -} \ - \ -static type *prefix##_insert0(type *node, type *item, type **replaced) { \ - if (!node) { \ - item->left = 0; \ - item->right = 0; \ - item->level = 1; \ - node = item; \ - } else { \ - int cmp = compare(item, node); \ - if (cmp < 0) { \ - node->left = prefix##_insert0(node->left, item, replaced); \ - } else if (cmp > 0) { \ - node->right = prefix##_insert0(node->right, item, replaced); \ - } else { \ - *replaced = node; \ - item->left = node->left; \ - item->right = node->right; \ - item->level = node->level; \ - node = item; \ - } \ - } \ - node = prefix##_skew(node); \ - node = prefix##_split(node); \ - return node; \ -} \ - \ -type *prefix##_insert(type **root, type *item) { \ - type *replaced = 0; \ - *root = prefix##_insert0(*root, item, &replaced); \ - if (replaced != item) { \ - prefix##_clear(replaced); \ - } \ - return replaced; \ -} \ - \ -static type *prefix##_decrease_level(type *node) { \ - if (node->left || node->right) { \ - int new_level = 0; \ - if (node->left && node->right) { \ - if (node->left->level < node->right->level) { \ - new_level = node->left->level; \ - } else { \ - new_level = node->right->level; \ - } \ - } \ - new_level++; \ - if (new_level < node->level) { \ - node->level = new_level; \ - if (node->right && new_level < node->right->level) { \ - node->right->level = new_level; \ - } \ - } \ - } \ - return node; \ -} \ - \ -static type *prefix##_delete_fixup(type *node) { \ - node = prefix##_decrease_level(node); \ - node = prefix##_skew(node); \ - node->right = prefix##_skew(node->right); \ - if (node->right && node->right->right) { \ - node->right->right = prefix##_skew(node->right->right); \ - } \ - node = prefix##_split(node); \ - node->right = prefix##_split(node->right); \ - return node; \ -} \ - \ -static type *prefix##_delete_first0(type *node, \ - type **deleted) \ -{ \ - if (node) { \ - if (!node->left) { \ - *deleted = node; \ - if (node->right) { \ - node = node->right; \ - } else { \ - node = 0; \ - } \ - } else { \ - node->left = prefix##_delete_first0(node->left, deleted); \ - node = prefix##_delete_fixup(node); \ - } \ - } \ - return node; \ -} \ - \ -static type *prefix##_delete_last0(type *node, \ - type **deleted) \ -{ \ - if (node) { \ - if (!node->right) { \ - *deleted = node; \ - if (node->left) { \ - node = node->left; \ - } else { \ - node = 0; \ - } \ - } else { \ - node->right = prefix##_delete_last0(node->right, deleted); \ - node = prefix##_delete_fixup(node); \ - } \ - } \ - return node; \ -} \ - \ -type *prefix##_delete_first(type **root) { \ - type *deleted = 0; \ - *root = prefix##_delete_first0(*root, &deleted); \ - prefix##_clear(deleted); \ - return deleted; \ -} \ - \ -type *prefix##_delete_last(type **root) { \ - type *deleted = 0; \ - *root = prefix##_delete_last0(*root, &deleted); \ - prefix##_clear(deleted); \ - return deleted; \ -} \ - \ -static type *prefix##_delete0(type *node, \ - type *key, type **deleted) \ -{ \ - if (node) { \ - int cmp = compare(key, node); \ - if (cmp < 0) { \ - node->left = prefix##_delete0(node->left, key, deleted); \ - } else if (cmp > 0) { \ - node->right = prefix##_delete0(node->right, key, deleted); \ - } else { \ - *deleted = node; \ - if (!node->left && !node->right) { \ - node = 0; \ - } else { \ - type *leaf_deleted = 0; \ - if (!node->left) { \ - node->right = prefix##_delete_first0(node->right, \ - &leaf_deleted); \ - } else { \ - node->left = prefix##_delete_last0(node->left, \ - &leaf_deleted); \ - } \ - leaf_deleted->left = node->left; \ - leaf_deleted->right = node->right; \ - leaf_deleted->level = node->level; \ - node = leaf_deleted; \ - } \ - } \ - if (node) { \ - node = prefix##_delete_fixup(node); \ - } \ - } \ - return node; \ -} \ - \ -type *prefix##_delete(type **root, type *key) { \ - type *deleted = 0; \ - *root = prefix##_delete0(*root, key, &deleted); \ - prefix##_clear(deleted); \ - return deleted; \ -} \ - \ -type *prefix##_search(type **root, type *key) { \ - type *found = 0; \ - type *node = *root; \ - while (node) { \ - int cmp = compare(key, node); \ - if (cmp < 0) { \ - node = node->left; \ - } else if (cmp > 0) { \ - node = node->right; \ - } else { \ - found = node; \ - node = 0; \ - } \ - } \ - return found; \ -} \ - \ -type *prefix##_first(type **root) { \ - type *node = *root; \ - if (node) { \ - while (node->left) { \ - node = node->left; \ - } \ - } \ - return node; \ -} \ - \ -type *prefix##_last(type **root) { \ - type *node = *root; \ - if (node) { \ - while (node->right) { \ - node = node->right; \ - } \ - } \ - return node; \ -} \ - \ -type *prefix##_iter(type **root, type *key) { \ - type *found = 0; \ - type *node = *root; \ - while (node) { \ - int cmp = compare(key, node); \ - if (cmp < 0) { \ - found = node; \ - node = node->left; \ - } else if (cmp > 0) { \ - node = node->right; \ - } else { \ - found = node; \ - node = 0; \ - } \ - } \ - return found; \ -} \ - \ -static type *prefix##_parent(type **root, \ - type *item) \ -{ \ - type *parent = 0; \ - type *node = *root; \ - while (node) { \ - int cmp = compare(item, node); \ - if (cmp < 0) { \ - parent = node; \ - node = node->left; \ - } else if (cmp > 0) { \ - parent = node; \ - node = node->right; \ - } else { \ - node = 0; \ - } \ - } \ - return parent; \ -} \ - \ -type *prefix##_next(type **root, type *node) { \ - if (node) { \ - if (node->right) { \ - node = node->right; \ - while (node->left) { \ - node = node->left; \ - } \ - } else { \ - type *parent = prefix##_parent(root, node); \ - while (parent && parent->left != node) { \ - node = parent; \ - parent = prefix##_parent(root, parent); \ - } \ - node = parent; \ - } \ - } \ - return node; \ -} \ - \ -type *prefix##_prev(type **root, type *node) { \ - if (node) { \ - if (node->left) { \ - node = node->left; \ - while (node->right) { \ - node = node->right; \ - } \ - } else { \ - type *parent = prefix##_parent(root, node); \ - while (parent && parent->right != node) { \ - node = parent; \ - parent = prefix##_parent(root, parent); \ - } \ - node = parent; \ - } \ - } \ - return node; \ -} \ - -#endif // AAT_H -// END aat.h - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -#endif - - -//////////////////////////////////////////////////////////////////////////////// -// Platform independent code below -//////////////////////////////////////////////////////////////////////////////// - -struct sco_link { - struct sco *prev; - struct sco *next; -}; - -struct sco { - union { - // Linked list - struct { - struct sco *prev; - struct sco *next; - }; - // Binary tree (AA-tree) - struct { - AAT_FIELDS(struct sco, left, right, level) - }; - }; - int64_t id; - void *udata; - struct llco *llco; -}; - -static int sco_compare(struct sco *a, struct sco *b) { - return a->id < b->id ? -1: a->id > b->id; -} - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif - -AAT_DEF(static, sco_aat, struct sco) -AAT_IMPL(sco_aat, struct sco, left, right, level, sco_compare) - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -// https://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html -// hash u64 using mix13 -static uint64_t sco_mix13(uint64_t key) { - key ^= (key >> 30); - key *= UINT64_C(0xbf58476d1ce4e5b9); - key ^= (key >> 27); - key *= UINT64_C(0x94d049bb133111eb); - key ^= (key >> 31); - return key; -} - - -//////////////////////////////////////////////////////////////////////////////// -// sco_map - A hashmap-style structure that stores sco types using multiple -// binary search trees (aa-tree) in hashed shards. This allows for the map to -// grow evenly, without allocations, and performing much faster than using a -// single BST. -//////////////////////////////////////////////////////////////////////////////// - -#ifndef SCO_NSHARDS -#define SCO_NSHARDS 512 -#endif - -struct sco_map { - struct sco *roots[SCO_NSHARDS]; - int count; -}; - -#define scp_map_getaat(sco) \ - (&map->roots[sco_mix13((sco)->id) & (SCO_NSHARDS-1)]) - -static struct sco *sco_map_insert(struct sco_map *map, struct sco *sco) { - struct sco *prev = sco_aat_insert(scp_map_getaat(sco), sco); - if (!prev) { - map->count++; - } - return prev; -} - -static struct sco *sco_map_delete(struct sco_map *map, struct sco *key){ - struct sco *prev = sco_aat_delete(scp_map_getaat(key), key); - if (prev) { - map->count--; - } - return prev; -} - -struct sco_list { - struct sco_link head; - struct sco_link tail; -}; - -//////////////////////////////////////////////////////////////////////////////// -// Global and thread-local variables. -//////////////////////////////////////////////////////////////////////////////// - -static __thread bool sco_initialized = false; -static __thread size_t sco_nrunners = 0; -static __thread struct sco_list sco_runners = { 0 }; -static __thread size_t sco_nyielders = 0; -static __thread struct sco_list sco_yielders = { 0 }; -static __thread struct sco *sco_cur = NULL; -static __thread struct sco_map sco_paused = { 0 }; -static __thread size_t sco_npaused = 0; -static __thread bool sco_exit_to_main_requested = false; -static __thread void(*sco_user_entry)(void *udata); - -static atomic_int_fast64_t sco_next_id = 0; -static atomic_bool sco_locker = 0; -static struct sco_map sco_detached = { 0 }; -static size_t sco_ndetached = 0; - -static void sco_lock(void) { - bool expected = false; - while(!atomic_compare_exchange_weak(&sco_locker, &expected, true)) { - expected = false; - sched_yield0(); - } -} - -static void sco_unlock(void) { - atomic_store(&sco_locker, false); -} - -static void sco_list_init(struct sco_list *list) { - list->head.prev = NULL; - list->head.next = (struct sco*)&list->tail; - list->tail.prev = (struct sco*)&list->head; - list->tail.next = NULL; -} - -// Remove the coroutine from the runners or yielders list. -static void sco_remove_from_list(struct sco *co) { - co->prev->next = co->next; - co->next->prev = co->prev; - co->next = co; - co->prev = co; -} - -static void sco_init(void) { - if (!sco_initialized) { - sco_list_init(&sco_runners); - sco_list_init(&sco_yielders); - sco_initialized = true; - } -} - -static struct sco *sco_list_pop_front(struct sco_list *list) { - struct sco *co = NULL; - if (list->head.next != (struct sco*)&list->tail) { - co = list->head.next; - sco_remove_from_list(co); - } - return co; -} - -static void sco_list_push_back(struct sco_list *list, struct sco *co) { - sco_remove_from_list(co); - list->tail.prev->next = co; - co->prev = list->tail.prev; - co->next = (struct sco*)&list->tail; - list->tail.prev = co; -} - -static void sco_return_to_main(bool final) { - sco_cur = NULL; - sco_exit_to_main_requested = false; - llco_switch(0, final); -} - -static void sco_switch(bool resumed_from_main, bool final) { - if (sco_nrunners == 0) { - // No more runners. - if (sco_nyielders == 0 || sco_exit_to_main_requested || - (!resumed_from_main && sco_npaused > 0)) { - sco_return_to_main(final); - return; - } - // Convert the yielders to runners - sco_runners.head.next = sco_yielders.head.next; - sco_runners.head.next->prev = (struct sco*)&sco_runners.head; - sco_runners.tail.prev = sco_yielders.tail.prev; - sco_runners.tail.prev->next = (struct sco*)&sco_runners.tail; - sco_yielders.head.next = (struct sco*)&sco_yielders.tail; - sco_yielders.tail.prev = (struct sco*)&sco_yielders.head; - sco_nrunners = sco_nyielders; - sco_nyielders = 0; - } - sco_cur = sco_list_pop_front(&sco_runners); - sco_nrunners--; - llco_switch(sco_cur->llco, final); -} - -static void sco_entry(void *udata) { - // Initialize a new coroutine on the user's stack. - struct sco scostk = { 0 }; - struct sco *co = &scostk; - co->llco = llco_current(); - co->id = atomic_fetch_add(&sco_next_id, 1) + 1; - co->udata = udata; - co->prev = co; - co->next = co; - if (sco_cur) { - // Reschedule the coroutine that started this one immediately after - // all running coroutines, but before any yielding coroutines, and - // continue running the started coroutine. - sco_list_push_back(&sco_runners, sco_cur); - sco_nrunners++; - } - sco_cur = co; - if (sco_user_entry) { - sco_user_entry(udata); - } - // This coroutine is finished. Switch to the next coroutine. - sco_switch(false, true); -} - -SCO_EXTERN -void sco_exit(void) { - if (sco_cur) { - sco_exit_to_main_requested = true; - sco_switch(false, true); - } -} - -SCO_EXTERN -void sco_start(struct sco_desc *desc) { - sco_init(); - struct llco_desc llco_desc = { - .entry = sco_entry, - .cleanup = desc->cleanup, - .stack = desc->stack, - .stack_size = desc->stack_size, - .udata = desc->udata, - }; - sco_user_entry = desc->entry; - llco_start(&llco_desc, false); -} - -SCO_EXTERN -int64_t sco_id(void) { - return sco_cur ? sco_cur->id : 0; -} - -SCO_EXTERN -void sco_yield(void) { - if (sco_cur) { - sco_list_push_back(&sco_yielders, sco_cur); - sco_nyielders++; - sco_switch(false, false); - } -} - -SCO_EXTERN -void sco_pause(void) { - if (sco_cur) { - sco_map_insert(&sco_paused, sco_cur); - sco_npaused++; - sco_switch(false, false); - } -} - -SCO_EXTERN -void sco_resume(int64_t id) { - sco_init(); - if (id == 0 && !sco_cur) { - // Resuming from main - sco_switch(true, false); - } else { - // Resuming from coroutine - struct sco *co = sco_map_delete(&sco_paused, &(struct sco){ .id = id }); - if (co) { - sco_npaused--; - co->prev = co; - co->next = co; - sco_list_push_back(&sco_yielders, co); - sco_nyielders++; - sco_yield(); - } - } -} - -SCO_EXTERN -void sco_detach(int64_t id) { - struct sco *co = sco_map_delete(&sco_paused, &(struct sco){ .id = id }); - if (co) { - sco_npaused--; - sco_lock(); - sco_map_insert(&sco_detached, co); - sco_ndetached++; - sco_unlock(); - } -} - -SCO_EXTERN -void sco_attach(int64_t id) { - sco_lock(); - struct sco *co = sco_map_delete(&sco_detached, &(struct sco){ .id = id }); - if (co) { - sco_ndetached--; - } - sco_unlock(); - if (co) { - sco_map_insert(&sco_paused, co); - sco_npaused++; - } -} - -SCO_EXTERN -void *sco_udata(void) { - return sco_cur ? sco_cur->udata : NULL; -} - -SCO_EXTERN -size_t sco_info_scheduled(void) { - return sco_nyielders; -} - -SCO_EXTERN -size_t sco_info_paused(void) { - return sco_npaused; -} - -SCO_EXTERN -size_t sco_info_running(void) { - size_t running = sco_nrunners; - if (sco_cur) { - // Count the current coroutine - running++; - } - return running; -} - -SCO_EXTERN -size_t sco_info_detached(void) { - sco_lock(); - size_t ndetached = sco_ndetached; - sco_unlock(); - return ndetached; -} - -// Returns true if there are any coroutines running, yielding, or paused. -SCO_EXTERN -bool sco_active(void) { - // Notice that detached coroutinues are not included. - return (sco_nyielders + sco_npaused + sco_nrunners + !!sco_cur) > 0; -} - -SCO_EXTERN -const char *sco_info_method(void) { - return llco_method(0); -} - -struct sco_unwind_context { - int nsymbols_actual; - bool started; - void *start_ip; - void *udata; - bool (*func)(struct sco_symbol*, void*); -}; - -static bool sco_unwind_step(struct llco_symbol *llco_sym, void *udata) { - struct sco_unwind_context *ctx = udata; - if (ctx->start_ip && !ctx->started && llco_sym->ip != ctx->start_ip) { - return true; - } - struct sco_symbol sym = { - .cfa = llco_sym->cfa, - .fbase = llco_sym->fbase, - .fname = llco_sym->fname, - .ip = llco_sym->ip, - .saddr = llco_sym->saddr, - .sname = llco_sym->sname, - }; - ctx->started = true; - ctx->nsymbols_actual++; - return !ctx->func || ctx->func(&sym, ctx->udata); -} - -// Unwinds the stack and returns the number of symbols -SCO_EXTERN -int sco_unwind(bool(*func)(struct sco_symbol *sym, void *udata), void *udata) { - struct sco_unwind_context ctx = { -#if defined(__GNUC__) && !defined(__EMSCRIPTEN__) - .start_ip = __builtin_return_address(0), -#endif - .func = func, - .udata = udata, - }; - llco_unwind(sco_unwind_step, &ctx); - return ctx.nsymbols_actual; -} -// END sco.c - -// BEGIN stack.c -// https://github.com/tidwall/stack -// -// Copyright 2024 Joshua J Baker. All rights reserved. -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Coroutine stack allocator - -#include -#include -#include -#include -#include - -#ifndef _WIN32 -#include -#endif - -#ifndef STACK_STATIC -#include "stack.h" -#else -#define STACK_API static -struct stack_opts { - size_t stacksz; - size_t defcap; - size_t maxcap; - size_t gapsz; - bool useguards; - bool nostackfreelist; - bool nopagerelease; - bool onlymalloc; -}; -struct stack { char _[32]; }; -struct stack_mgr { char _[320]; }; -#endif - -#ifndef STACK_API -#define STACK_API -#endif - -struct stack_group { - struct stack_group *prev; - struct stack_group *next; - size_t allocsz; - size_t stacksz; - size_t gapsz; - size_t pagesz; - bool guards; - char *stack0; - size_t cap; // max number of stacks - size_t pos; // index of next stack to use - size_t use; // how many are used -}; - -struct stack_freed { - struct stack_freed *prev; - struct stack_freed *next; - struct stack_group *group; -}; - -struct stack_mgr0 { - size_t pagesz; - size_t stacksz; - size_t defcap; - size_t maxcap; - size_t gapsz; - bool useguards; - bool nostackfreelist; - bool nopagerelease; - bool onlymalloc; - struct stack_group gendcaps[2]; - struct stack_group *group_head; - struct stack_group *group_tail; - struct stack_freed fendcaps[2]; - struct stack_freed *free_head; - struct stack_freed *free_tail; -}; - -struct stack0 { - void *addr; - size_t size; - struct stack_group *group; -}; - -static_assert(sizeof(struct stack) >= sizeof(struct stack0), ""); -static_assert(sizeof(struct stack_mgr) >= sizeof(struct stack_mgr0), ""); - -// Returns a size that is aligned to a boundary. -// The boundary must be a power of 2. -static size_t stack_align_size(size_t size, size_t boundary) { - return size < boundary ? boundary : - size&(boundary-1) ? size+boundary-(size&(boundary-1)) : - size; -} - -#ifndef _WIN32 - -// allocate memory using mmap. Used primarily for stack group memory. -static void *stack_mmap_alloc(size_t size) { - void *addr = mmap(NULL, size, PROT_READ | PROT_WRITE, - MAP_SHARED | MAP_ANONYMOUS, -1, 0); - if (addr == MAP_FAILED || addr == NULL) { - return NULL; - } - return addr; -} - -// free the stack group memory -static void stack_mmap_free(void *addr, size_t size) { - if (addr) { - munmap(addr, size); - } -} - -static struct stack_group *stack_group_new(size_t stacksz, size_t pagesz, - size_t cap, size_t gapsz, bool useguards) -{ - bool guards; - if (gapsz == 0) { - guards = false; - } else { - gapsz = stack_align_size(gapsz, pagesz); - guards = useguards; - } - // Calculate the allocation size of the group. - // A group allocation contains the group struct and all its stacks. - // Each stack is separated by an optional gap page, which can also act as - // the guard page. There will be one more gap pages than stack to ensure - // that each stack is sandwiched by gaps or guards, allowing for overflow - // padding or segv detection for stacks that grow up or down. - // For example, let's say the group has a capacity of 3. The memory layout - // will end up look something like this - // - // [ GUARD ][ Stack1 ][ GUARD ][ Stack2 ][ GUARD ][ Stack3 ][ GUARD ] - // - // where the entire group is a single mmap and each stack is sandwiched by - // guard pages. - size_t allocsz = stack_align_size(sizeof(struct stack_group), pagesz); - allocsz += gapsz; // add space for prefix gap/guard - size_t stack0 = allocsz; // offset of first stack - allocsz += (stacksz + gapsz) * cap; // add the remainder size - struct stack_group *group = stack_mmap_alloc(allocsz); - if (!group) { - return NULL; - } - memset(group, 0, sizeof(struct stack_group)); - group->allocsz = allocsz; - group->next = group; - group->prev = group; - group->guards = guards; - group->gapsz = gapsz; - group->stacksz = stacksz; - group->pagesz = pagesz; - group->stack0 = ((char*)group)+stack0; - group->cap = cap; - return group; -} - -static void stack_group_free(struct stack_group *group) { - stack_mmap_free(group, group->allocsz); -} - -static void stack_group_remove(struct stack_group *group) { - group->prev->next = group->next; - group->next->prev = group->prev; - group->next = NULL; - group->prev = NULL; -} - -static struct stack_group *stack_freed_remove(struct stack_freed *stack) { - stack->prev->next = stack->next; - stack->next->prev = stack->prev; - stack->next = NULL; - stack->prev = NULL; - struct stack_group *group = stack->group; - stack->group = NULL; - return group; -} - -// push a stack_group to the end of the manager group list. -static void stack_push_group(struct stack_mgr0 *mgr, struct stack_group *group) -{ - mgr->group_tail->prev->next = group; - group->prev = mgr->group_tail->prev; - group->next = mgr->group_tail; - mgr->group_tail->prev = group; -} - -static void stack_push_freed_stack(struct stack_mgr0 *mgr, - struct stack_freed *stack, struct stack_group *group) -{ - mgr->free_tail->prev->next = stack; - stack->prev = mgr->free_tail->prev; - stack->next = mgr->free_tail; - mgr->free_tail->prev = stack; - stack->group = group; -} -#endif - -// initialize a stack manager - -static void stack_mgr_init_(struct stack_mgr0 *mgr, struct stack_opts *opts) { -#ifdef _WIN32 - size_t pagesz = 4096; -#else - size_t pagesz = (size_t)sysconf(_SC_PAGESIZE); -#endif - size_t stacksz = opts && opts->stacksz ? opts->stacksz : 8388608; - stacksz = stack_align_size(stacksz, pagesz); - memset(mgr, 0, sizeof(struct stack_mgr0)); - mgr->stacksz = stacksz; - mgr->defcap = opts && opts->defcap ? opts->defcap : 4; - mgr->maxcap = opts && opts->maxcap ? opts->maxcap : 8192; - mgr->gapsz = opts && opts->gapsz ? opts->gapsz : 1048576; - mgr->useguards = opts && opts->useguards; - mgr->nostackfreelist = opts && opts->nostackfreelist; - mgr->nopagerelease = opts && opts->nopagerelease; - mgr->onlymalloc = opts && opts->onlymalloc; - mgr->pagesz = pagesz; - mgr->group_head = &mgr->gendcaps[0]; - mgr->group_tail = &mgr->gendcaps[1]; - mgr->group_head->next = mgr->group_tail; - mgr->group_tail->prev = mgr->group_head; - if (!mgr->nostackfreelist) { - mgr->free_head = &mgr->fendcaps[0]; - mgr->free_tail = &mgr->fendcaps[1]; - mgr->free_head->next = mgr->free_tail; - mgr->free_tail->prev = mgr->free_head; - } -#ifdef _WIN32 - mgr->onlymalloc = true; -#endif -} - -STACK_API -void stack_mgr_init(struct stack_mgr *mgr, struct stack_opts *opts) { - stack_mgr_init_((void*)mgr, opts); -} - - -static void stack_mgr_destroy_(struct stack_mgr0 *mgr) { -#ifndef _WIN32 - struct stack_group *group = mgr->group_head->next; - while (group != mgr->group_tail) { - struct stack_group *next = group->next; - stack_group_free(group); - group = next; - } -#endif - memset(mgr, 0, sizeof(struct stack_mgr0)); -} - -STACK_API -void stack_mgr_destroy(struct stack_mgr *mgr) { - stack_mgr_destroy_((void*)mgr); -} - -#ifndef _WIN32 -static void stack_release_group(struct stack_group *group, bool nofreelist) { - // Remove all stacks from free list, remove the group from the group list, - // and free group. - if (!nofreelist) { - struct stack_freed *stack; - for (size_t i = 0; i < group->pos; i++) { - stack = (void*)(group->stack0 + (group->stacksz+group->gapsz) * i); - stack_freed_remove(stack); - } - } - stack_group_remove(group); - stack_group_free(group); -} -#endif - -static int stack_get_(struct stack_mgr0 *mgr, struct stack0 *stack) { - if (mgr->onlymalloc) { - void *addr = malloc(mgr->stacksz); - if (!addr) { - return -1; - } - stack->addr = addr; - stack->size = mgr->stacksz; - stack->group = 0; - return 0; - } -#ifndef _WIN32 - struct stack_group *group; - if (!mgr->nostackfreelist) { - struct stack_freed *fstack = mgr->free_tail->prev; - if (fstack != mgr->free_head) { - group = stack_freed_remove(fstack); - group->use++; - stack->addr = fstack; - stack->size = mgr->stacksz; - stack->group = group; - return 0; - } - } - group = mgr->group_tail->prev; - if (group->pos == group->cap) { - size_t cap = group->cap ? group->cap * 2 : mgr->defcap; - if (cap > mgr->maxcap) { - cap = mgr->maxcap; - } - group = stack_group_new(mgr->stacksz, mgr->pagesz, cap, mgr->gapsz, - mgr->useguards); - if (!group) { - return -1; - } - stack_push_group(mgr, group); - } - char *addr = group->stack0 + (group->stacksz+group->gapsz) * group->pos; - if (group->guards) { - // Add page guards to the coroutine stack. - // A failure here usually means that there isn't enough system memory - // to split the a mmap'd virtual memory region into two. - // Linux assigns limits to how many distinct mapped regions a process - // may have. Typically around 64K. This means that when used with - // stack guards on Linux, you will probably be limited to about 64K - // concurrent threads and coroutines. To increase this limit, increase - // the value in the /proc/sys/vm/max_map_count, or disable page guards - // by setting 'guards' option to false. - int ret = 0; - if (addr == group->stack0) { - // Add the prefix guard page. - // This separates the group struct page and the first stack. - ret = mprotect(addr-group->gapsz, group->gapsz, PROT_NONE); - } - // Add the suffix guard page. - if (ret == 0) { - ret = mprotect(addr+group->stacksz, group->gapsz, PROT_NONE); - } - if (ret == -1) { - return -1; - } - } - group->pos++; - group->use++; - stack->addr = addr; - stack->size = mgr->stacksz; - stack->group = group; -#endif - return 0; -} - -STACK_API -int stack_get(struct stack_mgr *mgr, struct stack *stack) { - return stack_get_((void*)mgr, (void*)stack); -} - -static void stack_put_(struct stack_mgr0 *mgr, struct stack0 *stack) { - if (mgr->onlymalloc) { - free(stack->addr); - return; - } -#ifndef _WIN32 - void *addr = stack->addr; - struct stack_group *group = stack->group; - if (!mgr->nopagerelease){ - char *stack0 = addr; - size_t stacksz = group->stacksz; - if (!mgr->nostackfreelist) { - // The first page does not need to be released. - stack0 += group->pagesz; - stacksz -= group->pagesz; - } - if (stacksz > 0) { - // Re-mmap the pages that encompass the stack. The MAP_FIXED option - // releases the pages back to the operating system. Yet the entire - // stack will still exists in the processes virtual memory. - mmap(stack0, stacksz, PROT_READ | PROT_WRITE, - MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - } - } - group->use--; - if (!mgr->nostackfreelist) { - // Add the stack to the stack freed linked list. - // This will cause the first page of the stack to being paged into - // process memory, thus using up at least page_size of data per linked - // stack. - stack_push_freed_stack(mgr, addr, group); - } - if (group->use == 0) { - // There are no more stacks in use for this group that belongs to the - // provided stack, and all other stacks have been used at least once in - // the past. - // The group should be fully released back to the operating system. - stack_release_group(group, mgr->nostackfreelist); - } -#endif -} - -STACK_API -void stack_put(struct stack_mgr *mgr, struct stack *stack) { - stack_put_((void*)mgr, (void*)stack); -} - -static size_t stack_size_(struct stack0 *stack) { - return stack->size; -} - -STACK_API -size_t stack_size(struct stack *stack) { - return stack_size_((void*)stack); -} - -static void *stack_addr_(struct stack0 *stack) { - return stack->addr; -} - -STACK_API -void *stack_addr(struct stack *stack) { - return stack_addr_((void*)stack); -} -// END stack.c - -#ifndef NECO_NOWORKERS -// BEGIN worker.c -// https://github.com/tidwall/worker.c -// -// Copyright 2024 Joshua J Baker. All rights reserved. -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Simple background worker for C - -#include -#include -#include -#include -#include - -#ifdef WORKER_STATIC -#define WORKER_API static -#else -#define WORKER_API -#endif - -#define WORKER_DEF_TIMEOUT INT64_C(1000000000) // one second -#define WORKER_DEF_MAX_THREADS 2 -#define WORKER_DEF_MAX_THREAD_ENTRIES 32 - -struct worker_opts { - int max_threads; // def: 2 - int max_thread_entries; // def: 32 - int64_t thread_timeout; // nanoseconds, def: 1 second - void*(*malloc)(size_t); // def: system malloc - void(*free)(void*); // def: system free -}; - -struct worker_entry { - void (*work)(void *udata); - void *udata; -}; - -struct worker_thread { - pthread_mutex_t mu; - pthread_cond_t cond; - pthread_t th; - int64_t timeout; - bool end; - int pos, len; - int nentries; - struct worker_entry *entries; -}; - -struct worker { - int nthreads; - struct worker_thread **threads; - void (*free)(void*); -}; - -WORKER_API -void worker_free(struct worker *worker) { - if (worker) { - if (worker->threads) { - for (int i = 0; i < worker->nthreads; i++) { - struct worker_thread *thread = worker->threads[i]; - if (thread) { - pthread_mutex_lock(&thread->mu); - thread->end = true; - pthread_t th = thread->th; - pthread_cond_signal(&thread->cond); - pthread_mutex_unlock(&thread->mu); - if (th) { - pthread_join(th, 0); - } - worker->free(thread->entries); - worker->free(thread); - } - } - worker->free(worker->threads); - } - worker->free(worker); - } -} - -WORKER_API -struct worker *worker_new(struct worker_opts *opts) { - // Load options - int nthreads = opts ? opts->max_threads : 0; - int nentries = opts ? opts->max_thread_entries : 0; - int64_t timeout = opts ? opts->thread_timeout : 0; - void*(*malloc_)(size_t) = opts ? opts->malloc : 0; - void(*free_)(void*) = opts ? opts->free : 0; - nthreads = nthreads <= 0 ? WORKER_DEF_MAX_THREADS : - nthreads > 65536 ? 65536 : nthreads; - nentries = nentries <= 0 ? WORKER_DEF_MAX_THREAD_ENTRIES : - nentries > 65536 ? 65536 : nentries; - timeout = timeout <= 0 ? WORKER_DEF_TIMEOUT : timeout; - malloc_ = malloc_ ? malloc_ : malloc; - free_ = free_ ? free_ : free; - - struct worker *worker = malloc_(sizeof(struct worker)); - if (!worker) { - return NULL; - } - memset(worker, 0, sizeof(struct worker)); - worker->free = free_; - worker->nthreads = nthreads; - worker->threads = malloc_(sizeof(struct worker_thread*) * nthreads); - if (!worker->threads) { - worker_free(worker); - return NULL; - } - memset(worker->threads, 0, sizeof(struct worker_thread*) * nthreads); - for (int i = 0; i < worker->nthreads; i++) { - struct worker_thread *thread = malloc_(sizeof(struct worker_thread)); - if (!thread) { - worker_free(worker); - return NULL; - } - memset(thread, 0, sizeof(struct worker_thread)); - worker->threads[i] = thread; - thread->timeout = timeout; - thread->nentries = nentries; - thread->entries = malloc_(sizeof(struct worker_entry) * nentries); - if (!thread->entries) { - worker_free(worker); - return NULL; - } - memset(thread->entries, 0, sizeof(struct worker_entry) * nentries); - pthread_mutex_init(&thread->mu, 0); - pthread_cond_init(&thread->cond, 0); - thread->nentries = nentries; - } - return worker; -} - -static void *worker_entry(void *arg) { - // printf("thread created\n"); - struct worker_thread *thread = arg; - pthread_mutex_lock(&thread->mu); - while (1) { - while (thread->len > 0) { - struct worker_entry entry = thread->entries[thread->pos]; - thread->pos++; - if (thread->pos == thread->nentries) { - thread->pos = 0; - } - thread->len--; - pthread_mutex_unlock(&thread->mu); - if (entry.work) { - entry.work(entry.udata); - } - pthread_mutex_lock(&thread->mu); - } - struct timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - ts.tv_sec += 1; - pthread_cond_timedwait(&thread->cond, &thread->mu, &ts); - if (thread->len == 0) { - if (!thread->end) { - pthread_detach(thread->th); - } - thread->th = 0; - thread->end = false; - break; - } - } - pthread_mutex_unlock(&thread->mu); - // printf("thread ended\n"); - return NULL; -} - -/// Submit work -/// @param worker the worker -/// @param pin pin to a thread or set to -1 for Round-robin selection -/// @param work the work to perform -/// @param udata any user data -/// @return true for success or false if no worker is available. -/// @return false for invalid arguments. Worker and work must no be null. -WORKER_API -bool worker_submit(struct worker *worker, int64_t pin, void(*work)(void *udata), - void *udata) -{ - if (!worker || !work) { - return false; - } - static __thread uint32_t worker_next_index = 0; - if (pin < 0) { - pin = worker_next_index; - } - worker_next_index++; - struct worker_thread *thread = worker->threads[pin%worker->nthreads]; - bool submitted = false; - pthread_mutex_lock(&thread->mu); - if (thread->len < thread->nentries) { - int pos = thread->pos + thread->len; - if (pos >= thread->nentries) { - pos -= thread->nentries; - } - thread->entries[pos].work = work; - thread->entries[pos].udata = udata; - thread->len++; - if (!thread->th) { - int ret = pthread_create(&thread->th, 0, worker_entry, thread); - if (ret == -1) { - pthread_mutex_unlock(&thread->mu); - return false; - } - } - submitted = true; - pthread_cond_signal(&thread->cond); - } - pthread_mutex_unlock(&thread->mu); - return submitted; -} -// END worker.c -#endif // NECO_NOWORKERS - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#ifdef _WIN32 -#include -#else -#include -#include -#include -#include -#include -#endif -#include - - -#include "neco.h" - -#if defined(__FreeBSD__) || defined(__APPLE__) -#include -#define NECO_POLL_KQUEUE -#elif defined(__linux__) -#include -#include -#define NECO_POLL_EPOLL -#elif defined(__EMSCRIPTEN__) || defined(_WIN32) -// #warning Webassembly has no polling -#define NECO_POLL_DISABLED -#else -// Only FreeBSD, Apple, and Linux -#error Platform not supported -#endif - -#ifdef _WIN32 -#ifndef SIGUSR1 -#define SIGUSR1 30 /* user defined signal 1 */ -#endif -#ifndef SIGUSR2 -#define SIGUSR2 31 /* user defined signal 2 */ -#endif -#endif - -#define CLAMP(x, min, max) ((x)<=(min)?(min):(x)>=(max)?(max):(x)) - -static_assert(sizeof(int) >= sizeof(uint32_t), "32-bit or higher required"); - -#if defined(__GNUC__) -#define noinline __attribute__ ((noinline)) -#define noreturn __attribute__ ((noreturn)) -#define aligned16 __attribute__((aligned(16))) -#else -#define noinline -#define noreturn -#define aligned16 -#endif - -#ifndef NECO_NOPOOL -#define POOL_ENABLED true -#else -#define POOL_ENABLED false -#endif - -#ifdef NECO_TESTING -#define TESTING_EXTERN(specifier) extern -#else -#define TESTING_EXTERN(specifier) specifier -#endif - -void sco_yield(void); - -TESTING_EXTERN(static) -const char *strsignal0(int signo) { - static __thread char buf[32]; - if (signo <= 0 || signo >= 32) { - snprintf(buf, sizeof(buf), "Unknown signal: %d", signo); - return buf; - } else { -#ifdef _WIN32 - snprintf(buf, sizeof(buf), "Signal: %d", signo); - return buf; - #else - return strsignal(signo); -#endif - } -} - -// https://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html -// hash u64 using mix13 -static uint64_t mix13(uint64_t key) { - key ^= (key >> 30); - key *= UINT64_C(0xbf58476d1ce4e5b9); - key ^= (key >> 27); - key *= UINT64_C(0x94d049bb133111eb); - key ^= (key >> 31); - return key; -} - -#ifdef NECO_TESTING -#include "tests/panic.h" -#else -// print a string, function, file, and line number. -#define pwhere(str) \ - fprintf(stderr, "%s, function %s, file %s, line %d.\n", \ - (str), __func__, __FILE__, __LINE__) - -// define an unreachable section of code. -// This will not signal like __builtin_unreachable() -#define unreachable() \ - pwhere("Unreachable"); \ - abort() - -// must is like assert but it cannot be disabled with -DNDEBUG -// This is primarily used for a syscall that, when provided valid paramaters, -// should never fail. Yet if it does fail we want the 411. -#define must(cond) \ - if (!(cond)) { \ - pwhere("Must failed: " #cond); \ - perror("System error:"); \ - abort(); \ - } \ - (void)0 - -#define panic(fmt, ...) \ - fprintf(stderr, "panic: " fmt "\n", __VA_ARGS__); \ - print_stacktrace(1, true); \ - fprintf(stderr, "\n"); \ - abort(); - -#endif - -#ifdef NECO_TESTING -#include "tests/signals.h" -#else -static bool bt_iscommon(const char *symbol) { - return symbol && ( - strstr(symbol, "coentry") || - strstr(symbol, "sco_entry") || - strstr(symbol, "print_stacktrace") || - strstr(symbol, "sighandler") || - strstr(symbol, "_sigtramp") - ); -} - -// system_out works like the system() but returns the contents to a newly -// allocated string. -// You must call free() on the output when you are done. -static char *system_out(const char *command) { - FILE *ls = popen(command, "r"); - if (!ls) { - return NULL; - } - size_t nout = 0; - char *out = NULL; - char buf[128]; - while (fgets(buf, sizeof(buf), ls) != 0) { - size_t nbuf = strlen(buf); - char *out2 = realloc(out, nout+nbuf+1); - if (!out2) { - free(out); - pclose(ls); - return NULL; - } - out = out2; - memcpy(out+nout, buf, nbuf); - nout += nbuf; - out[nout] = '\0'; - } - pclose(ls); - if (out == NULL) { - out = malloc(1); - if (out) { - out[0] = '\0'; - } - } - return out; -} - -struct bt_context { - int n; - int skip; - bool omit_commons; -}; - -static bool print_symbol(struct sco_symbol *sym, void *udata) { - struct bt_context *ctx = udata; - const char *fname = (char*)sym->fname; - size_t off1 = (size_t)sym->ip - (size_t)sym->fbase; - size_t off2 = off1; - const char *sname = sym->sname; - if (!sname) { - sname = fname; - off2 = (size_t)sym->ip - (size_t)sym->fbase; - } - char cmd[256]; - bool printed = false; - size_t n = 0; -#if defined(__linux__) - n = snprintf(cmd, sizeof(cmd), "addr2line -psfe '%s' %p", - fname, (void*)off1); -#elif !defined(__FreeBSD__) - n = snprintf(cmd, sizeof(cmd), "atos -o %s -l 0x%zx 0x%016zx", - fname, (size_t)sym->fbase, (size_t)sym->ip); -#endif - if (n > 0 && n < sizeof(cmd)-1) { - char *out = system_out(cmd); - if (out) { - if (!bt_iscommon(out)) { - if (ctx->skip == 0) { - fprintf(stderr, "0x%016zx: %s", (size_t)off2, out); - } else { - ctx->skip--; - } - } - free(out); - printed = true; - } - } - if (!printed) { - if (!bt_iscommon(sname)) { - if (ctx->skip == 0) { - fprintf(stderr, "0x%016zx: %s + %zu\n", - (size_t)off2, sname, off2); - } else { - ctx->skip--; - } - } - } - ctx->n++; - return true; -} - -static void print_stacktrace(int skip, bool omit_commons) { - fprintf(stderr, "\n------ STACK TRACE ------\n"); - struct bt_context ctx = { - .skip = skip, - .omit_commons = omit_commons, - }; - sco_unwind(print_symbol, &ctx); - // stacktrace all coroutines? -} - -noinline noreturn -static void sigexitnow(int signo) { - fprintf(stderr, "%s\n", signo == SIGINT ? "" : strsignal0(signo)); - _Exit(128+signo); -} -#endif - -// Private functions. See decl for descriptions. -int neco_errconv_from_sys(void); -void neco_errconv_to_sys(int); - -static bool env_paniconerror = false; -static int env_canceltype = NECO_CANCEL_ASYNC; -static int env_cancelstate = NECO_CANCEL_ENABLE; -static void *(*malloc_)(size_t) = NULL; -static void *(*realloc_)(void*, size_t) = NULL; -static void (*free_)(void*) = NULL; - - -/// Globally set the allocators for all Neco functions. -/// -/// _This should only be run once at program startup and before the first -/// neco_start function is called_. -/// @see GlobalFuncs -void neco_env_setallocator(void *(*malloc)(size_t), - void *(*realloc)(void*, size_t), void (*free)(void*)) -{ - malloc_ = malloc; - realloc_ = realloc; - free_ = free; -} - -void *neco_malloc(size_t nbytes) { - void *ptr = 0; - if (nbytes < SIZE_MAX) { - if (malloc_) { - ptr = malloc_(nbytes); - } else { - ptr = malloc(nbytes); - } - } - if (!ptr && nbytes > 0 && env_paniconerror) { - panic("%s", strerror(ENOMEM)); - } - return ptr; -} - -void *neco_realloc(void *ptr, size_t nbytes) { - void *ptr2 = 0; - if (nbytes < SIZE_MAX) { - if (!ptr) { - ptr2 = neco_malloc(nbytes); - } else if (realloc_) { - ptr2 = realloc_(ptr, nbytes); - } else { - ptr2 = realloc(ptr, nbytes); - } - } - if (!ptr2 && nbytes > 0 && env_paniconerror) { - panic("%s", strerror(ENOMEM)); - } - return ptr2; -} - -void neco_free(void *ptr) { - if (ptr) { - if (free_) { - free_(ptr); - } else { - free(ptr); - } - } -} - -/// Globally set the panic-on-error state for all coroutines. -/// -/// This will cause panics (instead of returning the error) for three errors: -/// `NECO_INVAL`, `NECO_PERM`, and `NECO_NOMEM`. -/// -/// _This should only be run once at program startup and before the first -/// neco_start function is called_. -/// @see GlobalFuncs -void neco_env_setpaniconerror(bool paniconerror) { - env_paniconerror = paniconerror; -} - -/// Globally set the canceltype for all coroutines. -/// -/// _This should only be run once at program startup and before the first -/// neco_start function is called_. -/// @see GlobalFuncs -void neco_env_setcanceltype(int type) { - env_canceltype = type; -} - -/// Globally set the cancelstate for all coroutines. -/// -/// _This should only be run once at program startup and before the first -/// neco_start function is called_. -/// @see GlobalFuncs -void neco_env_setcancelstate(int state) { - env_cancelstate = state; -} - -// return either a BSD kqueue or Linux epoll type. -static int evqueue(void) { -#if defined(NECO_POLL_EPOLL) - return epoll_create1(0); -#elif defined(NECO_POLL_KQUEUE) - return kqueue(); -#else - return -1; -#endif -} - -#define read0 read -#define recv0 recv -#define write0 write -#define send0 send -#define accept0 accept -#define connect0 connect -#define socket0 socket -#define bind0 bind -#define listen0 listen -#define setsockopt0 setsockopt -#define nanosleep0 nanosleep -#define fcntl0 fcntl -#define pthread_create0 pthread_create -#define pthread_detach0 pthread_detach -#define pipe0 pipe -#define malloc0 neco_malloc -#define realloc0 neco_realloc -#define free0 neco_free -#define stack_get0 stack_get -#define evqueue0 evqueue -#define kevent0 kevent -#define epoll_ctl0 epoll_ctl - -// Provide the ability to cause system calls to fail during testing. -// Not for production. -#ifdef NECO_TESTING -#include "tests/fail_counters.h" -#endif - -// Return monotonic nanoseconds of the CPU clock. -static int64_t getnow(void) { - struct timespec now = { 0 }; - clock_gettime(CLOCK_MONOTONIC, &now); - return now.tv_sec * INT64_C(1000000000) + now.tv_nsec; -} - -enum evkind { - EVREAD = 1, // NECO_WAIT_READ - EVWRITE = 2, // NECO_WAIT_WRITE -}; - -static_assert(EVREAD == NECO_WAIT_READ, ""); -static_assert(EVWRITE == NECO_WAIT_WRITE, ""); - -struct cleanup { - void (*routine)(void *); - void *arg; - struct cleanup *next; -} aligned16; - -//////////////////////////////////////////////////////////////////////////////// -// colist - The standard queue type that is just a doubly linked list storing -// the highest priority coroutine at the head and lowest at the tail. -//////////////////////////////////////////////////////////////////////////////// - -struct coroutine; - -struct colink { - struct coroutine *prev; - struct coroutine *next; -} aligned16; - -struct colist { - struct colink head; - struct colink tail; -}; - -// Remove the coroutine from any list, eg. yielders, sigwaiters, or free. -static void remove_from_list(struct coroutine *co) { - struct colink *link = (void*)co; - ((struct colink*)link->prev)->next = link->next; - ((struct colink*)link->next)->prev = link->prev; - link->next = (struct coroutine*)link; - link->prev = (struct coroutine*)link; -} - -static void colist_init(struct colist *list) { - list->head.prev = NULL; - list->head.next = (struct coroutine*)&list->tail; - list->tail.prev = (struct coroutine*)&list->head; - list->tail.next = NULL; -} - -static void colist_push_back(struct colist *list, struct coroutine *co) { - remove_from_list(co); - struct colink *link = (void*)co; - ((struct colink*)list->tail.prev)->next = (struct coroutine*)link; - link->prev = list->tail.prev; - link->next = (struct coroutine*)&list->tail; - list->tail.prev = (struct coroutine*)link; -} - -static struct coroutine *colist_pop_front(struct colist *list) { - struct coroutine *co = list->head.next; - if (co == (struct coroutine*)&list->tail) { - return NULL; - } - remove_from_list(co); - return co; -} - -static bool colist_is_empty(struct colist *list) { - return list->head.next == (struct coroutine*)&list->tail; -} - -//////////////////////////////////////////////////////////////////////////////// -// coroutine - structure for a single coroutine object, state, and state -//////////////////////////////////////////////////////////////////////////////// - -enum cokind { COROUTINE, SELECTCASE }; - -struct coroutine { - struct coroutine *prev; - struct coroutine *next; - enum cokind kind; // always COROUTINE - - int64_t id; // coroutine id (sco_id()) - struct stack stack; // coroutine stack - int argc; // number of coroutine arguments - void **argv; // the coroutine arguments - void *aargv[4]; // preallocated arguments - void(*coroutine)(int,void**); // user coroutine function - - int64_t lastid; // identifer of the last started coroutine - int64_t starterid; // identifer of the starter coroutine - bool paused; // coroutine is paused - bool deadlined; // coroutine operation was deadlined - - struct cleanup *cleanup; // cancelation cleanup stack - - bool rlocked; - bool suspended; - - int64_t pool_ts; // timestamp when added to a pool - - char *cmsg; // channel message data from sender - bool cclosed; // channel closed by sender - - uint32_t sigwatch; // coroutine is watching these signals (mask) - uint32_t sigmask; // coroutine wait mask and result - - int canceltype; // cancelation type - int cancelstate; // cancelation state - bool canceled; // coroutine operation was cancelled - struct colist cancellist; // waiting coroutines - int ncancellist; // number of waiting coroutines - - struct colist joinlist; // waiting coroutines - int njoinlist; // number of waiting coroutines - - struct neco_chan *gen; // self generator (actually a channel) - - // For the rt->all comap, which stores all active coroutines - AAT_FIELDS(struct coroutine, all_left, all_right, all_level) - - // Deadline for pause. All paused will have this set to something. - int64_t deadline; - AAT_FIELDS(struct coroutine, dl_left, dl_right, dl_level) - - // File event node - int evfd; - enum evkind evkind; - AAT_FIELDS(struct coroutine, evleft, evright, evlevel) -} aligned16; - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif - -static int all_compare(struct coroutine *a, struct coroutine *b) { - // order by id - return a->id < b->id ? -1 : a->id > b->id; -} - -AAT_DEF(static, all, struct coroutine) -AAT_IMPL(all, struct coroutine, all_left, all_right, all_level, all_compare) - -static int dl_compare(struct coroutine *a, struct coroutine *b) { - // order by deadline, id - return - a->deadline < b->deadline ? -1 : a->deadline > b->deadline ? 1 : - a->id < b->id ? -1 : a->id > b->id; -} - -AAT_DEF(static, dlqueue, struct coroutine) -AAT_IMPL(dlqueue, struct coroutine, dl_left, dl_right, dl_level, dl_compare) - -static int evcompare(struct coroutine *a, struct coroutine *b) { - // order by evfd, evkind, id - return - a->evfd < b->evfd ? -1 : a->evfd > b->evfd ? 1 : - a->evkind < b->evkind ? -1 : a->evkind > b->evkind ? 1 : - a->id < b->id ? -1 : a->id > b->id; -} - -AAT_DEF(static, evaat, struct coroutine) -AAT_IMPL(evaat, struct coroutine, evleft, evright, evlevel, evcompare) - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -static __thread int lasterr = 0; - -/// Returns last known error from a Neco operation -/// -/// See [Neco errors](./API.md#errors) for a list. -int neco_lasterr(void) { - return lasterr; -} - -noinline -static void errhpnd(int ret) { - if (ret == -1) { - lasterr = neco_errconv_from_sys(); - } else { - lasterr = ret; - } - if (env_paniconerror) { - // The user has requested to panic on - // Only certain errors may cause a panic. - switch (lasterr) { - case NECO_INVAL: - case NECO_PERM: - case NECO_NOMEM: - panic("%s", neco_strerror(ret)); - default: - break; - } - } -} - -// error_guard is a small macro that is used in every public neco_* api -// function. It's called just before the function returns and ensures that -// the provided return value is stored to the "lasterr" thread-local variable -// and that if the error is a posix system error, such as EPERM, that it is -// correctly converted into a neco error code. -// If the user has requested to panic on errors by using the environment -// option `neco_setpaniconerror(true)` then this call will cause a panic if -// the provided return value is an qualifying error, such as NECO_NOMEM. -#define error_guard(ret) \ - lasterr = 0; \ - if (ret < 0) { \ - errhpnd(ret); \ - } \ - (void)0 - -// async_error_guard is an extension of error_guard that also provides async -// coroutine cancellation. -// When the provided return value is NECO_CANCELED _and_ the user canceltype -// is NECO_CANCEL_ASYNC, then the currently running coroutine will immediately -// be terminated. Any clean-up handlers established by neco_cleanup_push() that -// have not yet been popped, are popped and executed. -#define async_error_guard(ret) \ - error_guard(ret); \ - if (lasterr == NECO_CANCELED) { \ - struct coroutine *co = coself(); \ - if (co->canceltype == NECO_CANCEL_ASYNC) { \ - coexit(true); \ - } \ - } \ - (void)0 \ - -//////////////////////////////////////////////////////////////////////////////// -// comap - A hashmap-style structure that stores coroutines using multiple -// binary search trees (aa-tree) in hashed shards. This allows for the map to -// grow evenly, without allocations, and performing much faster than using a -// single BST. -//////////////////////////////////////////////////////////////////////////////// - -#ifndef COMAP_NSHARDS -#define COMAP_NSHARDS 512 -#endif - -struct comap { - struct coroutine *roots[COMAP_NSHARDS]; - int count; -}; - -#define comap_getaat(co) \ - (&map->roots[mix13((co)->id) & (COMAP_NSHARDS-1)]) - -static struct coroutine *comap_insert(struct comap *map, struct coroutine *co) { - struct coroutine *prev = all_insert(comap_getaat(co), co); - map->count++; - return prev; -} - -static struct coroutine *comap_search(struct comap *map, struct coroutine *key){ - return all_search(comap_getaat(key), key); -} - -static struct coroutine *comap_delete(struct comap *map, struct coroutine *key){ - struct coroutine *prev = all_delete(comap_getaat(key), key); - map->count--; - return prev; -} - -//////////////////////////////////////////////////////////////////////////////// -// evmap - A hashmap-style structure that stores fd/events using multiple -// binary search trees (aa-tree) in hashed shards. This allows for the map to -// grow evenly, without allocations, and performing much faster than using a -// single BST. -//////////////////////////////////////////////////////////////////////////////// - -#ifndef EVMAP_NSHARDS -#define EVMAP_NSHARDS 512 -#endif - -struct evmap { - struct coroutine *roots[EVMAP_NSHARDS]; - int count; -}; - -#define evmap_getaat(co) (&map->roots[mix13(co->evfd) & (EVMAP_NSHARDS-1)]) - -static struct coroutine *evmap_insert(struct evmap *map, struct coroutine *co) { - struct coroutine *prev = evaat_insert(evmap_getaat(co), co); - map->count++; - return prev; -} - -static struct coroutine *evmap_iter(struct evmap *map, struct coroutine *key){ - return evaat_iter(evmap_getaat(key), key); -} - -static struct coroutine *evmap_next(struct evmap *map, struct coroutine *key){ - return evaat_next(evmap_getaat(key), key); -} - -static struct coroutine *evmap_delete(struct evmap *map, struct coroutine *key){ - struct coroutine *prev = evaat_delete(evmap_getaat(key), key); - map->count--; - return prev; -} - - - -#ifndef NECO_TESTING -static -#endif -__thread int neco_gai_errno = 0; - -/// Get the last error from a neco_getaddrinfo() call. -/// -/// See the [man page](https://man.freebsd.org/cgi/man.cgi?query=gai_strerror) -/// for a list of errors. -int neco_gai_lasterr(void) { - return neco_gai_errno; -} - -// For atomically incrementing the runtime ID. -// The runtime ID is only used to protect channels from being accicentally -// used by another thread. -static atomic_int_fast64_t next_runtime_id = 1; - -// The neco runtime -struct runtime { - int64_t id; // unique runtime identifier - struct stack_mgr stkmgr; // stack memory manager - int64_t coid; // unique coroutine id incrementer - struct coroutine *costarter; // current coroutine starter - struct comap all; // all running coroutines. - struct coroutine *deadlines; // paused coroutines (aat root) - size_t ndeadlines; // total number of paused coroutines - size_t ntotal; // total number of coroutines ever created - size_t nsleepers; - size_t nlocked; - size_t nreceivers; - size_t nsenders; - size_t nwaitgroupers; // number of waitgroup blocked coroutines - size_t ncondwaiters; // number of cond blocked coroutines - size_t nworkers; // number of background workers - size_t nsuspended; // number of suspended coroutines - - struct evmap evwaiters; // coroutines waiting on events (aat root) - size_t nevwaiters; - - // list of coroutines waiting to be resumed by the scheduler - int nresumers; - struct colist resumers; - - // coroutine pool (reusables) - int npool; // number of coroutines in a pool - struct colist pool; // pool lists of coroutines for each size - - int qfd; // queue file descriptor (epoll or kqueue) - int64_t qfdcreated; // when the queue was created - - // zerochan pool (reusables) - struct neco_chan **zchanpool; // pool of zero sized channels - int zchanpoollen; // number of zero sized channels in pool - int zchanpoolcap; // capacity of pool - - struct colist sigwaiters; // signal waiting coroutines - size_t nsigwaiters; - uint32_t sigmask; // signal mask from handler - int sigwatchers[32]; // signals being watched, reference counted - bool mainthread; // running on the main thread - int sigqueue[32]; // queue of signals waiting for delivery -#ifndef _WIN32 - struct sigaction sigold[32]; // previous signal handlers, for restoring -#endif - char *sigstack; // stack for signals - int sigcrashed; - - int64_t rand_seed; // used for PRNG (non-crypto) -#ifdef __linux__ - void *libbsd_handle; // used for arc4random_buf - void (*arc4random_buf)(void *, size_t); -#endif - -#ifndef NECO_NOWORKERS - struct worker *worker; - pthread_mutex_t iomu; - struct colist iolist; - size_t niowaiters; -#endif - - unsigned int burstcount; -}; - -#define RUNTIME_DEFAULTS (struct runtime) { 0 } - -static __thread struct runtime *rt = NULL; - -static void rt_release(void) { - free0(rt); - rt = NULL; -} - -// coself returns the currently running coroutine. -static struct coroutine *coself(void) { - return (struct coroutine*)sco_udata(); -} - -noinline -static void coexit(bool async); - -// Use coyield() instead of sco_yield() in neco so that an async cancelation -// can be detected -static void coyield(void) { - sco_yield(); - struct coroutine *co = coself(); - if (co->canceled && co->canceltype == NECO_CANCEL_ASYNC) { - coexit(true); - } -} - -// Schedule a coroutine to resume at the next pause phase. -// It's expected that the coroutine is currently paused. -// The difference between sched_resume(co) and sco_resume(co->id) is that with -// sched_resume() the current coroutine is not yielded by the call, allowing -// for multiple coroutines to be scheduled as a batch. While sco_resume() will -// immediately yield the current coroutine to the provided coroutine. -static void sched_resume(struct coroutine *co) { - colist_push_back(&rt->resumers, co); - rt->nresumers++; -} - -static void yield_for_sched_resume(void) { - // Two yields may be required. The first will resume the paused coroutines - // that are in the resumers queue. The second yield ensures that the - // current coroutine waits until _after_ the others have resumed. - if (rt->nresumers > 0) { - coyield(); - } - coyield(); -} - -static struct coroutine *evexists(int fd, enum evkind kind) { - struct coroutine *key = &(struct coroutine){ .evfd = fd, .evkind = kind }; - struct coroutine *iter = evmap_iter(&rt->evwaiters, key); - return iter && iter->evfd == fd && iter->evkind == kind ? iter : NULL; -} - -#if defined(_WIN32) -#include -static int is_main_thread(void) { - return IsGUIThread(false); -} -#elif defined(__linux__) -static int is_main_thread(void) { - return getpid() == (pid_t)syscall(SYS_gettid); -} -#elif defined(__EMSCRIPTEN__) -int gettid(void); -static int is_main_thread(void) { - return getpid() == gettid(); -} -#else -int pthread_main_np(void); -static int is_main_thread(void) { - return pthread_main_np(); -} -#endif - -static int _is_main_thread_(void) { - if (!rt) { - return NECO_PERM; - } - return is_main_thread(); -} - -/// Test if coroutine is running on main thread. -/// @return 1 for true, 0 for false, or a negative value for error. -int neco_is_main_thread(void) { - int ret = _is_main_thread_(); - error_guard(ret); - return ret; -} - -static bool costackget(struct coroutine *co) { - return stack_get0(&rt->stkmgr, &co->stack) == 0; -} - -static void costackfree(struct coroutine *co) { - stack_put(&rt->stkmgr, &co->stack); -} - -static size_t costacksize(struct coroutine *co) { - return stack_size(&co->stack); -} - -static void *costackaddr(struct coroutine *co) { - return stack_addr(&co->stack); -} - -// Create a new coroutines with the provided coroutine function and stack size. -// Returns NULL if out of memory. -static struct coroutine *coroutine_new(void) { - struct coroutine *co = malloc0(sizeof(struct coroutine)); - if (!co) { - return NULL; - } - memset(co, 0, sizeof(struct coroutine)); - co->kind = COROUTINE; - if (!costackget(co)) { - free0(co); - return NULL; - } - co->next = co; - co->prev = co; - colist_init(&co->cancellist); - colist_init(&co->joinlist); - - // Return the coroutine in a non-running state. - return co; -} - -static void cofreeargs(struct coroutine *co) { - if (co->argv && co->argv != co->aargv) { - free0(co->argv); - } - co->argc = 0; - co->argv = NULL; -} - -static struct neco_chan *chan_fastmake(size_t data_size, size_t capacity, - bool as_generator); -static void chan_fastrelease(struct neco_chan *chan); -static void chan_fastretain(struct neco_chan *chan); - -static void coroutine_free(struct coroutine *co) { - if (co) { - cofreeargs(co); - costackfree(co); - free0(co); - } -} - - -#ifndef NECO_TESTING - -static __thread bool immediate_exit = false; -static __thread int immediate_exit_code = 0; - -void __neco_exit_prog(int code) { - immediate_exit = true; - immediate_exit_code = code; - neco_exit(); -} -#else -void __neco_exit_prog(int code) { - (void)code; - // Cannot exit program in testing -} -#endif - -static void cleanup(void *stack, size_t stack_size, void *udata) { - // The coroutine is finished. Cleanup resources - (void)stack; (void)stack_size; -#ifndef NECO_TESTING - if (immediate_exit) { - _Exit(immediate_exit_code); - } -#endif - struct coroutine *co = udata; -#ifndef NECO_NOPOOL - colist_push_back(&rt->pool, co); - rt->npool++; -#else - coroutine_free(co); -#endif -} - -static void coentry(void *udata) { - struct coroutine *co = udata; - co->id = sco_id(); - if (rt->costarter) { - rt->costarter->lastid = co->id; - co->starterid = rt->costarter->id; - } else { - co->starterid = 0; - } - rt->ntotal++; - comap_insert(&rt->all, co); - if (co->coroutine) { - co->coroutine(co->argc, co->argv); - } - coexit(false); -} - - -static int start(void(*coroutine)(int, void**), int argc, va_list *args, - void *argv[], neco_gen **gen, size_t gen_data_size) -{ - struct coroutine *co; -#ifndef NECO_NOPOOL - co = colist_pop_front(&rt->pool); - if (co) { - rt->npool--; - co->pool_ts = 0; - } else { - co = coroutine_new(); - } -#else - co = coroutine_new(); -#endif - if (!co) { - goto fail; - } - co->coroutine = coroutine; - co->canceltype = env_canceltype; - co->cancelstate = env_cancelstate; - - if (gen) { - co->gen = chan_fastmake(gen_data_size, 0, true); - if (!co->gen) { - goto fail; - } - chan_fastretain(co->gen); - *gen = (neco_gen*)co->gen; - } - - // set the arguments - if (argc <= (int)(sizeof(co->aargv)/sizeof(void*))) { - co->argv = co->aargv; - } else { - co->argv = malloc0((size_t)argc * sizeof(void*)); - if (!co->argv) { - goto fail; - } - } - co->argc = argc; - for (int i = 0; i < argc; i++) { - co->argv[i] = args ? va_arg(*args, void*) : argv[i]; - } - struct sco_desc desc = { - .stack = costackaddr(co), - .stack_size = costacksize(co), - .entry = coentry, - .cleanup = cleanup, - .udata = co, - }; - rt->costarter = coself(); - sco_start(&desc); - return NECO_OK; -fail: - if (co) { - if (co->gen) { - chan_fastrelease(co->gen); // once for fastmake - chan_fastrelease(co->gen); // once for fastretain - } - coroutine_free(co); - } - return NECO_NOMEM; -} - -#ifndef NECO_NOSIGNALS - -// These are signals that are allowed to be "watched" by a coroutine using -// the neco_signal_watch() and neco_signal_wait() operations. -static const int ALLOWED_SIGNALS[] = { - SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGPIPE, SIGUSR1, SIGUSR2, SIGALRM -}; - -// These are signals that trigger faults, such as a stack overflow or an -// invalid instruction. -// Notice that SIGABRT is intentionally not TRAPPED or ALLOWED. This is because -// it's been observed that trapping "Abort: 6" on Apple Silicon in Rosetta mode -// can lead to a dead lock that requires a "kill -9" to exit. -// Similar to issue: https://github.com/JuliaLang/julia/issues/42398 -static const int TRAPPED_SIGNALS[] = { - SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP -}; - -static void sigallowhandler(int signo) { - if (rt->sigwatchers[signo] == 0) { - // No coroutines are watching for this signal. Without an interested - // outside party, the program should exit immediately. - if (signo != SIGPIPE) { - sigexitnow(signo); - } - return; - } - // The Neco runtime has a signal watching for this specific signal. - // Queue the signal and let the runtime take over. - rt->sigmask |= (UINT32_C(1) << signo); - rt->sigqueue[signo]++; -} - -static void crash_and_exit(int signo) { -#ifndef NECO_TESTING - if (rt->mainthread) { - fprintf(stderr, "\n=== Crash on main thread ===\n"); - } else { - fprintf(stderr, "\n=== Crash on child thread ===\n"); - } - print_stacktrace(0, true); - fprintf(stderr, "\n"); -#endif - sigexitnow(signo); -} - -#ifdef NECO_TESTING -// During testing, allow for resetting the last crash. -void neco_reset_sigcrashed(void) { - if (rt) { - rt->sigcrashed = 0; - } -} -#endif - -static void sighandler(int signo, siginfo_t *info, void *ptr) { - (void)info; (void)ptr; - must(signo > 0 && signo < 32); - if (rt->sigcrashed) { - sigexitnow(rt->sigcrashed); - return; - } - for (size_t i = 0; i < sizeof(ALLOWED_SIGNALS)/sizeof(int); i++) { - if (signo == ALLOWED_SIGNALS[i]) { - sigallowhandler(signo); - return; - } - } - for (size_t i = 0; i < sizeof(TRAPPED_SIGNALS)/sizeof(int); i++) { - if (signo == TRAPPED_SIGNALS[i]) { - // Print the crash and exit. - rt->sigcrashed = signo; - crash_and_exit(signo); - return; - } - } -} -#endif - -// Set up a custom handler for certain signals -static int rt_handle_signals(void) { -#ifndef NECO_NOSIGNALS - if (!rt->mainthread) { - // Only handle signals on the main thread. - return NECO_OK; - } - static struct sigaction act = { 0 }; - sigemptyset(&act.sa_mask); - act.sa_sigaction = &sighandler; - act.sa_flags = SA_SIGINFO; - rt->sigstack = malloc0(NECO_SIGSTKSZ); - if (!rt->sigstack) { - return NECO_NOMEM; - } -#if NECO_SIGSTKSZ > 0 - act.sa_flags |= SA_ONSTACK; - stack_t ss = { - .ss_sp = rt->sigstack, - .ss_size = NECO_SIGSTKSZ, - .ss_flags = 0, - }; - must(sigaltstack(&ss, NULL) == 0); -#endif - for (size_t i = 0; i < sizeof(ALLOWED_SIGNALS)/sizeof(int); i++) { - int signo = ALLOWED_SIGNALS[i]; - must(sigaction(signo, &act, &rt->sigold[signo]) == 0); - } - for (size_t i = 0; i < sizeof(TRAPPED_SIGNALS)/sizeof(int); i++) { - int signo = TRAPPED_SIGNALS[i]; - must(sigaction(signo, &act, &rt->sigold[signo]) == 0); - } -#endif - return NECO_OK; -} - -// Restore the signal handlers -static void rt_restore_signal_handlers(void) { -#ifndef NECO_NOSIGNALS - if (!rt->mainthread) { - // Only handle signals on the main thread. - return; - } - if (!rt->sigstack) { - // Allocation failed during the initialization. - return; - } - free0(rt->sigstack); - for (size_t i = 0; i < sizeof(ALLOWED_SIGNALS)/sizeof(int); i++) { - int signo = ALLOWED_SIGNALS[i]; - must(sigaction(signo, &rt->sigold[signo], NULL) == 0); - } - for (size_t i = 0; i < sizeof(TRAPPED_SIGNALS)/sizeof(int); i++) { - int signo = TRAPPED_SIGNALS[i]; - must(sigaction(signo, &rt->sigold[signo], NULL) == 0); - } -#endif -} - -static void rt_sched_signal_step(void) { - for (int signo = 0; signo < 32; signo++) { - if (rt->sigqueue[signo] == 0) { - continue; - } else if (rt->sigwatchers[signo] == 0) { - // The signal is no longer being watched. - rt->sigqueue[signo]--; - if (rt->sigqueue[signo] == 0) { - rt->sigmask &= ~(UINT32_C(1) << signo); - } - if (signo != SIGPIPE) { - sigexitnow(signo); - } - } else { - struct coroutine *co = rt->sigwaiters.head.next; - while (co != (struct coroutine*)&rt->sigwaiters.tail) { - struct coroutine *next = co->next; - if (co->sigmask & (UINT32_C(1) << signo)) { - // A coroutine is waiting on this signal. - // Assign the signal to its sigmask and resume - // the coroutine. - co->sigmask = (uint32_t)signo; - rt->sigqueue[signo]--; - if (rt->sigqueue[signo] == 0) { - rt->sigmask &= ~(UINT32_C(1) << signo); - } - sco_resume(co->id); - next = (struct coroutine*)&rt->sigwaiters.tail; - } - co = next; - } - } - break; - } -} - -#define NEVENTS 16 - -static void rt_sched_event_step(int64_t timeout) { - (void)timeout; -#if defined(NECO_POLL_EPOLL) - struct epoll_event evs[NEVENTS]; - int timeout_ms = (int)(timeout/NECO_MILLISECOND); - int nevents = epoll_wait(rt->qfd, evs, NEVENTS, timeout_ms); -#elif defined(NECO_POLL_KQUEUE) - struct kevent evs[NEVENTS]; - struct timespec timeoutspec = { .tv_nsec = timeout }; - int nevents = kevent0(rt->qfd, NULL, 0, evs, NEVENTS, &timeoutspec); -#else - int nevents = 0; -#endif - // A sane kqueue/epoll instance can only ever return the number of - // events or EINTR when waiting on events. - // If the queue was interrupted, the error can be safely ignored because - // the sighandler() will responsibly manage the incoming signals, which - // are then dealt with by this function, right after the event loop. - must(nevents != -1 || errno == EINTR); - - // Consume each event. - for (int i = 0; i < nevents; i++) { -#if defined(NECO_POLL_EPOLL) - int fd = evs[i].data.fd; - bool read = evs[i].events & EPOLLIN; - bool write = evs[i].events & EPOLLOUT; -#elif defined(NECO_POLL_KQUEUE) - int fd = (int)evs[i].ident; - bool read = evs[i].filter == EVFILT_READ; - bool write = evs[i].filter == EVFILT_WRITE; -#else - int fd = 0; - bool read = false; - bool write = false; -#endif - // For linux, a single event may describe both a read and write status - // for a file descriptor so we have to break them apart and deal with - // each one independently. - while (read || write) { - enum evkind kind; - if (read) { - kind = EVREAD; - read = false; - } else { - kind = EVWRITE; - write = false; - } - // Now that we have an event type (read or write) and a file - // descriptor, it's time to wake up the coroutines that are waiting - // on that event. - struct coroutine *key = &(struct coroutine) { - .evfd = fd, - .evkind = kind, - }; - struct coroutine *co = evmap_iter(&rt->evwaiters, key); - while (co && co->evfd == fd && co->evkind == kind) { - sco_resume(co->id); - co = evmap_next(&rt->evwaiters, co); - } - } - } -} - -// Adds a and b, clamping overflows to INT64_MIN or INT64_MAX -TESTING_EXTERN(static) -int64_t i64_add_clamp(int64_t a, int64_t b) { - if (!((a ^ b) < 0)) { // Opposite signs can't overflow - if (a > 0) { - if (b > INT64_MAX - a) { - return INT64_MAX; - } - } else if (b < INT64_MIN - a) { - return INT64_MIN; - } - } - return a + b; -} - -#define MAX_TIMEOUT 500000000 // 500 ms - -// Handle paused couroutines. -static void rt_sched_paused_step(void) { - // Resume all the paused coroutines that are waiting for immediate - // attention. - struct coroutine *co = colist_pop_front(&rt->resumers); - while (co) { - sco_resume(co->id); - rt->nresumers--; - co = colist_pop_front(&rt->resumers); - } - - // Calculate the minimum timeout for this step. - int64_t timeout = MAX_TIMEOUT; - if (timeout > 0 && sco_info_scheduled() > 0) { - // No timeout when there is at least one yielding coroutine or - // when there are pending signals. - timeout = 0; - } - if (timeout > 0 && rt->sigmask) { - // There are pending signals. - // Do not wait to deliver them. - timeout = 0; - } - if (timeout > 0 && rt->ndeadlines > 0) { - // There's at least one deadline coroutine. Use the one with - // the minimum 'deadline' value to determine the timeout. - int64_t min_deadline = dlqueue_first(&rt->deadlines)->deadline; - int64_t timeout0 = i64_add_clamp(min_deadline, -getnow()); - if (timeout0 < timeout) { - timeout = timeout0; - } - } - timeout = CLAMP(timeout, 0, MAX_TIMEOUT); - -#ifndef NECO_NOWORKERS - if (rt->niowaiters > 0) { - timeout = 0; - while (1) { - pthread_mutex_lock(&rt->iomu); - struct coroutine *co = colist_pop_front(&rt->iolist); - pthread_mutex_unlock(&rt->iomu); - if (!co) { - break; - } - sco_resume(co->id); - } - } -#endif - - if (rt->nevwaiters > 0) { - // Event waiters need their own logic. - rt_sched_event_step(timeout); - } else if (timeout > 0) { - // There are sleepers (or signal waiters), but no event waiters. - // Therefore no need for an event queue. We can just do a simple sleep - // using the timeout provided the sleeper with the minimum deadline. - // A signal will interrupt this sleeper if it's running on the main - // thread. - nanosleep(&(struct timespec){ - .tv_sec = timeout/1000000000, - .tv_nsec = timeout%1000000000, - }, 0); - } - - // Handle pending signals from the sighandler(). - if (rt->sigmask) { - // There's at least one signal pending. - rt_sched_signal_step(); - } - - // Check for deadliners and wake them up. - int64_t now = getnow(); - co = dlqueue_first(&rt->deadlines); - while (co && co->deadline < now) { - // Deadline has been reached. Resume the coroutine - co->deadlined = true; - sco_resume(co->id); - co = dlqueue_next(&rt->deadlines, co); - } -} - -// Resource collection step -static void rt_rc_step(void) { - int64_t now = getnow(); - if (rt->nevwaiters == 0 && rt->qfd > 0) { - if (now - rt->qfdcreated > NECO_MILLISECOND * 100) { - // Close the event queue file descriptor if it's no longer needed. - // When the queue goes unused for more than 100 ms it will - // automatically be closed. - close(rt->qfd); - rt->qfd = 0; - } - } - // Deal with coroutine pools. - if (rt->npool > 0) { - // First assign timestamps to newly pooled coroutines, then remove - // coroutines that have been at waiting in the pool more than 100 ms. - struct coroutine *co = rt->pool.tail.prev; - while (co != (struct coroutine*)&rt->pool.head && co->pool_ts == 0) { - co->pool_ts = now; - co = co->prev; - } - while (rt->pool.head.next != (struct coroutine*)&rt->pool.tail) { - co = (struct coroutine*)rt->pool.head.next; - if (now - co->pool_ts < NECO_MILLISECOND * 100) { - break; - } - remove_from_list(co); - rt->npool--; - coroutine_free(co); - } - } -} - -static int rt_scheduler(void) { - // The schdeduler is just a standard sco runtime loop. When thare are - // paused coroutines the paused step executes. That's where the real - // magic happens. - int ret = NECO_OK; - while (sco_active()) { - if (sco_info_paused() > 0) { - rt_sched_paused_step(); - } - rt_rc_step(); - sco_resume(0); - } - // Cleanup extra resources - if (rt->qfd) { - close(rt->qfd); - } - struct coroutine *co = colist_pop_front(&rt->pool); - while (co) { - coroutine_free(co); - co = colist_pop_front(&rt->pool); - } - return ret; -} - -static void rt_freezchanpool(void) { - for (int i = 0; i < rt->zchanpoollen; i++) { - free0(rt->zchanpool[i]); - } - if (rt->zchanpool) { - free0(rt->zchanpool); - } -} - -static struct stack_opts stack_opts_make(void) { - return (struct stack_opts) { - .stacksz = NECO_STACKSIZE, - .defcap = NECO_DEFCAP, - .maxcap = NECO_MAXCAP, - .gapsz = NECO_GAPSIZE, -#ifdef NECO_USEGUARDS - .useguards = true, -#endif -#ifdef NECO_NOSTACKFREELIST - .nostackfreelist = true, -#endif -#ifdef NECO_USEHEAPSTACK - .onlymalloc = true, -#endif - }; -} - -static void init_networking(void) { -#ifdef _WIN32 - WSADATA wsaData; - WORD wVersionRequested = MAKEWORD(2, 2); - WSAStartup(wVersionRequested, &wsaData); -#endif -} - -static void rt_release_dlhandles(void) { -#if __linux__ - if (rt->libbsd_handle) { - dlclose(rt->libbsd_handle); - } -#endif -} - -static int run(void(*coroutine)(int, void**), int nargs, va_list *args, - void *argv[]) -{ - init_networking(); - rt = malloc0(sizeof(struct runtime)); - if (!rt) { - return NECO_NOMEM; - } - *rt = RUNTIME_DEFAULTS; - rt->mainthread = is_main_thread(); - rt->id = atomic_fetch_add(&next_runtime_id, 1); - - - struct stack_opts sopts = stack_opts_make(); - stack_mgr_init(&rt->stkmgr, &sopts); - - colist_init(&rt->sigwaiters); - colist_init(&rt->pool); - colist_init(&rt->resumers); - - // Initialize the signal handlers - int ret = rt_handle_signals(); - if (ret != NECO_OK) { - goto fail; - } - -#ifndef NECO_NOWORKERS - struct worker_opts wopts = { - .max_threads = NECO_MAXWORKERS, - .max_thread_entries = NECO_MAXRINGSIZE, - .malloc = malloc0, - .free = free0, - }; - rt->worker = worker_new(&wopts); - if (!rt->worker) { - ret = NECO_NOMEM; - goto fail; - } - pthread_mutex_init(&rt->iomu, 0); - colist_init(&rt->iolist); -#endif - - - // Start the main coroutine. Actually, it's just queued to run first. - ret = start(coroutine, nargs, args, argv, 0, 0); - if (ret != NECO_OK) { - goto fail; - } - - // Run the scheduler - ret = rt_scheduler(); - -fail: - stack_mgr_destroy(&rt->stkmgr); - rt_freezchanpool(); - rt_restore_signal_handlers(); - rt_release_dlhandles(); -#ifndef NECO_NOWORKERS - worker_free(rt->worker); -#endif - rt_release(); - return ret; -} - -static int startv(void(*coroutine)(int argc, void *argv[]), int argc, - va_list *args, void *argv[], neco_gen **gen, size_t gen_data_size) -{ - if (!coroutine || argc < 0) { - return NECO_INVAL; - } - int ret; - if (!rt) { - ret = run(coroutine, argc, args, argv); - } else { - ret = start(coroutine, argc, args, argv, gen, gen_data_size); - } - return ret; -} - -/// Starts a new coroutine. -/// -/// If this is the first coroutine started for the program (or thread) then -/// this will also create a neco runtime scheduler which blocks until the -/// provided coroutine and all of its subsequent child coroutines finish. -/// -/// **Example** -/// -/// ``` -/// // Here we'll start a coroutine that prints "hello world". -/// -/// void coroutine(int argc, void *argv[]) { -/// char *msg = argv[0]; -/// printf("%s\n", msg); -/// } -/// -/// neco_start(coroutine, 1, "hello world"); -/// ``` -/// -/// @param coroutine The coroutine that will soon run -/// @param argc Number of arguments -/// @param ... Arguments passed to the coroutine -/// @return NECO_OK Success -/// @return NECO_NOMEM The system lacked the necessary resources -/// @return NECO_INVAL An invalid parameter was provided -int neco_start(void(*coroutine)(int argc, void *argv[]), int argc, ...) { - va_list args; - va_start(args, argc); - int ret = startv(coroutine, argc, &args, 0, 0, 0); - va_end(args); - error_guard(ret); - return ret; -} - - -/// Starts a new coroutine using an array for arguments. -/// @see neco_start -int neco_startv(void(*coroutine)(int argc, void *argv[]), int argc, - void *argv[]) -{ - int ret = startv(coroutine, argc, 0, argv, 0, 0); - error_guard(ret); - return ret; -} - -static int yield(void) { - if (!rt) { - return NECO_PERM; - } - coyield(); - return NECO_OK; -} - -/// Cause the calling coroutine to relinquish the CPU. -/// The coroutine is moved to the end of the queue. -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -int neco_yield(void) { - int ret = yield(); - error_guard(ret); - return ret; -} - -// cofind returns the coroutine belonging to the provided identifier. -static struct coroutine *cofind(int64_t id) { - struct coroutine *co = NULL; - if (rt) { - co = comap_search(&rt->all, &(struct coroutine){ .id = id }); - } - return co; -} - -// pause the currently running coroutine with the provided deadline. -static void copause(int64_t deadline) { - struct coroutine *co = coself(); - // Cannot pause an already canceled or deadlined coroutine. - if (!co->canceled && !co->deadlined) { - co->deadline = deadline; - if (co->deadline < INT64_MAX) { - dlqueue_insert(&rt->deadlines, co); - rt->ndeadlines++; - } - co->paused = true; - sco_pause(); - co->paused = false; - if (co->deadline < INT64_MAX) { - dlqueue_delete(&rt->deadlines, co); - rt->ndeadlines--; - } - co->deadline = 0; - } -} - -static int sleep0(int64_t deadline) { - struct coroutine *co = coself(); - rt->nsleepers++; - copause(deadline); - rt->nsleepers--; - int ret = co->canceled ? NECO_CANCELED : NECO_OK; - co->canceled = false; - co->deadlined = false; - return ret; -} - -static int sleep_dl(int64_t deadline) { - if (!rt) { - return NECO_PERM; - } else if (getnow() > deadline) { - return NECO_TIMEDOUT; - } - return sleep0(deadline); -} - -/// Same as neco_sleep() but with a deadline parameter. -int neco_sleep_dl(int64_t deadline) { - int ret = sleep_dl(deadline); - async_error_guard(ret); - return ret; -} - -/// Causes the calling coroutine to sleep until the number of specified -/// nanoseconds have elapsed. -/// @param nanosecs duration nanoseconds -/// @return NECO_OK Coroutine slept until nanosecs elapsed -/// @return NECO_TIMEDOUT nanosecs is a negative number -/// @return NECO_CANCELED Operation canceled -/// @return NECO_PERM Operation called outside of a coroutine -/// @see neco_sleep_dl() -int neco_sleep(int64_t nanosecs) { - return neco_sleep_dl(i64_add_clamp(getnow(), nanosecs)); -} - -static int64_t getid(void) { - if (!rt) { - return NECO_PERM; - } - return sco_id(); -} - -/// Returns the identifier for the currently running coroutine. -/// -/// This value is guaranteed to be unique for the duration of the program. -/// @return The coroutine identifier -/// @return NECO_PERM Operation called outside of a coroutine -int64_t neco_getid(void) { - int64_t ret = getid(); - error_guard(ret); - return ret; -} - -static int64_t lastid(void) { - if (!rt) { - return NECO_PERM; - } - return coself()->lastid; -} - -/// Returns the identifier for the coroutine started by the current coroutine. -/// -/// For example, here a coroutine is started and its identifer is then -/// retreived. -/// -/// ``` -/// neco_start(coroutine, 0); -/// int64_t id = neco_lastid(); -/// ``` -/// -/// @return A coroutine identifier, or zero if the current coroutine has not -/// yet started any coroutines. -/// @return NECO_PERM Operation called outside of a coroutine -int64_t neco_lastid(void) { - int64_t ret = lastid(); - error_guard(ret); - return ret; -} - -static int64_t starterid(void) { - if (!rt) { - return NECO_PERM; - } - return coself()->starterid; -} - -// checkdl checks if the coroutine has been canceled or timedout, resets the -// co->canceled and co->deadlined flags to false, and returns the appropriate -// error code. This is typically used from *_dl operations. -static int checkdl(struct coroutine *co, int64_t deadline) { - if (!co->canceled && !co->deadlined && deadline == INT64_MAX) { - // Most cases. - return NECO_OK; - } - bool canceled = co->canceled; - bool deadlined = co->deadlined; - co->canceled = false; - co->deadlined = false; - if (!canceled && !deadlined && deadline < INT64_MAX && getnow() > deadline){ - deadlined = true; - } - return canceled ? NECO_CANCELED : deadlined ? NECO_TIMEDOUT : NECO_OK; -} - -/// Get the identifier for the coroutine that started the current coroutine. -/// -/// ``` -/// void child_coroutine(int argc, void *argv[]) { -/// int parent_id = neco_starterid(); -/// // The parent_id is equal as the neco_getid() from the parent_coroutine -/// // below. -/// } -/// -/// void parent_coroutine(int argc, void *argv[]) { -/// int id = neco_getid(); -/// neco_start(child_coroutine, 0); -/// } -/// ``` -/// @return A coroutine identifier, or zero if the coroutine is the first -/// coroutine started. -int64_t neco_starterid(void) { - int64_t ret = starterid(); - error_guard(ret); - return ret; -} - -static int cancel_dl(int64_t id, int64_t deadline) { - struct coroutine *co = coself(); - if (!co) { - return NECO_PERM; - } - struct coroutine *cotarg; - while (1) { - cotarg = cofind(id); - if (!cotarg) { - return NECO_NOTFOUND; - } - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - return ret; - } - if (cotarg->cancelstate == NECO_CANCEL_ENABLE) { - // Coroutine was found and its cancel state is enabled. - // Set the cancel flag and wake it up. - cotarg->canceled = true; - sco_resume(id); - coyield(); - return NECO_OK; - } - // Target coroutine is blocking their cancel state. - // Wait for it to be released. - colist_push_back(&cotarg->cancellist, co); - cotarg->ncancellist++; - copause(deadline); - remove_from_list(co); - cotarg->ncancellist--; - } -} - -int neco_cancel_dl(int64_t id, int64_t deadline) { - int ret = cancel_dl(id, deadline); - async_error_guard(ret); - return ret; -} - -int neco_cancel(int64_t id) { - return neco_cancel_dl(id, INT64_MAX); -} - -//////////////////////////////////////////////////////////////////////////////// -// signals -//////////////////////////////////////////////////////////////////////////////// - -static int signal_watch(int signo) { - if (signo < 1 || signo > 31) { - return NECO_INVAL; - } - struct coroutine *co = coself(); - if (!co || !rt->mainthread) { - return NECO_PERM; - } - if ((co->sigwatch & (UINT32_C(1) << signo)) == 0) { - co->sigwatch |= UINT32_C(1) << signo; - rt->sigwatchers[signo]++; - } - return NECO_OK; -} - - -/// Have the current coroutine watch for a signal. -/// -/// This can be used to intercept or ignore signals. -/// -/// Signals that can be watched: SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGPIPE, -/// SIGUSR1, SIGUSR2, SIGALRM -/// -/// Signals that _can not_ be watched: SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP -/// -/// **Example** -/// -/// ``` -/// // Set up this coroutine to watich for the SIGINT (Ctrl-C) and SIGQUIT -/// // (Ctrl-\) signals. -/// neco_signal_watch(SIGINT); -/// neco_signal_watch(SIGQUIT); -/// -/// printf("Waiting for Ctrl-C or Ctrl-\\ signals...\n"); -/// int sig = neco_signal_wait(); -/// if (sig == SIGINT) { -/// printf("\nReceived Ctrl-C\n"); -/// } else if (sig == SIGQUIT) { -/// printf("\nReceived Ctrl-\\\n"); -/// } -/// -/// // The neco_signal_unwatch is used to stop watching. -/// neco_signal_unwatch(SIGINT); -/// neco_signal_unwatch(SIGQUIT); -/// ``` -/// -/// @param signo The signal number -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @see Signals -int neco_signal_watch(int signo) { - int ret = signal_watch(signo); - error_guard(ret); - return ret; -} - -static int signal_unwatch(int signo) { - if (signo < 1 || signo > 31) { - return NECO_INVAL; - } - struct coroutine *co = coself(); - if (!co || !rt->mainthread) { - return NECO_PERM; - } - if ((co->sigwatch & (UINT32_C(1) << signo)) != 0) { - co->sigwatch &= ~(UINT32_C(1) << signo); - rt->sigwatchers[signo]--; - } - return NECO_OK; -} - -/// Stop watching for a siganl to arrive -/// @param signo The signal number -/// @return NECO_OK on success or an error -int neco_signal_unwatch(int signo) { - int ret = signal_unwatch(signo); - error_guard(ret); - return ret; -} - -static int signal_wait_dl(int64_t deadline) { - struct coroutine *co = coself(); - if (!rt || !rt->mainthread) { - return NECO_PERM; - } - if (co->sigwatch == 0) { - return NECO_NOSIGWATCH; - } - if (co->canceled) { - co->canceled = false; - return NECO_CANCELED; - } - co->sigmask = co->sigwatch; - colist_push_back(&rt->sigwaiters, co); - rt->nsigwaiters++; - copause(deadline); - remove_from_list(co); - rt->nsigwaiters--; - int signo = (int)co->sigmask; - co->sigmask = 0; - int ret = checkdl(co, INT64_MAX); - return ret == NECO_OK ? signo : ret; -} - -/// Same as neco_signal_wait() but with a deadline parameter. -int neco_signal_wait_dl(int64_t deadline) { - int ret = signal_wait_dl(deadline); - async_error_guard(ret); - return ret; -} - -/// Wait for a signal to arrive. -/// @return A signal number or an error. -/// @return NECO_PERM -/// @return NECO_NOSIGWATCH if not currently watching for signals. -/// @return NECO_CANCELED -/// @see Signals -/// @see neco_signal_wait_dl() -int neco_signal_wait(void) { - return neco_signal_wait_dl(INT64_MAX); -} - -static int64_t now0(void) { - if (!rt) { - return NECO_PERM; - } else { - return getnow(); - } -} - -/// Get the current time. -/// -/// This operation calls gettime(CLOCK_MONOTONIC) to retreive a monotonically -/// increasing value that is not affected by discontinuous jumps in the system -/// time. -/// -/// This value IS NOT the same as the local system time; for that the user -/// should call gettime(CLOCK_REALTIME). -/// -/// The main purpose of this function to work with operations that use -/// deadlines, i.e. functions with the `*_dl()` suffix. -/// -/// **Example** -/// -/// ``` -/// // Receive a message from a channel using a deadline of one second from now. -/// int ret = neco_chan_recv_dl(ch, &msg, neco_now() + NECO_SECOND); -/// if (ret == NECO_TIMEDOUT) { -/// // The operation timed out -/// } -/// ``` -/// -/// @return On success, the current time as nanoseconds. -/// @return NECO_PERM Operation called outside of a coroutine -/// @see Time -int64_t neco_now(void) { - int64_t now = now0(); - error_guard(now); - return now; -} - -#if defined(NECO_TESTING) -// Allow for tests to set a fail flag for testing event queue failures. -__thread bool neco_fail_cowait = false; -#endif - -#if defined(NECO_POLL_EPOLL) -static int wait_dl_addevent(struct coroutine *co, int fd, enum evkind kind) { - (void)co; - struct epoll_event ev = { 0 }; - ev.data.fd = fd; - if (kind == EVREAD) { - ev.events = EPOLLIN | EPOLLONESHOT; - ev.events |= evexists(fd, EVWRITE) ? EPOLLOUT : 0; - } else { - ev.events = EPOLLOUT | EPOLLONESHOT; - ev.events |= evexists(fd, EVREAD) ? EPOLLIN : 0; - } - int ret = epoll_ctl0(rt->qfd, EPOLL_CTL_MOD, fd, &ev); - if (ret == -1) { - ret = epoll_ctl0(rt->qfd, EPOLL_CTL_ADD, fd, &ev); - } - return ret; -} -static void wait_dl_delevent(struct coroutine *co, int fd, enum evkind kind) { - // Using oneshot. Nothing to do. - (void)co; (void)fd; (void)kind; -} - -#elif defined(NECO_POLL_KQUEUE) -static int wait_dl_addevent(struct coroutine *co, int fd, enum evkind kind) { - (void)co; - int ret = 0; - if (!evexists(fd, kind)) { - struct kevent ev = { - .ident = (uintptr_t)fd, - .flags = EV_ADD | EV_ONESHOT, - .filter = kind == EVREAD ? EVFILT_READ : EVFILT_WRITE, - }; - ret = kevent0(rt->qfd, &ev, 1, NULL, 0, NULL); - } - return ret; -} - -static void wait_dl_delevent(struct coroutine *co, int fd, enum evkind kind) { - // Using oneshot. Nothing to do. - (void)co; (void)fd; (void)kind; -} -#endif - -// wait_dl makes the current coroutine wait for the file descriptor to be -// available for reading or writing. -static int wait_dl(int fd, enum evkind kind, int64_t deadline) { - if (kind != EVREAD && kind != EVWRITE) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - struct coroutine *co = coself(); -#if !defined(NECO_POLL_EPOLL) && !defined(NECO_POLL_KQUEUE) - // Windows and Emscripten only yield, until support for events queues - // are enabled. - (void)fd; (void)deadline; - (void)evmap_insert; (void)evmap_delete; (void)evexists; - - sco_yield(); -#else - if (rt->qfd == 0) { - // The scheduler currently does not have an event queue for handling - // file events. Create one now. This new queue will be shared for the - // entirety of the scheduler. It will be automatically freed when it's - // no longer needed, by the scheduler. - rt->qfd = evqueue0(); - if (rt->qfd == -1) { - // Error creating the event queue. This is usually due to a system - // that is low on resources or is limiting the number of file - // descriptors allowed by a program, e.g. ulimit. - rt->qfd = 0; - return -1; - } - // The queue was successfully created. - rt->qfdcreated = getnow(); - } - - int ret = wait_dl_addevent(co, fd, kind); - if (ret == -1) { - return -1; - } - - co->evfd = fd; - co->evkind = kind; - - // Add this coroutine, chaining it to the distinct fd/kind. - // This creates a unique record in the evwaiters list - evmap_insert(&rt->evwaiters, co); - rt->nevwaiters++; - - // Now wait for the scheduler to wake this coroutine up again. - copause(deadline); - - // Delete from evwaiters. - evmap_delete(&rt->evwaiters, co); - rt->nevwaiters--; - - co->evfd = 0; - co->evkind = 0; - - wait_dl_delevent(co, fd, kind); -#endif - return checkdl(co, INT64_MAX); -} - -/// Same as neco_wait() but with a deadline parameter. -int neco_wait_dl(int fd, int mode, int64_t deadline) { - int ret = wait_dl(fd, mode, deadline); - async_error_guard(ret); - return ret; -} - -/// Wait for a file descriptor to be ready for reading or writing. -/// -/// Normally one should use neco_read() and neco_write() to read and write -/// data. But there may be times when you need more involved logic or to use -/// alternative functions such as `recvmsg()` or `sendmsg()`. -/// -/// ``` -/// while (1) { -/// int n = recvmsg(sockfd, msg, MSG_DONTWAIT); -/// if (n == -1) { -/// if (errno == EAGAIN) { -/// // The socket is not ready for reading. -/// neco_wait(sockfd, NECO_WAIT_READ); -/// continue; -/// } -/// // Socket error. -/// return; -/// } -/// // Message received. -/// break; -/// } -/// ``` -/// -/// @param fd The file descriptor -/// @param mode NECO_WAIT_READ or NECO_WAIT_WRITE -/// @return NECO_OK Success -/// @return NECO_NOMEM The system lacked the necessary resources -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_ERROR Check errno for more info -/// @see Posix2 -int neco_wait(int fd, int mode) { - return neco_wait_dl(fd, mode, INT64_MAX); -} - -// cowait makes the current coroutine wait for the file descriptor to be -// available for reading or writing. Any kind of error encountered by this -// operation will cause the coroutine to be rescheduled, with the error -// gracefully being ignored, while leaving the file, coroutine, and scheduler -// in the state that it was prior to calling the function. -// Alternatively, the wait_dl can be used if the error is needed. -static void cowait(int fd, enum evkind kind, int64_t deadline) { - int ret = wait_dl(fd, kind, deadline); - if (ret == NECO_CANCELED) { - // The cancel flag should be set to true if the wait was canceled, - // because the caller is responsible for handling deadlines and - // checking the canceled flag upon return. - struct coroutine *co = coself(); - co->canceled = true; - } - if (ret != NECO_OK) { - coyield(); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// Networking code -//////////////////////////////////////////////////////////////////////////////// - -#if !defined(NECO_NOWORKERS) && defined(NECO_USEREADWORKERS) && \ - !defined(NECO_NOREADWORKERS) - -struct ioread { - int fd; - void *data; - size_t count; - ssize_t res; - struct runtime *rt; - struct coroutine *co; -} aligned16; - -static void ioread(void *udata) { - struct ioread *info = udata; - info->res = read0(info->fd, info->data, info->count); - if (info->res == -1) { - info->res = -errno; - } - pthread_mutex_lock(&info->rt->iomu); - colist_push_back(&info->rt->iolist, info->co); - pthread_mutex_unlock(&info->rt->iomu); -} - -static ssize_t read1(int fd, void *data, size_t nbytes) { - ssize_t n; - bool nowork = true; -#ifdef NECO_TESTING - if (neco_fail_read_counter > 0) { - nowork = true; - } -#endif -#if NECO_MAXIOWORKERS <= 0 - nowork = true; -#endif - if (!nowork) { - nowork = true; - struct coroutine *co = coself(); - struct ioread info = { - .fd = fd, - .data = data, - .count = nbytes, - .co = co, - .rt = rt, - }; - int64_t pin = co->id % NECO_MAXIOWORKERS; - if (worker_submit(rt->worker, pin, ioread, &info)) { - rt->niowaiters++; - sco_pause(); - rt->niowaiters--; - n = info.res; - if (n < 0) { - errno = -n; - n = -1; - } - nowork = false; - } - } - if (nowork) { - n = read0(fd, data, nbytes); - } - return n; -} -#else -#define read1 read0 -#endif - -static ssize_t read_dl(int fd, void *data, size_t nbytes, int64_t deadline) { - struct coroutine *co = coself(); - if (!co) { - errno = EPERM; - return -1; - } - while (1) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - errno = ret == NECO_CANCELED ? ECANCELED : ETIMEDOUT; - return -1; - } -#if NECO_BURST < 0 - cowait(fd, EVREAD, deadline); -#endif - ssize_t n = read1(fd, data, nbytes); - if (n == -1) { - if (errno == EINTR || errno == EAGAIN) { -#if NECO_BURST >= 0 - if (rt->burstcount == NECO_BURST) { - rt->burstcount = 0; - cowait(fd, EVREAD, deadline); - } else { - rt->burstcount++; - sco_yield(); - } -#endif - // continue; - } else { - return -1; - } - } else { - return n; - } - } -} - -/// Same as neco_read() but with a deadline parameter. -ssize_t neco_read_dl(int fd, void *buf, size_t count, int64_t deadline) { - ssize_t ret = read_dl(fd, buf, count, deadline); - async_error_guard(ret); - return ret; -} - -/// Read from a file descriptor. -/// -/// This operation attempts to read up to count from file descriptor fd -/// into the buffer starting at buf. -/// -/// This is a Posix wrapper function for the purpose of running in a Neco -/// coroutine. It's expected that the provided file descriptor is in -/// non-blocking state. -/// -/// @return On success, the number of bytes read is returned (zero indicates -/// end of file) -/// @return On error, value -1 (NECO_ERROR) is returned, and errno is set to -/// indicate the error. -/// @see Posix -/// @see neco_setnonblock() -/// @see https://www.man7.org/linux/man-pages/man2/read.2.html -ssize_t neco_read(int fd, void *buf, size_t count) { - return neco_read_dl(fd, buf, count, INT64_MAX); -} - -#ifdef NECO_TESTING -#define write1 write0 -// Allow for testing partial writes -__thread int neco_partial_write = 0; -static ssize_t write2(int fd, const void *data, size_t nbytes) { - bool fail = false; - if (neco_partial_write) { - neco_partial_write--; - nbytes = nbytes > 128 ? 128 : nbytes; - // nbytes /= 2; - fail = neco_partial_write == 0; - } - if (fail) { - errno = EIO; - return -1; - } - return write1(fd, data, nbytes); -} -#else -// In production, a write to a broken stdout or stderr pipe should end the -// program immediately. -inline -static ssize_t write1(int fd, const void *data, size_t nbytes) { - ssize_t n = write0(fd, data, nbytes); - if (n == -1 && errno == EPIPE && (fd == 1 || fd == 2)) { - // Broken pipe on stdout or stderr - _Exit(128+EPIPE); - } - return n; -} -#define write2 write1 -#endif - -#if !defined(NECO_NOWORKERS) && defined(NECO_USEWRITEWORKERS) && \ - !defined(NECO_NOWRITEWORKERS) -struct iowrite { - int fd; - const void *data; - size_t count; - ssize_t res; - struct runtime *rt; - struct coroutine *co; -} aligned16; - -static void iowrite(void *udata) { - struct iowrite *info = udata; - info->res = write2(info->fd, info->data, info->count); - if (info->res == -1) { - info->res = -errno; - } - pthread_mutex_lock(&info->rt->iomu); - colist_push_back(&info->rt->iolist, info->co); - pthread_mutex_unlock(&info->rt->iomu); -} - -static ssize_t write3(int fd, const void *data, size_t nbytes) { - bool nowork = false; - ssize_t n; -#ifdef NECO_TESTING - if (neco_fail_write_counter > 0 || neco_partial_write > 0) { - nowork = true; - } -#endif -#if NECO_MAXIOWORKERS <= 0 - nowork = true; -#endif - if (!nowork) { - nowork = true; - struct coroutine *co = coself(); - struct iowrite info = { - .fd = fd, - .data = data, - .count = nbytes, - .co = co, - .rt = rt, - }; - int64_t pin = co->id % NECO_MAXIOWORKERS; - if (worker_submit(rt->worker, pin, iowrite, &info)) { - rt->niowaiters++; - sco_pause(); - rt->niowaiters--; - n = info.res; - if (n < 0) { - errno = -n; - n = -1; - } - nowork = false; - } - } - if (nowork) { - n = write2(fd, data, nbytes); - } - return n; -} -#else -#define write3 write2 -#endif - -static ssize_t write_dl(int fd, const void *data, size_t nbytes, - int64_t deadline) -{ - struct coroutine *co = coself(); - if (!co) { - errno = EPERM; - return -1; - } - ssize_t written = 0; - while (1) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - errno = ret == NECO_CANCELED ? ECANCELED : ETIMEDOUT; - return -1; - } - // size_t maxnbytes = CLAMP(nbytes, 0, 8096); - // ssize_t n = write2(fd, data, maxnbytes); - ssize_t n = write3(fd, data, nbytes); - if (n == -1) { - if (errno == EINTR || errno == EAGAIN) { - cowait(fd, EVWRITE, deadline); - } else if (written == 0) { - return -1; - } else { - // There was an error but data has also been written. It's - // important to notify the caller about the amount of data - // written. The caller will need to then check to see if the - // return value is less than nbytes, and if so check - // the system errno. - return written; - } - } else if (n > 0) { - nbytes -= (size_t)n; - written += (size_t)n; - data = (char*)data + n; - } - if (nbytes == 0) { - break; - } - if (n >= 0) { - // Some data was written but there's more yet. - // Avoiding starving the other coroutines. - coyield(); - } - } - return written; -} - -/// Same as neco_write() but with a deadline parameter. -ssize_t neco_write_dl(int fd, const void *buf, size_t count, - int64_t deadline) -{ - ssize_t ret = write_dl(fd, buf, count, deadline); - async_error_guard(ret); - if (ret >= 0 && (size_t)ret < count) { - lasterr = NECO_PARTIALWRITE; - } - return ret; -} - -/// Write to a file descriptor. -/// -/// This operation attempts to write all bytes in the buffer starting at buf -/// to the file referred to by the file descriptor fd. -/// -/// This is a Posix wrapper function for the purpose of running in a Neco -/// coroutine. It's expected that the provided file descriptor is in -/// non-blocking state. -/// -/// One difference from the Posix version is that this function will attempt to -/// write _all_ bytes in buffer. The programmer, at their discretion, may -/// considered it as an error when fewer than count is returned. If so, the -/// neco_lasterr() will return the NECO_PARTIALWRITE. -/// -/// @return On success, the number of bytes written is returned. -/// @return On error, value -1 (NECO_ERROR) is returned, and errno is set to -/// indicate the error. -/// @see Posix -/// @see neco_setnonblock() -/// @see https://www.man7.org/linux/man-pages/man2/write.2.html -ssize_t neco_write(int fd, const void *buf, size_t count) { - return neco_write_dl(fd, buf, count, INT64_MAX); -} - -#ifdef _WIN32 - -static int wsa_err_to_errno(int wsaerr) { - switch (wsaerr) { - case WSAEINTR: return EINTR; - case WSAEBADF: return EBADF; - case WSAEACCES: return EACCES; - case WSAEFAULT: return EFAULT; - case WSAEINVAL: return EINVAL; - case WSAEMFILE: return EMFILE; - case WSAEWOULDBLOCK: return EAGAIN; - case WSAEINPROGRESS: return EINPROGRESS; - case WSAEALREADY: return EALREADY; - case WSAENOTSOCK: return ENOTSOCK; - case WSAEDESTADDRREQ: return EDESTADDRREQ; - case WSAEMSGSIZE: return EMSGSIZE; - case WSAEPROTOTYPE: return EPROTOTYPE; - case WSAENOPROTOOPT: return ENOPROTOOPT; - case WSAEPROTONOSUPPORT: return EPROTONOSUPPORT; - case WSAEOPNOTSUPP: return EOPNOTSUPP; - case WSAEADDRINUSE: return EADDRINUSE; - case WSAEADDRNOTAVAIL: return EADDRNOTAVAIL; - case WSAENETDOWN: return ENETDOWN; - case WSAENETUNREACH: return ENETUNREACH; - case WSAENETRESET: return ENETRESET; - case WSAECONNABORTED: return ECONNABORTED; - case WSAECONNRESET: return ECONNRESET; - case WSAENOBUFS: return ENOBUFS; - case WSAEISCONN: return EISCONN; - case WSAENOTCONN: return ENOTCONN; - case WSAETIMEDOUT: return ETIMEDOUT; - case WSAECONNREFUSED: return ECONNREFUSED; - case WSAELOOP: return ELOOP; - case WSAENAMETOOLONG: return ENAMETOOLONG; - case WSAEHOSTUNREACH: return EHOSTUNREACH; - case WSAENOTEMPTY: return ENOTEMPTY; - case WSAECANCELLED: return ECANCELED; - case WSA_E_CANCELLED: return ECANCELED; - } - return wsaerr; -} - -int accept1(int sock, struct sockaddr *addr, socklen_t *len) { - int fd = accept0(sock, addr, len); - if (fd == -1) { - errno = wsa_err_to_errno(WSAGetLastError()); - } - return fd; -} -#else -#define accept1 accept0 -#endif - -static int accept_dl(int sockfd, struct sockaddr *addr, socklen_t *addrlen, - int64_t deadline) -{ - struct coroutine *co = coself(); - if (!co) { - errno = EPERM; - return -1; - } - while (1) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - errno = ret == NECO_CANCELED ? ECANCELED : ETIMEDOUT; - return -1; - } - int fd = accept1(sockfd, addr, addrlen); - if (fd == -1) { - if (errno == EINTR || errno == EAGAIN) { - cowait(sockfd, EVREAD, deadline); - } else { - return -1; - } - } else { - if (neco_setnonblock(fd, true, 0) == -1) { - close(fd); - return -1; - } - return fd; - } - } -} - -/// Same as neco_accept() but with a deadline parameter. -int neco_accept_dl(int sockfd, struct sockaddr *addr, socklen_t *addrlen, - int64_t deadline) -{ - int ret = accept_dl(sockfd, addr, addrlen, deadline); - async_error_guard(ret); - return ret; -} - -/// Accept a connection on a socket. -/// -/// While in a coroutine, this function should be used instead of the standard -/// accept() to avoid blocking other coroutines from running concurrently. -/// -/// The the accepted file descriptor is returned in non-blocking mode. -/// -/// @param sockfd Socket file descriptor -/// @param addr Socket address out -/// @param addrlen Socket address length out -/// @return On success, file descriptor (non-blocking) -/// @return On error, value -1 (NECO_ERROR) is returned, and errno is set to -/// indicate the error. -/// @see Posix -int neco_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) { - return neco_accept_dl(sockfd, addr, addrlen, INT64_MAX); -} - -static int connect_dl(int fd, const struct sockaddr *addr, socklen_t addrlen, - int64_t deadline) -{ - struct coroutine *co = coself(); - if (!co) { - errno = EPERM; - return -1; - } - bool inprog = false; - while (1) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - errno = ret == NECO_CANCELED ? ECANCELED : ETIMEDOUT; - return -1; - } - errno = 0; - ret = connect0(fd, addr, addrlen); - if (ret == -1) { - switch (errno) { - case EISCONN: - // The socket is already connected. - // This could be because we just tried a moment ago and - // received an EINPROGRESS. In that case return success, - // otherwise return an error. - ret = inprog ? 0 : -1; - break; - case EAGAIN: - // Only unix domain sockets can get this error. - // Linux manual does not describe why this can happen or - // what to do when it does. FreeBSD says it means that there - // are not enough ports available on the system to assign to - // the file descriptor. We can (maybe??) try again. But - // probably best to return an error that is different than - // EAGAIN. - errno = ECONNREFUSED; - break; - case EINPROGRESS: - // EINPROGRESS means the connection is in progress and may - // take a while. We are allowed to add this file descriptor - // to an event queue and wait for the connection to be ready. - // This can be done by waiting on a write event. - // printf("D\n"); - inprog = true; - cowait(fd, EVWRITE, deadline); - continue; - case EINTR: // Interrupted. Just try again. - case ENOMEM: // Mac OS can sometimes return ENOMEM (bug) - continue; - } - } - return ret; - } -} - -/// Same as neco_connect() but with a deadline parameter. -int neco_connect_dl(int sockfd, const struct sockaddr *addr, socklen_t addrlen, - int64_t deadline) -{ - int ret = connect_dl(sockfd, addr, addrlen, deadline); - async_error_guard(ret); - return ret; -} - -/// Connects the socket referred to by the file descriptor sockfd to the -/// address specified by addr. -/// -/// While in a coroutine, this function should be used instead of the standard -/// connect() to avoid blocking other coroutines from running concurrently. -/// -/// @param sockfd Socket file descriptor -/// @param addr Socket address out -/// @param addrlen Socket address length out -/// @return NECO_OK Success -/// @return On error, value -1 (NECO_ERROR) is returned, and errno is set to -/// indicate the error. -int neco_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { - return neco_connect_dl(sockfd, addr, addrlen, INT64_MAX); -} - -void neco_errconv_to_sys(int err) { - switch (err) { - case NECO_OK: - errno = 0; - break; - case NECO_INVAL: - errno = EINVAL; - break; - case NECO_PERM: - errno = EPERM; - break; - case NECO_NOMEM: - errno = ENOMEM; - break; - case NECO_CANCELED: - errno = ECANCELED; - break; - case NECO_TIMEDOUT: - errno = ETIMEDOUT; - break; - } -} - -int neco_errconv_from_sys(void) { - switch (errno) { - case EINVAL: - return NECO_INVAL; - case EPERM: - return NECO_PERM; - case ENOMEM: - return NECO_NOMEM; - case ECANCELED: - return NECO_CANCELED; - case ETIMEDOUT: - return NECO_TIMEDOUT; - default: - return NECO_ERROR; - } -} - -const char *neco_shortstrerror(int code) { - switch (code) { - case NECO_OK: - return "NECO_OK"; - case NECO_ERROR: - return "NECO_ERROR"; - case NECO_INVAL: - return "NECO_INVAL"; - case NECO_PERM: - return "NECO_PERM"; - case NECO_NOMEM: - return "NECO_NOMEM"; - case NECO_NOTFOUND: - return "NECO_NOTFOUND"; - case NECO_NOSIGWATCH: - return "NECO_NOSIGWATCH"; - case NECO_CLOSED: - return "NECO_CLOSED"; - case NECO_EMPTY: - return "NECO_EMPTY"; - case NECO_TIMEDOUT: - return "NECO_TIMEDOUT"; - case NECO_CANCELED: - return "NECO_CANCELED"; - case NECO_BUSY: - return "NECO_BUSY"; - case NECO_NEGWAITGRP: - return "NECO_NEGWAITGRP"; - case NECO_GAIERROR: - return "NECO_GAIERROR"; - case NECO_UNREADFAIL: - return "NECO_UNREADFAIL"; - case NECO_PARTIALWRITE: - return "NECO_PARTIALWRITE"; - case NECO_NOTGENERATOR: - return "NECO_NOTGENERATOR"; - case NECO_NOTSUSPENDED: - return "NECO_NOTSUSPENDED"; - default: - return "UNKNOWN"; - } -} - -/// Returns a string representation of an error code. -/// @see Errors -const char *neco_strerror(ssize_t errcode) { - switch (errcode) { - case NECO_OK: - return "Success"; - case NECO_ERROR: - return strerror(errno); - case NECO_INVAL: - return strerror(EINVAL); - case NECO_PERM: - return strerror(EPERM); - case NECO_NOMEM: - return strerror(ENOMEM); - case NECO_NOTFOUND: - return "No such coroutine"; - case NECO_NOSIGWATCH: - return "Not watching on a signal"; - case NECO_CLOSED: - return "Channel closed"; - case NECO_EMPTY: - return "Channel empty"; - case NECO_TIMEDOUT: - return strerror(ETIMEDOUT); - case NECO_CANCELED: - return strerror(ECANCELED); - case NECO_BUSY: - return strerror(EBUSY); - case NECO_NEGWAITGRP: - return "Negative waitgroup counter"; - case NECO_GAIERROR: - if (neco_gai_errno == EAI_SYSTEM) { - return strerror(errno); - } else { - return gai_strerror(neco_gai_errno); - } - case NECO_UNREADFAIL: - return "Failed to unread byte"; - case NECO_PARTIALWRITE: - return "Failed to write all bytes"; - case NECO_NOTGENERATOR: - return "Coroutine is not a generator"; - case NECO_NOTSUSPENDED: - return "Coroutine is not suspended"; - default: { - static __thread char udmsg[32]; - snprintf(udmsg, sizeof(udmsg)-1, "Undefined error: %zd", errcode); - return udmsg; - } - } -} - -static int getstats(neco_stats *stats) { - if (!stats) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - *stats = (neco_stats) { - .coroutines = rt->all.count, - .sleepers = rt->nsleepers, - .evwaiters = rt->nevwaiters, - .sigwaiters = rt->nsigwaiters, - .senders = rt->nsenders, - .receivers = rt->nreceivers, - .locked = rt->nlocked, - .waitgroupers = rt->nwaitgroupers, - .condwaiters = rt->ncondwaiters, - .suspended = rt->nsuspended, - }; - return NECO_OK; -} - -/// Returns various stats for the current Neco runtime. -/// -/// ```c -/// // Print the number of active coroutines -/// neco_stats stats; -/// neco_getstats(&stats); -/// printf("%zu\n", stats.coroutines); -/// ``` -/// -/// Other stats include: -/// -/// ```c -/// coroutines -/// sleepers -/// evwaiters -/// sigwaiters -/// senders -/// receivers -/// locked -/// waitgroupers -/// condwaiters -/// suspended -/// ``` - -int neco_getstats(neco_stats *stats) { - int ret = getstats(stats); - error_guard(ret); - return ret; -} - -//////////////////////////////////////////////////////////////////////////////// -// channels -//////////////////////////////////////////////////////////////////////////////// - -struct neco_chan { - int64_t rtid; // runtime id. for runtime/thread isolation - int rc; // reference counter - bool sclosed; // sender closed - bool rclosed; // receiver closed - bool qrecv; // queue has all receivers, otherwise all senders - bool lok; // used for the select-case 'closed' result - struct colist queue; // waiting coroutines. Either senders or receivers - int msgsize; // size of each message - int bufcap; // max number of messages in ring buffer - int buflen; // number of messages in ring buffer - int bufpos; // position of first message in ring buffer - char data[]; // message ring buffer + one extra entry for 'lmsg' -}; - -// coselectcase pretends to be a coroutine for the purpose of multiplexing -// select-case channels into a single coroutine. -// It's required that this structure is 16-byte aligned. -struct coselectcase { - struct coroutine *prev; - struct coroutine *next; - enum cokind kind; - - struct neco_chan *chan; - struct coroutine *co; - void *data; - bool *ok; - int idx; - int *ret_idx; -} aligned16; - -// returns the message slot -static char *cbufslot(struct neco_chan *chan, int index) { - return chan->data + (chan->msgsize * index); -} - -// push a message to the back by copying from data -static void cbuf_push(struct neco_chan *chan, void *data) { - int pos = chan->bufpos + chan->buflen; - if (pos >= chan->bufcap) { - pos -= chan->bufcap; - } - if (chan->msgsize > 0) { - memcpy(cbufslot(chan, pos), data, (size_t)chan->msgsize); - } - chan->buflen++; -} - -// pop a message from the front and copy to data -static void cbuf_pop(struct neco_chan *chan, void *data) { - if (chan->msgsize) { - memcpy(data, cbufslot(chan, chan->bufpos), (size_t)chan->msgsize); - } - chan->bufpos++; - if (chan->bufpos == chan->bufcap) { - chan->bufpos = 0; - } - chan->buflen--; -} - -static struct neco_chan *chan_fastmake(size_t data_size, size_t capacity, - bool as_generator) -{ - struct neco_chan *chan; - // Generators do not need buffered capacity of any size because they can't - // use the neco_select, which requires at least one buffered slot for the - // neco_case operation to store the pending data. - size_t ring_size = as_generator ? 0 : data_size * (capacity+1); - if (POOL_ENABLED && ring_size == 0 && rt->zchanpoollen > 0) { - chan = rt->zchanpool[--rt->zchanpoollen]; - } else { - size_t memsize = sizeof(struct neco_chan) + ring_size; - chan = malloc0(memsize); - if (!chan) { - return NULL; - } - } - // Zero the struct memory space, not the data space. - memset(chan, 0, sizeof(struct neco_chan)); - chan->rtid = rt->id; - chan->msgsize = (int)data_size; - chan->bufcap = (int)capacity; - colist_init(&chan->queue); - return chan; -} - -static int chan_make(struct neco_chan **chan, size_t data_size, size_t capacity) -{ - if (!chan || data_size > INT_MAX || capacity > INT_MAX) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - *chan = chan_fastmake(data_size, capacity, 0); - if (!*chan) { - return NECO_NOMEM; - } - return NECO_OK; -} - -/// Creates a new channel for sharing messages with other coroutines. -/// -/// **Example** -/// -/// ``` -/// void coroutine(int argc, void *argv[]) { -/// neco_chan *ch = argv[0]; -/// -/// // Send a message -/// neco_chan_send(ch, &(int){ 1 }); -/// -/// // Release the channel -/// neco_chan_release(ch); -/// } -/// -/// int neco_start(int argc, char *argv[]) { -/// neco_chan *ch; -/// neco_chan_make(&ch, sizeof(int), 0); -/// -/// // Retain a reference of the channel and provide it to a newly started -/// // coroutine. -/// neco_chan_retain(ch); -/// neco_start(coroutine, 1, ch); -/// -/// // Receive a message -/// int msg; -/// neco_chan_recv(ch, &msg); -/// printf("%d\n", msg); // prints '1' -/// -/// // Always release the channel when you are done -/// neco_chan_release(ch); -/// } -/// ``` -/// -/// @param chan Channel -/// @param data_size Data size of messages -/// @param capacity Buffer capacity -/// @return NECO_OK Success -/// @return NECO_NOMEM The system lacked the necessary resources -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @note The caller is responsible for freeing with neco_chan_release() -/// @note data_size and capacity cannot be greater than INT_MAX -int neco_chan_make(struct neco_chan **chan, size_t data_size, size_t capacity) { - int ret = chan_make(chan, data_size, capacity); - error_guard(ret); - return ret; -} - -static void chan_fastretain(struct neco_chan *chan) { - chan->rc++; -} - -static int chan_retain(struct neco_chan *chan) { - if (!chan) { - return NECO_INVAL; - } else if (!rt || rt->id != chan->rtid) { - return NECO_PERM; - } - chan_fastretain(chan); - return NECO_OK; -} - -/// Retain a reference of the channel so it can be shared with other coroutines. -/// -/// This is needed for avoiding use-after-free bugs. -/// -/// See neco_chan_make() for an example. -/// -/// @param chan The channel -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @note The caller is responsible for releasing the reference with -/// neco_chan_release() -/// @see Channels -/// @see neco_chan_release() -int neco_chan_retain(struct neco_chan *chan) { - int ret = chan_retain(chan); - error_guard(ret); - return ret; -} - -static bool zchanpush(struct neco_chan *chan) { - if (rt->zchanpoollen == rt->zchanpoolcap) { - if (rt->zchanpoolcap == 256) { - return false; - } - int cap = rt->zchanpoolcap == 0 ? 16 : rt->zchanpoolcap * 2; - void *zchanpool2 = realloc0(rt->zchanpool, - sizeof(struct neco_chan) * (size_t)cap); - if (!zchanpool2) { - return false; - } - rt->zchanpoolcap = cap; - rt->zchanpool = zchanpool2; - } - rt->zchanpool[rt->zchanpoollen++] = chan; - return true; -} - -static void chan_fastrelease(struct neco_chan *chan) { - chan->rc--; - if (chan->rc < 0) { - if (!POOL_ENABLED || chan->msgsize > 0 || !zchanpush(chan)) { - free0(chan); - } - } -} - -static int chan_release(struct neco_chan *chan) { - if (!chan) { - return NECO_INVAL; - } else if (!rt || rt->id != chan->rtid) { - return NECO_PERM; - } - chan_fastrelease(chan); - return NECO_OK; -} - -/// Release a reference to a channel -/// -/// See neco_chan_make() for an example. -/// -/// @param chan The channel -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @see Channels -/// @see neco_chan_retain() -int neco_chan_release(struct neco_chan *chan) { - int ret = chan_release(chan); - error_guard(ret); - return ret; -} - -static int chan_send0(struct neco_chan *chan, void *data, bool broadcast, - int64_t deadline) -{ - if (!chan) { - return NECO_INVAL; - } else if (!rt || chan->rtid != rt->id) { - return NECO_PERM; - } else if (chan->sclosed) { - return NECO_CLOSED; - } - struct coroutine *co = coself(); - if (co->canceled && !broadcast) { - co->canceled = false; - return NECO_CANCELED; - } - int sent = 0; - while (!colist_is_empty(&chan->queue) && chan->qrecv) { - // A receiver is currently waiting for a message. - // Pop it from the queue. - struct coroutine *recv = colist_pop_front(&chan->queue); - if (recv->kind == SELECTCASE) { - // The receiver is a select-case. - struct coselectcase *cocase = (struct coselectcase *)recv; - if (*cocase->ret_idx != -1) { - // This select-case has already been handled - continue; - } - // Set the far stack index pointer and exchange the select-case - // with the real coroutine. - *cocase->ret_idx = cocase->idx; - recv = cocase->co; - recv->cmsg = cocase->data; - *cocase->ok = true; - } - // Directly copy the message to the receiver's 'data' argument. - if (chan->msgsize > 0) { - memcpy(recv->cmsg, data, (size_t)chan->msgsize); - } - if (!broadcast) { - // Resume receiver immediately. - sco_resume(recv->id); - return NECO_OK; - } else { - // Schedule the reciever. - sched_resume(recv); - sent++; - } - } - if (broadcast) { - yield_for_sched_resume(); - return sent; - } - - if (chan->buflen < chan->bufcap) { - // There room to write to the ring buffer. - // Add this message and return immediately. - cbuf_push(chan, data); - return NECO_OK; - } - - // Push this sender to queue - colist_push_back(&chan->queue, co); - chan->qrecv = false; - co->cmsg = data; - - // Wait for a receiver to consume this message. - rt->nsenders++; - copause(deadline); - rt->nsenders--; - remove_from_list(co); - - co->cmsg = NULL; - return checkdl(co, INT64_MAX); -} - -/// Same as neco_chan_send() but with a deadline parameter. -int neco_chan_send_dl(neco_chan *chan, void *data, int64_t deadline) { - int ret = chan_send0(chan, data, false, deadline); - async_error_guard(ret); - return ret; -} - -/// Send a message -/// -/// See neco_chan_make() for an example. -/// -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_CANCELED Operation canceled -/// @return NECO_CLOSED Channel closed -/// @see Channels -/// @see neco_chan_recv() -int neco_chan_send(struct neco_chan *chan, void *data) { - return neco_chan_send_dl(chan, data, INT64_MAX); -} - -/// Sends message to all receiving channels. -/// @return The number of channels that received the message -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_CLOSED Channel closed -/// @note This operation cannot be canceled and does not timeout -/// @see Channels -/// @see neco_chan_recv() -int neco_chan_broadcast(struct neco_chan *chan, void *data) { - int ret = chan_send0(chan, data, true, INT64_MAX); - error_guard(ret); - return ret; -} - -static int chan_tryrecv0(struct neco_chan *chan, void *data, bool try, - int64_t deadline) -{ - if (!chan) { - return NECO_INVAL; - } else if (!rt || chan->rtid != rt->id) { - return NECO_PERM; - } else if (chan->rclosed) { - return NECO_CLOSED; - } - struct coroutine *co = coself(); - if (co->canceled) { - co->canceled = false; - return NECO_CANCELED; - } - if (chan->buflen > 0) { - // Take from the buffer - cbuf_pop(chan, data); - struct coroutine *send = NULL; - if (!colist_is_empty(&chan->queue)) { - // There's a sender waiting to send a message. - // Put the sender's message in the buffer and wake it up. - send = colist_pop_front(&chan->queue); - cbuf_push(chan, send->cmsg); - } - if (chan->sclosed && colist_is_empty(&chan->queue) && - chan->buflen == 0) - { - // The channel was closed and there are no more messages. - // Close the receiving side too - chan->rclosed = true; - } - if (send) { - sco_resume(send->id); - } - return NECO_OK; - } - - if (!colist_is_empty(&chan->queue) && !chan->qrecv) { - // A sender is currently waiting to send a message. - // This message must be consumed immediately. - struct coroutine *send = colist_pop_front(&chan->queue); - if (chan->msgsize) { - memcpy(data, send->cmsg, (size_t)chan->msgsize); - } - if (chan->sclosed && colist_is_empty(&chan->queue) && - chan->buflen == 0) - { - // The channel was closed and there are no more messages. - // Now close the receiving side too. - chan->rclosed = true; - } - sco_resume(send->id); - return NECO_OK; - } - if (try) { - return NECO_EMPTY; - } - // Push the receiver to the queue. - colist_push_back(&chan->queue, co); - chan->qrecv = true; - // Assign the 'cmsg' message slot so that the sender knows where to copy - // the message. - co->cmsg = data; - // Set the channel closed flag that *may* be changed by the sender. - co->cclosed = false; - // Wait for a sender. - rt->nreceivers++; - copause(deadline); - rt->nreceivers--; - remove_from_list(co); - // The sender has already copied its message to 'data'. - co->cmsg = NULL; - int ret = checkdl(co, INT64_MAX); - if (ret != NECO_OK) { - return ret; - } - if (co->cclosed) { - // The channel was closed for receiving while this coroutine was - // waiting on a new message. - if (chan->msgsize) { - memset(data, 0, (size_t)chan->msgsize); - } - co->cclosed = false; - return NECO_CLOSED; - } else { - return NECO_OK; - } -} - -/// Same as neco_chan_recv() but with a deadline parameter. -int neco_chan_recv_dl(struct neco_chan *chan, void *data, int64_t deadline) { - int ret = chan_tryrecv0(chan, data, false, deadline); - async_error_guard(ret); - return ret; -} - -/// Receive a message -/// -/// See neco_chan_make() for an example. -/// -/// @param chan channel -/// @param data data pointer -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_CANCELED Operation canceled -/// @return NECO_CLOSED Channel closed -/// @see Channels -/// @see neco_chan_send() -int neco_chan_recv(struct neco_chan *chan, void *data) { - return neco_chan_recv_dl(chan, data, INT64_MAX); -} - -/// Receive a message, but do not wait if the message is not available. -/// @param chan channel -/// @param data data pointer -/// @return NECO_OK Success -/// @return NECO_EMPTY No message available -/// @return NECO_CLOSED Channel closed -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @see Channels -/// @see neco_chan_recv() -int neco_chan_tryrecv(struct neco_chan *chan, void *data) { - int ret = chan_tryrecv0(chan, data, true, INT64_MAX); - async_error_guard(ret); - return ret; -} - -static int chan_close(struct neco_chan *chan) { - if (!chan) { - return NECO_INVAL; - } else if (!rt || chan->rtid != rt->id) { - return NECO_PERM; - } else if (chan->sclosed) { - return NECO_CLOSED; - } - chan->sclosed = true; - if (chan->buflen > 0 || (!colist_is_empty(&chan->queue) && !chan->qrecv)) { - // There are currently messages in the buffer or senders still waiting - // to send messages. Do not close the receiver side yet. - return NECO_OK; - } - // No buffered messages or senders waiting. - // Close the receiver side and wake up all receivers. - while (!colist_is_empty(&chan->queue)) { - struct coroutine *recv = colist_pop_front(&chan->queue); - if (recv->kind == SELECTCASE) { - // The receiver is a select-case. - struct coselectcase *cocase = (struct coselectcase *)recv; - if (*cocase->ret_idx != -1) { - // This select-case has already been handled - continue; - } - // Set the far stack index pointer and exchange the select-case - // with the real coroutine. - *cocase->ret_idx = cocase->idx; - recv = cocase->co; - *cocase->ok = false; - } - recv->cclosed = true; - sched_resume(recv); - } - chan->rclosed = true; - chan->qrecv = false; - yield_for_sched_resume(); - return NECO_OK; -} - -/// Close a channel for sending. -/// @param chan channel -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_CLOSED Channel already closed -int neco_chan_close(struct neco_chan *chan) { - int ret = chan_close(chan); - error_guard(ret); - return ret; -} - -static int chan_select(int ncases, struct coselectcase *cases, int *ret_idx, - int64_t deadline, bool try) -{ - // Check that the channels are valid before continuing. - for (int i = 0; i < ncases; i++) { - struct neco_chan *chan = cases[i].chan; - if (!chan) { - return NECO_INVAL; - } else if (chan->rtid != rt->id) { - return NECO_PERM; - } - } - - struct coroutine *co = coself(); - - if (co->canceled) { - co->canceled = false; - return NECO_CANCELED; - } - - // Scan each channel and see if there are any messages waiting in their - // queue or if any are closed. - // If so then receive that channel immediately. - for (int i = 0; i < ncases; i++) { - struct neco_chan *chan = cases[i].chan; - if ((!colist_is_empty(&chan->queue) && !chan->qrecv) || - chan->buflen > 0 || chan->rclosed) - { - int ret = neco_chan_recv(cases[i].chan, cases[i].data); - *cases[i].ok = ret == NECO_OK; - return i; - } - } - - if (try) { - return NECO_EMPTY; - } - - // Push all cases into their repsective channel queue. - for (int i = 0; i < ncases; i++) { - colist_push_back(&cases[i].chan->queue, (struct coroutine*)&cases[i]); - cases[i].chan->qrecv = true; - } - - // Wait for a sender to wake us up - rt->nreceivers++; - copause(deadline); - rt->nreceivers--; - - // Remove all cases - for (int i = 0; i < ncases; i++) { - remove_from_list((struct coroutine*)&cases[i]); - } - int ret = checkdl(co, INT64_MAX); - return ret == NECO_OK ? *ret_idx : ret; -} - -static int chan_selectv_dl(int ncases, va_list *args, struct neco_chan **chans, - int64_t deadline, bool try) -{ - if (ncases < 0) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - - // Allocate space for storing each select-case struct. - // These are used in place of a coroutine for the channel receiver queues. - bool must_free; - struct coselectcase stack_cases[8]; - struct coselectcase *cases; - if (ncases > 8) { - cases = malloc0((size_t)ncases * sizeof(struct coselectcase)); - if (!cases) { - return NECO_NOMEM; - } - must_free = true; - } else { - cases = stack_cases; - must_free = false; - } - struct coroutine *co = coself(); - int ret_idx = -1; - - // Copy the select-case arguments into the array. - for (int i = 0; i < ncases; i++) { - struct neco_chan *chan; - chan = args ? va_arg(*args, struct neco_chan*) : chans[i]; - cases[i] = (struct coselectcase){ - .chan = chan, - .kind = SELECTCASE, - .idx = i, - .ret_idx = &ret_idx, - .co = co, - .data = chan ? cbufslot(chan, chan->bufcap) : 0, - .ok = chan ? &chan->lok : 0, - }; - cases[i].next = (struct coroutine*)&cases[i]; - cases[i].prev = (struct coroutine*)&cases[i]; - } - int ret = chan_select(ncases, cases, &ret_idx, deadline, try); - if (must_free) { - free0(cases); - } - return ret; -} - -/// Same as neco_chan_selectv() but with a deadline parameter. -int neco_chan_selectv_dl(int nchans, struct neco_chan *chans[], - int64_t deadline) -{ - int ret = chan_selectv_dl(nchans, 0, chans, deadline, false); - async_error_guard(ret); - return ret; -} - -/// Same as neco_chan_select() but using an array for arguments. -int neco_chan_selectv(int nchans, struct neco_chan *chans[]) { - return neco_chan_selectv_dl(nchans, chans, INT64_MAX); -} - -/// Same as neco_chan_select() but with a deadline parameter. -int neco_chan_select_dl(int64_t deadline, int nchans, ...) { - va_list args; - va_start(args, nchans); - int ret = chan_selectv_dl(nchans, &args, 0, deadline, false); - va_end(args); - async_error_guard(ret); - return ret; -} - -/// Wait on multiple channel operations at the same time. -/// -/// **Example** -/// -/// ``` -/// -/// // Let's say we have two channels 'c1' and 'c2' that both transmit 'char *' -/// // messages. -/// -/// // Use neco_chan_select() to wait on both channels. -/// -/// char *msg; -/// int idx = neco_chan_select(2, c1, c2); -/// switch (idx) { -/// case 0: -/// neco_chan_case(c1, &msg); -/// break; -/// case 1: -/// neco_chan_case(c2, &msg); -/// break; -/// default: -/// // Error occured. The return value 'idx' is the error -/// } -/// -/// printf("%s\n", msg); -/// ``` -/// -/// @param nchans Number of channels -/// @param ... The channels -/// @return The index of channel with an available message -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_NOMEM The system lacked the necessary resources -/// @return NECO_CANCELED Operation canceled -/// @see Channels -int neco_chan_select(int nchans, ...) { - va_list args; - va_start(args, nchans); - int ret = chan_selectv_dl(nchans, &args, 0, INT64_MAX, false); - va_end(args); - async_error_guard(ret); - return ret; -} - -/// Same as neco_chan_select() but does not wait if a message is not available -/// @return NECO_EMPTY No message available -/// @see Channels -/// @see neco_chan_select() -int neco_chan_tryselect(int nchans, ...) { - va_list args; - va_start(args, nchans); - int ret = chan_selectv_dl(nchans, &args, 0, INT64_MAX, true); - va_end(args); - async_error_guard(ret); - return ret; -} - -/// Same as neco_chan_tryselect() but uses an array for arguments. -int neco_chan_tryselectv(int nchans, struct neco_chan *chans[]) { - int ret = chan_selectv_dl(nchans, 0, chans, 0, true); - async_error_guard(ret); - return ret; -} - -static int chan_case(struct neco_chan *chan, void *data) { - if (!chan) { - return NECO_INVAL; - } else if (!rt || chan->rtid != rt->id) { - return NECO_PERM; - } else if (!chan->lok) { - return NECO_CLOSED; - } - if (chan->msgsize) { - memcpy(data, cbufslot(chan, chan->bufcap), (size_t)chan->msgsize); - } - return NECO_OK; -} - -/// Receive the message after a successful neco_chan_select(). -/// See neco_chan_select() for an example. -/// @param chan The channel -/// @param data The data -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_CLOSED Channel closed -int neco_chan_case(struct neco_chan *chan, void *data) { - int ret = chan_case(chan, data); - error_guard(ret); - return ret; -} - -struct getaddrinfo_args { - atomic_int returned; - char *node; - char *service; - struct addrinfo *hints; - struct addrinfo *res; - int fds[2]; - int ret; - int errnum; -#ifdef __FreeBSD__ - void *dlhandle; -#endif -}; - -static void gai_args_free(struct getaddrinfo_args *args) { - if (args) { - free0(args->service); - free0(args->node); - free0(args->hints); - freeaddrinfo(args->res); - if (args->fds[0]) { - must(close(args->fds[0]) == 0); - } - if (args->fds[1]) { - must(close(args->fds[1]) == 0); - } -#ifdef __FreeBSD__ - if (args->dlhandle) { - dlclose(args->dlhandle); - } -#endif - free0(args); - } -} - -static struct getaddrinfo_args *gai_args_new(const char *node, - const char *service, const struct addrinfo *hints) -{ - struct getaddrinfo_args *args = malloc0(sizeof(struct getaddrinfo_args)); - if (!args) { - return NULL; - } - memset(args, 0, sizeof(struct getaddrinfo_args)); - if (node) { - size_t nnode = strlen(node); - args->node = malloc0(nnode+1); - if (!args->node) { - gai_args_free(args); - return NULL; - } - memcpy(args->node, node, nnode+1); - } - if (service) { - size_t nservice = strlen(service); - args->service = malloc0(nservice+1); - if (!args->service) { - gai_args_free(args); - return NULL; - } - memcpy(args->service, service, nservice+1); - } - if (hints) { - args->hints = malloc0(sizeof(struct addrinfo)); - if (!args->hints) { - gai_args_free(args); - return NULL; - } - memset(args->hints, 0, sizeof(struct addrinfo)); - args->hints->ai_flags = hints->ai_flags; - args->hints->ai_family = hints->ai_family; - args->hints->ai_socktype = hints->ai_socktype; - args->hints->ai_protocol = hints->ai_protocol; - args->hints->ai_next = NULL; - } - return args; -} - -static atomic_int getaddrinfo_th_counter = 0; - -#ifdef NECO_TESTING -int neco_getaddrinfo_nthreads(void) { - return atomic_load(&getaddrinfo_th_counter); -} -#endif - -static void *getaddrinfo_th(void *v) { - struct getaddrinfo_args *a = v; - a->ret = getaddrinfo(a->node, a->service, a->hints, &a->res); - a->errnum = errno; - must(write(a->fds[1], &(int){1}, sizeof(int)) == sizeof(int)); - while (!atomic_load(&a->returned)) { - sched_yield(); - } - gai_args_free(a); - atomic_fetch_sub(&getaddrinfo_th_counter, 1); - return NULL; -} - -static bool is_ip_address(const char *addr) { - bool ok = false; - if (addr) { - struct in6_addr result; - ok = inet_pton(AF_INET, addr, &result) == 1 || - inet_pton(AF_INET6, addr, &result) == 1; - } - return ok; -} - -static void cleanup_gai(void *ptr) { - // This notifies the gai thread that it should return. The thread itself - // will do the actual cleanup of resources. - struct getaddrinfo_args *args = ptr; - atomic_store(&args->returned, 1); -} - -#ifdef _WIN32 -int pipe1(int fds[2]) { - return _pipe(fds, 64, _O_BINARY); -} -#else -#define pipe1 pipe0 -#endif - -static int getaddrinfo_dl(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res, int64_t deadline) -{ - struct coroutine *co = coself(); - if (!co) { - errno = EPERM; - return EAI_SYSTEM; - } - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - errno = ret == NECO_CANCELED ? ECANCELED : ETIMEDOUT; - return EAI_SYSTEM; - } - if (is_ip_address(node)) { - // This is a simple address. Since there's no DNS lookup involved we - // can use the standard getaddrinfo function without worrying about - // much delay. - return getaddrinfo(node, service, hints, res); - } - - // DNS lookup is probably needed. This may cause network usage and who - // knows how long it will take to return. Here we'll use a background - // thread to do the work and we'll wait by using a local pipe. - struct getaddrinfo_args *args = gai_args_new(node, service, hints); - if (!args) { - return EAI_MEMORY; - } - - // Create a pipe to communicate with the thread. This allows us to use the - // async neco_read() operation, which includes builtin deadline and cancel - // support. Using a traditional pthread mutexes or cond variables are not - // an option. - if (pipe1(args->fds) == -1) { - gai_args_free(args); - return EAI_SYSTEM; - } -#ifndef _WIN32 - if (neco_setnonblock(args->fds[0], true, 0) == -1) { - gai_args_free(args); - return EAI_SYSTEM; - } -#endif - - pthread_t th; -#ifdef __FreeBSD__ - // The pthread functions are not included in libc for FreeBSD, dynamically - // load the function instead. - int (*pthread_create)(pthread_t*,const pthread_attr_t*,void*(*)(void*), - void*); - int (*pthread_detach)(pthread_t); - args->dlhandle = dlopen("/usr/lib/libpthread.so", RTLD_LAZY); - if (!args->dlhandle) { - gai_args_free(args); - return EAI_SYSTEM; - } - pthread_create = (int(*)(pthread_t*,const pthread_attr_t*,void*(*)(void*), - void*))dlsym(args->dlhandle, "pthread_create"); - pthread_detach = (int(*)(pthread_t)) - dlsym(args->dlhandle, "pthread_detach"); - if (!pthread_create || !pthread_detach) { - gai_args_free(args); - return EAI_SYSTEM; - } -#endif - atomic_fetch_add(&getaddrinfo_th_counter, 1); - ret = pthread_create0(&th, 0, getaddrinfo_th, args); - if (ret != 0) { - errno = ret; - gai_args_free(args); - atomic_fetch_sub(&getaddrinfo_th_counter, 1); - return EAI_SYSTEM; - } - must(pthread_detach0(th) == 0); - - // At this point the args are owned by the thread and all cleanup will - // happen there. The thread will complete the getaddrinfo operation. - // Then we'll steal the result and return it to the caller. - neco_cleanup_push(cleanup_gai, args); - int ready = 0; - ssize_t n = neco_read_dl(args->fds[0], &ready, sizeof(int), deadline); - ret = EAI_SYSTEM; - if (n != -1) { - must(ready == 1 && n == sizeof(int)); - *res = args->res; - args->res = NULL; - ret = args->ret; - errno = args->errnum; - coyield(); - } - neco_cleanup_pop(1); - return ret; -} - -/// Same as neco_getaddrinfo() but with a deadline parameter. -int neco_getaddrinfo_dl(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res, int64_t deadline) -{ - int ret = getaddrinfo_dl(node, service, hints, res, deadline); - int err; - if (ret == 0) { - err = NECO_OK; - } else if (ret == EAI_SYSTEM) { - err = NECO_ERROR; - } else { - err = NECO_GAIERROR; - } - async_error_guard(err); - return ret; -} - -/// The getaddrinfo() function is used to get a list of addresses and port -/// numbers for node (hostname) and service. -/// -/// This is functionally identical to the Posix getaddrinfo function with the -/// exception that it does not block, allowing for usage in a Neco coroutine. -/// -/// @return On success, 0 is returned -/// @return On error, a nonzero error code defined by the system. See the link -/// below for a list. -/// @see Posix -/// @see https://www.man7.org/linux/man-pages/man3/getaddrinfo.3.html -int neco_getaddrinfo(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res) -{ - return neco_getaddrinfo_dl(node, service, hints, res, INT64_MAX); -} - -// Returns a host and port. -// The host will need to be freed by the caller. -static int parse_tcp_addr(const char *addr, char **host, const char **port) { - size_t naddr = strlen(addr); - if (naddr == 0) { - return NECO_INVAL; - } - const char *colon = NULL; - for (size_t i = naddr-1; ; i--) { - if (addr[i] == ':') { - colon = addr+i; - break; - } - if (i == 0) { - break; - } - } - if (!colon) { - return NECO_INVAL; - } - *port = colon+1; - naddr = (size_t)(colon-addr); - if (addr[0] == '[' && addr[naddr-1] == ']') { - addr++; - naddr -= 2; - } - *host = malloc0(naddr+1); - if (!*host) { - return NECO_NOMEM; - } - memcpy(*host, addr, naddr); - (*host)[naddr] = '\0'; - return NECO_OK; -} - -int neco_errconv_from_gai(int errnum) { - switch (errnum) { - case EAI_MEMORY: - return NECO_NOMEM; - case EAI_SYSTEM: - return neco_errconv_from_sys(); - default: - neco_gai_errno = errnum; - return NECO_GAIERROR; - } -} - -static void cleanup_free_host(void *host) { - free0(host); -} - -// Returns NECO errors -static int getaddrinfo_from_tcp_addr_dl(const char *addr, int tcp_vers, - struct addrinfo **res, int64_t deadline) -{ - char *host = NULL; - const char *port = 0; - int ret = parse_tcp_addr(addr, &host, &port); - if (ret != NECO_OK) { - return ret; - } - struct addrinfo hints = { 0 }; - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - hints.ai_family = tcp_vers; - struct addrinfo *ainfo = NULL; - const char *vhost = host; - if (vhost[0] == '\0') { - if (tcp_vers == AF_INET6) { - vhost = "::"; - } else { - vhost = "0.0.0.0"; - } - } - neco_cleanup_push(cleanup_free_host, host); - ret = neco_getaddrinfo_dl(vhost, port, &hints, &ainfo, deadline); - neco_cleanup_pop(1); - if (ret != 0) { - return neco_errconv_from_gai(ret); - } - // It has been observed on Linux that a getaddrinfo can successfully return - // but with an empty result. Let's check for that case and ensure an error - // is returned to the caller. - neco_gai_errno = EAI_FAIL; - ret = NECO_GAIERROR; - *res = 0; - if (ainfo) { - *res = ainfo; - ret = NECO_OK; - neco_gai_errno = EAI_FAIL; - } - return ret; -} - - - -static int getaddrinfo_from_tcp_addr_dl(const char *addr, int tcp_vers, - struct addrinfo **res, int64_t deadline); - -int neco_errconv_from_sys(void); - -static int setnonblock(int fd, bool nonblock, bool *oldnonblock) { -#ifdef _WIN32 - // There's no way to detect if a socket is in non-blocking mode in Windows. - return ioctlsocket(fd, FIONBIO, &(unsigned long){ nonblock }); -#else - int flags = fcntl0(fd, F_GETFL, 0); - if (flags == -1) { - return -1; - } - if (oldnonblock) { - *oldnonblock = (flags & O_NONBLOCK) == O_NONBLOCK; - } - if (nonblock) { - flags |= O_NONBLOCK; - } else { - flags &= ~O_NONBLOCK; - } - return fcntl0(fd, F_SETFL, flags); -#endif -} - -/// Change the non-blocking state for a file descriptor. -/// @see Posix2 -int neco_setnonblock(int fd, bool nonblock, bool *oldnonblock) { - int ret = setnonblock(fd, nonblock, oldnonblock); - error_guard(ret); - return ret; -} - -static void cleanup_close_socket(void *arg) { - close(*(int*)arg); -} - -static int dial_connect_dl(int domain, int type, int protocol, - const struct sockaddr *addr, socklen_t addrlen, int64_t deadline) -{ - int fd = socket0(domain, type, protocol); - if (fd == -1) { - return -1; - } - if (neco_setnonblock(fd, true, 0) == -1) { - close(fd); - return -1; - } - int ret; - neco_cleanup_push(cleanup_close_socket, &fd); - ret = neco_connect_dl(fd, addr, addrlen, deadline); - if (ret == 0) { - ret = fd; - fd = -1; - } - neco_cleanup_pop(1); - return ret; -} - -static void cleanup_addrinfo(void *arg) { - struct addrinfo *ainfo = arg; - freeaddrinfo(ainfo); -} - -static int dial_tcp_dl(const char *addr, int tcp_vers, int64_t deadline) { - struct addrinfo *ainfo; - int ret = getaddrinfo_from_tcp_addr_dl(addr, tcp_vers, &ainfo, deadline); - if (ret != NECO_OK) { - return ret; - } - int fd; - neco_cleanup_push(cleanup_addrinfo, ainfo); - struct addrinfo *ai = ainfo; - do { - fd = dial_connect_dl(ai->ai_family, ai->ai_socktype, ai->ai_protocol, - ai->ai_addr, ai->ai_addrlen, deadline); - if (fd != -1) { - break; - } - ai = ai->ai_next; - } while (ai); - if (fd == -1) { - fd = neco_errconv_from_sys(); - } - neco_cleanup_pop(1); - return fd; -} - -static int dial_unix_dl(const char *addr, int64_t deadline) { - (void)addr; (void)deadline; -#ifdef _WIN32 - return NECO_PERM; -#else - struct sockaddr_un unaddr = { .sun_family = AF_UNIX }; - size_t naddr = strlen(addr); - if (naddr > sizeof(unaddr.sun_path) - 1) { - return NECO_INVAL; - } - strncpy(unaddr.sun_path, addr, sizeof(unaddr.sun_path) - 1); - int fd = dial_connect_dl(AF_UNIX, SOCK_STREAM, 0, (void*)&unaddr, - sizeof(struct sockaddr_un), deadline); - if (fd == -1) { - fd = neco_errconv_from_sys(); - } - return fd; -#endif -} - -static int dial_dl(const char *network, const char *address, int64_t deadline) { - if (neco_getid() <= 0) { - return NECO_PERM; - } else if (!network || !address) { - return NECO_INVAL; - } else if (strcmp(network, "tcp") == 0) { - return dial_tcp_dl(address, 0, deadline); - } else if (strcmp(network, "tcp4") == 0) { - return dial_tcp_dl(address, AF_INET, deadline); - } else if (strcmp(network, "tcp6") == 0) { - return dial_tcp_dl(address, AF_INET6, deadline); - } else if (strcmp(network, "unix") == 0) { - return dial_unix_dl(address, deadline); - } else { - return NECO_INVAL; - } -} - -/// Same as neco_dial() but with a deadline parameter. -int neco_dial_dl(const char *network, const char *address, int64_t deadline) { - int ret = dial_dl(network, address, deadline); - error_guard(ret); - return ret; -} - -/// Connect to a remote server. -/// -/// **Example** -/// -/// ```c -/// int fd = neco_dial("tcp", "google.com:80"); -/// if (fd < 0) { -/// // .. error, do something with it. -/// } -/// // Connected to google.com. Use neco_read(), neco_write(), or create a -/// // stream using neco_stream_make(fd). -/// close(fd); -/// ``` -/// @param network must be "tcp", "tcp4", "tcp6", or "unix". -/// @param address the address to dial -/// @return On success, file descriptor (non-blocking) -/// @return On error, Neco error -/// @see Networking -/// @see neco_serve() -int neco_dial(const char *network, const char *address) { - return neco_dial_dl(network, address, INT64_MAX); -} - -static int listen_tcp_dl(const char *addr, int tcp_vers, int64_t deadline) { - struct addrinfo *ainfo; - int ret = getaddrinfo_from_tcp_addr_dl(addr, tcp_vers, &ainfo, deadline); - if (ret != NECO_OK) { - return ret; - } - int fd = socket0(ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol); - bool ok = fd != -1 && setsockopt0(fd, SOL_SOCKET, SO_REUSEADDR, &(int){1}, - sizeof(int)) != -1; - ok = ok && bind0(fd, ainfo->ai_addr, ainfo->ai_addrlen) != -1; - freeaddrinfo(ainfo); - ok = ok && listen0(fd, SOMAXCONN) != -1; - ok = ok && neco_setnonblock(fd, true, 0) != -1; - if (!ok) { - if (fd != -1) { - close(fd); - fd = -1; - } - } - return fd; -} - -static int listen_unix_dl(const char *addr, int64_t deadline) { - (void)addr; (void)deadline; -#ifdef _WIN32 - return NECO_PERM; -#else - int fd = socket0(AF_UNIX, SOCK_STREAM, 0); - if (fd == -1) { - return NECO_ERROR; - } - struct sockaddr_un unaddr; - memset(&unaddr, 0, sizeof(struct sockaddr_un)); - unaddr.sun_family = AF_UNIX; - strncpy(unaddr.sun_path, addr, sizeof(unaddr.sun_path) - 1); - if (bind0(fd, (void*)&unaddr, sizeof(struct sockaddr_un)) == -1) { - close(fd); - return NECO_ERROR; - } - if (listen0(fd, SOMAXCONN) == -1) { - close(fd); - return NECO_ERROR; - } - if (neco_setnonblock(fd, true, 0) == -1) { - close(fd); - return NECO_ERROR; - } - return fd; -#endif -} - -static int serve_dl(const char *network, const char *address, int64_t deadline) -{ - if (!network || !address) { - return NECO_INVAL; - } else if (neco_getid() <= 0) { - return NECO_PERM; - } else if (strcmp(network, "tcp") == 0) { - return listen_tcp_dl(address, 0, deadline); - } else if (strcmp(network, "tcp4") == 0) { - return listen_tcp_dl(address, AF_INET, deadline); - } else if (strcmp(network, "tcp6") == 0) { - return listen_tcp_dl(address, AF_INET6, deadline); - } else if (strcmp(network, "unix") == 0) { - return listen_unix_dl(address, deadline); - } else { - return NECO_INVAL; - } -} - -/// Same as neco_serve() but with a deadline parameter. -int neco_serve_dl(const char *network, const char *address, int64_t deadline) { - int ret = serve_dl(network, address, deadline); - async_error_guard(ret); - return ret; -} - - -/// Listen on a local network address. -/// -/// **Example** -/// -/// ```c -/// int servefd = neco_serve("tcp", "127.0.0.1:8080"); -/// if (servefd < 0) { -/// // .. error, do something with it. -/// } -/// while (1) { -/// int fd = neco_accept(servefd, 0, 0); -/// // client accepted -/// } -/// -/// close(servefd); -/// ``` -/// @param network must be "tcp", "tcp4", "tcp6", or "unix". -/// @param address the address to serve on -/// @return On success, file descriptor (non-blocking) -/// @return On error, Neco error -/// @see Networking -/// @see neco_dial() -int neco_serve(const char *network, const char *address) { - return neco_serve_dl(network, address, INT64_MAX); -} - -//////////////////////////////////////////////////////////////////////////////// -// sync -//////////////////////////////////////////////////////////////////////////////// - -struct neco_mutex { - _Alignas(16) // needed for opaque type alias - int64_t rtid; // runtime id - bool locked; // mutex is locked (read or write) - int rlocked; // read lock counter - struct colist queue; // coroutine doubly linked list -}; - - -static_assert(sizeof(neco_mutex) >= sizeof(struct neco_mutex), ""); -static_assert(_Alignof(neco_mutex) == _Alignof(struct neco_mutex), ""); - -static int mutex_init(neco_mutex *mutex) { - struct neco_mutex *mu = (void*)mutex; - if (!mu) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - memset(mu, 0, sizeof(struct neco_mutex)); - mu->rtid = rt->id; - colist_init(&mu->queue); - return NECO_OK; -} - -int neco_mutex_init(neco_mutex *mutex) { - int ret = mutex_init(mutex); - error_guard(ret); - return ret; -} - -inline -static int check_mutex(struct coroutine *co, struct neco_mutex *mu) { - if (!mu) { - return NECO_INVAL; - } else if (!co) { - return NECO_PERM; - } else if (mu->rtid == 0) { - return neco_mutex_init((neco_mutex*)mu); - } else if (rt->id != mu->rtid) { - return NECO_PERM; - } - return NECO_OK; -} - -inline -static int mutex_trylock(struct coroutine *co, struct neco_mutex *mu, - bool tryonly, int64_t deadline) -{ - if (!tryonly) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - return ret; - } - } - if (mu->locked) { - return NECO_BUSY; - } - mu->locked = true; - return NECO_OK; -} - -inline -static int mutex_tryrdlock(struct coroutine *co, struct neco_mutex *mu, - bool tryonly, int64_t deadline) -{ - if (!tryonly) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - return ret; - } - } - if (!colist_is_empty(&mu->queue) || (mu->rlocked == 0 && mu->locked)) { - return NECO_BUSY; - } - mu->rlocked++; - mu->locked = true; - return NECO_OK; -} - -int neco_mutex_trylock(neco_mutex *mutex) { - struct coroutine *co = coself(); - struct neco_mutex *mu = (void*)mutex; - int ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - ret = mutex_trylock(co, mu, true, 0); - async_error_guard(ret); - return ret; -} - -int neco_mutex_tryrdlock(neco_mutex *mutex) { - struct coroutine *co = coself(); - struct neco_mutex *mu = (void*)mutex; - int ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - ret = mutex_tryrdlock(co, mu, true, 0); - async_error_guard(ret); - return ret; -} - -noinline -static int finish_lock(struct coroutine *co, struct neco_mutex *mu, - bool rlocked, int64_t deadline) -{ - co->rlocked = rlocked; - colist_push_back(&mu->queue, co); - rt->nlocked++; - copause(deadline); - rt->nlocked--; - remove_from_list(co); - co->rlocked = false; - return checkdl(co, INT64_MAX); -} - -static int mutex_lock_dl(struct coroutine *co, struct neco_mutex *mu, - int64_t deadline) -{ - int ret = mutex_trylock(co, mu, false, deadline); - if (ret == NECO_BUSY) { - // Another coroutine is holding this lock. - ret = finish_lock(co, mu, false, deadline); - } - return ret; -} - -int neco_mutex_lock_dl(neco_mutex *mutex, int64_t deadline) { - struct coroutine *co = coself(); - struct neco_mutex *mu = (void*)mutex; - int ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - ret = mutex_lock_dl(co, mu, deadline); - async_error_guard(ret); - return ret; -} - -int neco_mutex_lock(neco_mutex *mutex) { - return neco_mutex_lock_dl(mutex, INT64_MAX); -} - -int neco_mutex_rdlock_dl(neco_mutex *mutex, int64_t deadline) { - struct coroutine *co = coself(); - struct neco_mutex *mu = (void*)mutex; - int ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - ret = mutex_tryrdlock(co, mu, false, deadline); - if (ret == NECO_BUSY) { - // Another coroutine is holding this lock. - ret = finish_lock(co, mu, true, deadline); - } - async_error_guard(ret); - return ret; -} - -int neco_mutex_rdlock(neco_mutex *mutex) { - return neco_mutex_rdlock_dl(mutex, INT64_MAX); -} - -static void mutex_fastunlock(struct neco_mutex *mu) { - if (!mu->locked) { - return; - } - if (mu->rlocked > 0) { - // This lock is currently being used by a reader. - mu->rlocked--; - if (mu->rlocked > 0) { - // There are still more readers using this lock. - return; - } - } - if (colist_is_empty(&mu->queue)) { - // There are no more coroutines in the queue. - mu->locked = false; - return; - } - // Choose next coroutine to take the lock. - while (1) { - struct coroutine *co = colist_pop_front(&mu->queue); - // Schedule the coroutines to resume. - sched_resume(co); - if (co->rlocked) { - // The popped coroutine was a reader. - mu->rlocked++; - if (!colist_is_empty(&mu->queue) && mu->queue.head.next->rlocked) { - // The next in queue is also reader. - // Allow it to continue too. - continue; - } - } - break; - } - yield_for_sched_resume(); -} - -static int mutex_unlock(neco_mutex *mutex) { - struct coroutine *co = coself(); - struct neco_mutex *mu = (void*)mutex; - int ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - mutex_fastunlock(mu); - coyield(); - return NECO_OK; -} - -int neco_mutex_unlock(neco_mutex *mutex) { - int ret = mutex_unlock(mutex); - error_guard(ret); - return ret; -} - -inline -static int mutex_fastlock(struct coroutine *co, struct neco_mutex *mu, - int64_t deadline) -{ - if (!mu->locked) { - mu->locked = true; - return NECO_OK; - } - int ret = mutex_lock_dl(co, mu, deadline); - async_error_guard(ret); - return ret; -} - -#ifdef NECO_TESTING -// An optimistic lock routine for testing only -int neco_mutex_fastlock(neco_mutex *mutex, int64_t deadline) { - struct coroutine *co = coself(); - return mutex_fastlock(co, (struct neco_mutex *)mutex, deadline); -} -#endif - -static int mutex_destroy(neco_mutex *mutex) { - struct coroutine *co = coself(); - struct neco_mutex *mu = (void*)mutex; - int ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - if (mu->locked) { - return NECO_BUSY; - } - memset(mu, 0, sizeof(struct neco_mutex)); - return NECO_OK; -} - -int neco_mutex_destroy(neco_mutex *mutex) { - int ret = mutex_destroy(mutex); - error_guard(ret); - return ret; -} - -struct neco_waitgroup { - _Alignas(16) // needed for opaque type alias - int64_t rtid; // runtime id - int count; // current wait count - struct colist queue; // coroutine doubly linked list -}; - -static_assert(sizeof(neco_waitgroup) >= sizeof(struct neco_waitgroup), ""); -static_assert(_Alignof(neco_waitgroup) == _Alignof(struct neco_waitgroup), ""); - -inline -static int check_waitgroup(struct neco_waitgroup *wg) { - if (!wg) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } else if (wg->rtid == 0) { - return neco_waitgroup_init((neco_waitgroup*)wg); - } else if (rt->id != wg->rtid) { - return NECO_PERM; - } - return NECO_OK; -} - -static int waitgroup_init(neco_waitgroup *waitgroup) { - struct neco_waitgroup *wg = (void*)waitgroup; - if (!wg) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - memset(wg, 0, sizeof(struct neco_waitgroup)); - wg->rtid = rt->id; - colist_init(&wg->queue); - return NECO_OK; -} - - -int neco_waitgroup_init(neco_waitgroup *waitgroup) { - int ret = waitgroup_init(waitgroup); - error_guard(ret); - return ret; -} - -static int waitgroup_add(neco_waitgroup *waitgroup, int delta) { - struct neco_waitgroup *wg = (void*)waitgroup; - int ret = check_waitgroup(wg); - if (ret != NECO_OK) { - return ret; - } - int waiters = wg->count + delta; - if (waiters < 0) { - return NECO_NEGWAITGRP; - } - wg->count = waiters; - return NECO_OK; -} - - -int neco_waitgroup_add(neco_waitgroup *waitgroup, int delta) { - int ret = waitgroup_add(waitgroup, delta); - error_guard(ret); - return ret; -} - -static int waitgroup_done(neco_waitgroup *waitgroup) { - struct neco_waitgroup *wg = (void*)waitgroup; - int ret = check_waitgroup(wg); - if (ret != NECO_OK) { - return ret; - } - if (wg->count == 0) { - return NECO_NEGWAITGRP; - } - wg->count--; - if (wg->count == 0 && !colist_is_empty(&wg->queue)) { - struct coroutine *co = colist_pop_front(&wg->queue); - if (colist_is_empty(&wg->queue)) { - // Only one waiter. Do a quick switch. - sco_resume(co->id); - } else { - // Many waiters. Batch them together. - do { - sched_resume(co); - co = colist_pop_front(&wg->queue); - } while (co); - yield_for_sched_resume(); - } - } - return NECO_OK; -} - -int neco_waitgroup_done(neco_waitgroup *waitgroup) { - int ret = waitgroup_done(waitgroup); - error_guard(ret); - return ret; -} - -static int waitgroup_wait_dl(neco_waitgroup *waitgroup, int64_t deadline) { - struct neco_waitgroup *wg = (void*)waitgroup; - int ret = check_waitgroup(wg); - if (ret != NECO_OK) { - return ret; - } - struct coroutine *co = coself(); - ret = checkdl(co, deadline); - if (ret != NECO_OK) { - return ret; - } - if (wg->count == 0) { - // It's probably a good idea to yield to another coroutine. - coyield(); - return NECO_OK; - } - // The coroutine was added to the deadliner queue. We can safely - // yield and wait to be woken at some point in the future. - colist_push_back(&wg->queue, co); - rt->nwaitgroupers++; - copause(deadline); - rt->nwaitgroupers--; - remove_from_list(co); - return checkdl(co, INT64_MAX); -} - -int neco_waitgroup_wait_dl(neco_waitgroup *waitgroup, int64_t deadline) { - int ret = waitgroup_wait_dl(waitgroup, deadline); - async_error_guard(ret); - return ret; -} - -int neco_waitgroup_wait(neco_waitgroup *waitgroup) { - return neco_waitgroup_wait_dl(waitgroup, INT64_MAX); -} - -static int waitgroup_destroy(neco_waitgroup *waitgroup) { - struct neco_waitgroup *wg = (void*)waitgroup; - int ret = check_waitgroup(wg); - if (ret != NECO_OK) { - return ret; - } - memset(wg, 0, sizeof(struct neco_waitgroup)); - return NECO_OK; -} - -int neco_waitgroup_destroy(neco_waitgroup *waitgroup) { - int ret = waitgroup_destroy(waitgroup); - error_guard(ret); - return ret; -} - -struct neco_cond { - _Alignas(16) // needed for opaque type alias - int64_t rtid; // runtime id - struct colist queue; // coroutine doubly linked list -}; - -static_assert(sizeof(neco_cond) >= sizeof(struct neco_cond), ""); -static_assert(_Alignof(neco_cond) == _Alignof(struct neco_cond), ""); - -static int cond_init0(struct neco_cond *cv) { - memset(cv, 0, sizeof(struct neco_cond)); - cv->rtid = rt->id; - colist_init(&cv->queue); - return NECO_OK; -} - -static int cond_init(neco_cond *cond) { - struct neco_cond *cv = (void*)cond; - if (!cv) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - return cond_init0((struct neco_cond*)cond); -} - -int neco_cond_init(neco_cond *cond) { - int ret = cond_init(cond); - error_guard(ret); - return ret; -} - -inline -static int check_cond(struct neco_cond *cv) { - if (!cv) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } else if (cv->rtid == 0) { - return cond_init0(cv); - } else if (rt->id != cv->rtid) { - return NECO_PERM; - } - return NECO_OK; -} - -static int cond_destroy(neco_cond *cond) { - struct neco_cond *cv = (void*)cond; - int ret = check_cond(cv); - if (ret != NECO_OK) { - return ret; - } - memset(cv, 0, sizeof(struct neco_cond)); - return NECO_OK; -} - -int neco_cond_destroy(neco_cond *cond) { - int ret = cond_destroy(cond); - error_guard(ret); - return ret; -} - -static int cond_signal(neco_cond *cond) { - struct neco_cond *cvar = (void*)cond; - int ret = check_cond(cvar); - if (ret != NECO_OK) { - return ret; - } - struct coroutine *co = colist_pop_front(&cvar->queue); - if (co) { - sco_resume(co->id); - } - return NECO_OK; -} - -int neco_cond_signal(neco_cond *cond) { - int ret = cond_signal(cond); - error_guard(ret); - return ret; -} - -static int cond_broadcast(neco_cond *cond) { - struct neco_cond *cvar = (void*)cond; - int ret = check_cond(cvar); - if (ret != NECO_OK) { - return ret; - } - struct coroutine *co = colist_pop_front(&cvar->queue); - while (co) { - sched_resume(co); - co = colist_pop_front(&cvar->queue); - } - yield_for_sched_resume(); - return NECO_OK; -} - -int neco_cond_broadcast(neco_cond *cond) { - int ret = cond_broadcast(cond); - error_guard(ret); - return ret; -} - -static int cond_wait_dl(neco_cond *cond, neco_mutex *mutex, int64_t deadline) { - struct neco_cond *cvar = (struct neco_cond*)cond; - int ret = check_cond(cvar); - if (ret != NECO_OK) { - return ret; - } - struct coroutine *co = coself(); - struct neco_mutex *mu = (struct neco_mutex*)mutex; - ret = check_mutex(co, mu); - if (ret != NECO_OK) { - return ret; - } - if (co->canceled) { - co->canceled = false; - return NECO_CANCELED; - } - mutex_fastunlock(mu); - // The coroutine was added to the deadliner queue. We can safely - // yield and wait to be woken at some point in the future. - colist_push_back(&cvar->queue, co); - rt->ncondwaiters++; - copause(deadline); - rt->ncondwaiters--; - remove_from_list(co); - ret = checkdl(co, INT64_MAX); - // Must relock. - while (mutex_fastlock(co, mu, INT64_MAX) != NECO_OK) { } - return ret; -} - -int neco_cond_wait_dl(neco_cond *cond, neco_mutex *mutex, int64_t deadline) { - int ret = cond_wait_dl(cond, mutex, deadline); - async_error_guard(ret); - return ret; -} - -int neco_cond_wait(neco_cond *cond, neco_mutex *mutex) { - return neco_cond_wait_dl(cond, mutex, INT64_MAX); -} - -// Returns a string that indicates which coroutine method is being used by -// the program. Such as "asm,aarch64" or "ucontext", etc. -const char *neco_switch_method(void) { - return sco_info_method(); -} - -static int setcanceltype(int type, int *oldtype) { - if (type != NECO_CANCEL_ASYNC && type != NECO_CANCEL_INLINE) { - return NECO_INVAL; - } - struct coroutine *co = coself(); - if (!co) { - return NECO_PERM; - } - if (oldtype) { - *oldtype = co->canceltype; - } - co->canceltype = type; - return NECO_OK; -} - -int neco_setcanceltype(int type, int *oldtype) { - int ret = setcanceltype(type, oldtype); - error_guard(ret); - return ret; -} - -static int setcancelstate(int state, int *oldstate) { - if (state != NECO_CANCEL_ENABLE && state != NECO_CANCEL_DISABLE) { - return NECO_INVAL; - } - struct coroutine *co = coself(); - if (!co) { - return NECO_PERM; - } - if (oldstate) { - *oldstate = co->cancelstate; - } - co->cancelstate = state; - return NECO_OK; -} - -int neco_setcancelstate(int state, int *oldstate) { - int ret = setcancelstate(state, oldstate); - error_guard(ret); - return ret; -} - -static void cleanup_push(struct cleanup *handler, void (*routine)(void *), - void *arg) -{ - struct coroutine *co = coself(); - handler->routine = routine; - handler->arg = arg; - handler->next = co->cleanup; - co->cleanup = handler; -} - -static void cleanup_pop(int execute) { - struct coroutine *co = coself(); - struct cleanup *handler = co->cleanup; - co->cleanup = handler->next; - if (execute && handler->routine) { - handler->routine(handler->arg); - } -} - -static_assert(sizeof(struct cleanup) <= 32, ""); - -void __neco_c0(void *cl, void (*routine)(void *), void *arg) { - cleanup_push(cl, routine, arg); -} - -void __neco_c1(int execute) { - cleanup_pop(execute); -} - -// coexit is performed at the exit of every coroutine. -// Most general coroutine cleanup is performed here because this operation -// always runs from inside of the coroutine context/stack and during a standard -// runtime scheduler step. -// The async flag indicates that the coroutine is being exited before the entry -// function has been completed. In this case the cleanup push/pop stack stack -// will immediately be unrolled and the coroutine will cease execution. -noinline -static void coexit(bool async) { - // The current coroutine _must_ exit. - struct coroutine *co = coself(); - - if (async) { - // Run the cleanup stack - while (co->cleanup) { - cleanup_pop(1); - } - } - - // Delete from map - comap_delete(&rt->all, co); - - // Notify all cancel waiters (if any) - bool sched = false; - struct coroutine *cowaiter = colist_pop_front(&co->cancellist); - while (cowaiter) { - sched_resume(cowaiter); - sched = true; - cowaiter = colist_pop_front(&co->cancellist); - } - - // Notify all join waiters (if any) - cowaiter = colist_pop_front(&co->joinlist); - while (cowaiter) { - sched_resume(cowaiter); - sched = true; - cowaiter = colist_pop_front(&co->joinlist); - } - - // Close the generator - if (co->gen) { - chan_close((void*)co->gen); - chan_fastrelease((void*)co->gen); - co->gen = 0; - } - - // Free the call arguments - cofreeargs(co); - - if (sched) { - yield_for_sched_resume(); - } - - if (async) { - sco_exit(); - } -} - -static void co_pipe(int argc, void *argv[]) { - must(argc == 3); - char *path = argv[0]; - int64_t secret = *(int64_t*)argv[1]; - int *fd_out = argv[2]; - int fd = neco_dial("unix", path); - neco_write(fd, &secret, 8); - *fd_out = fd; -} - -static int _pipe_(int pipefd[2]) { - if (!pipefd) { - errno = EINVAL; - return -1; - } - if (!rt) { - errno = EPERM; - return -1; - } - int oldstate = 0; - neco_setcancelstate(NECO_CANCEL_DISABLE, &oldstate); - int fd0 = -2; - int fd1 = -2; - int ret = -1; - int64_t secret; - uint64_t tmpkey; - neco_rand(&secret, 8, NECO_PRNG); - neco_rand(&tmpkey, 8, NECO_PRNG); - char path[PATH_MAX]; - snprintf(path, sizeof(path), "/tmp/neco.%" PRIu64 ".sock", tmpkey); - int ln = neco_serve("unix", path); - int64_t childid = 0; - if (ln > 0) { - // State a coroutine to connect to the listener. - int nret = neco_start(co_pipe, 3, path, &secret, &fd0); - neco_errconv_to_sys(nret); - if (nret == NECO_OK) { - childid = neco_lastid(); - int64_t dl = neco_now() + NECO_SECOND * 5; - fd1 = neco_accept_dl(ln, 0, 0, dl); - neco_errconv_to_sys(fd1); - if (fd1 > 0) { - // Other side of pipe is connected. - // Waiting for the handshake. - int64_t data; - ssize_t n = neco_read_dl(fd1, &data, 8, dl); - neco_errconv_to_sys(n); - if (n == 8 && data == secret) { - // Handshake good. - ret = 0; - } - } - } - close(ln); - unlink(path); - } - int perrno = errno; - if (ret == 0) { - neco_join(childid); - pipefd[0] = fd0; - pipefd[1] = fd1; - fd0 = -1; - fd1 = -1; - } - close(fd0); - close(fd1); - neco_setcancelstate(oldstate, 0); - errno = perrno; - return ret; -} - -/// Create a bidirection data channel for communicating between threads. -/// @param pipefd The array pipefd is used to return two file descriptors -// referring to the ends of the pipe. -/// @return On success, zero is returned. On error, -1 is returned, errno is -/// set to indicate the error, and pipefd is left unchanged. -/// @note This is the POSIX equivalent of `pipe()` with the following changes: -/// The original `pipe()` function only creates a unidirectional data channel -/// while this one is bidirectional, meaning that both file descriptors can -/// be used by different threads for both reading and writing, similar to a -/// socket. Also, the file descriptors are returned in non-blocking state. -int neco_pipe(int pipefd[2]) { - int ret = _pipe_(pipefd); - error_guard(ret); - return ret; -} - -static int join_dl(int64_t id, int64_t deadline) { - struct coroutine *co = coself(); - if (!co) { - return NECO_PERM; - } - struct coroutine *cotarg = cofind(id); - if (!cotarg) { - return NECO_OK; - } - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - return ret; - } - if (cotarg == co) { - return NECO_PERM; - } - colist_push_back(&cotarg->joinlist, co); - cotarg->njoinlist++; - copause(deadline); - remove_from_list(co); - cotarg->njoinlist--; - return checkdl(co, INT64_MAX); -} - -/// Same as neco_join() but with a deadline parameter. -int neco_join_dl(int64_t id, int64_t deadline) { - int ret = join_dl(id, deadline); - async_error_guard(ret); - return ret; -} - -/// Wait for a coroutine to terminate. -/// If that coroutine has already terminated or is not found, then this -/// operation returns immediately. -/// -/// **Example** -/// -/// ``` -/// // Start a new coroutine -/// neco_start(coroutine, 0); -/// -/// // Get the identifier of the new coroutine. -/// int64_t id = neco_lastid(); -/// -/// // Wait until the coroutine has terminated. -/// neco_join(id); -/// ``` -/// -/// @param id Coroutine identifier -/// @return NECO_OK Success -/// @return NECO_CANCELED Operation canceled -/// @return NECO_PERM Operation called outside of a coroutine -/// @see neco_join_dl() -int neco_join(int64_t id) { - return neco_join_dl(id, INT64_MAX); -} - -#define DEFAULT_BUFFER_SIZE 4096 - -struct bufrd { - size_t len; - size_t pos; - char *data; -}; - -struct bufwr { - size_t len; - char *data; -}; - -struct neco_stream { - int fd; - int64_t rtid; - bool buffered; - - struct bufrd rd; - struct bufwr wr; - size_t cap; - char data[]; -}; - -typedef struct neco_stream neco_stream; - -static int stream_make_buffered_size(neco_stream **stream, int fd, bool buffered, - size_t buffer_size) -{ - if (!stream || fd < 0) { - return NECO_INVAL; - } else if (!rt) { - return NECO_PERM; - } - size_t memsize; - if (buffered) { - buffer_size = buffer_size == 0 ? DEFAULT_BUFFER_SIZE : buffer_size; - memsize = sizeof(neco_stream) + buffer_size; - } else { - memsize = offsetof(neco_stream, rd); - } - *stream = malloc0(memsize); - if (!*stream) { - return NECO_NOMEM; - } - memset(*stream, 0, memsize); - (*stream)->rtid = rt->id; - (*stream)->fd = fd; - (*stream)->buffered = buffered; - if (buffered) { - (*stream)->cap = buffer_size; - } - return NECO_OK; -} - -int neco_stream_make_buffered_size(neco_stream **stream, int fd, - size_t buffer_size) -{ - int ret = stream_make_buffered_size(stream, fd, true, buffer_size); - error_guard(ret); - return ret; -} - -int neco_stream_make_buffered(neco_stream **stream, int fd) { - int ret = stream_make_buffered_size(stream, fd, true, 0); - error_guard(ret); - return ret; -} - -int neco_stream_make(neco_stream **stream, int fd) { - int ret = stream_make_buffered_size(stream, fd, false, 0); - error_guard(ret); - return ret; -} - -static int stream_release(neco_stream *stream) { - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } - if (stream->buffered) { - if (stream->rd.data && stream->rd.data != stream->data) { - free0(stream->rd.data); - } - if (stream->wr.data && stream->wr.data != stream->data) { - free0(stream->wr.data); - } - } - free0(stream); - return NECO_OK; -} - -int neco_stream_release(neco_stream *stream) { - int ret = stream_release(stream); - error_guard(ret); - return ret; -} - -static bool ensure_rd_data(neco_stream *stream) { - if (!stream->rd.data) { - if (!stream->wr.data) { - stream->rd.data = stream->data; - } else { - stream->rd.data = malloc0(stream->cap); - if (!stream->rd.data) { - return false; - } - } - } - return true; -} - -static bool ensure_wr_data(neco_stream *stream) { - if (!stream->wr.data) { - if (!stream->rd.data) { - stream->wr.data = stream->data; - } else { - stream->wr.data = malloc0(stream->cap); - if (!stream->wr.data) { - return false; - } - } - } - return true; -} - -static ssize_t stream_read_dl(neco_stream *stream, void *data, size_t nbytes, - int64_t deadline) -{ - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } - if (!stream->buffered) { - return neco_read_dl(stream->fd, data, nbytes, deadline); - } - if (!ensure_rd_data(stream)) { - return NECO_NOMEM; - } - if (stream->rd.len == 0) { - ssize_t n = neco_read_dl(stream->fd, stream->rd.data, stream->cap, - deadline); - if (n == -1) { - return neco_errconv_from_sys(); - } - stream->rd.len = (size_t)n; - stream->rd.pos = 0; - } - nbytes = stream->rd.len < nbytes ? stream->rd.len : nbytes; - memcpy(data, stream->rd.data + stream->rd.pos, nbytes); - stream->rd.pos += nbytes; - stream->rd.len -= nbytes; - return (ssize_t)nbytes; -} - -ssize_t neco_stream_read_dl(neco_stream *stream, void *data, size_t nbytes, - int64_t deadline) -{ - ssize_t ret = stream_read_dl(stream, data, nbytes, deadline); - if (ret == 0 && nbytes > 0 && neco_lasterr() == NECO_OK) { - ret = NECO_EOF; - } - error_guard(ret); - return ret; -} - -ssize_t neco_stream_read(neco_stream *stream, void *data, size_t nbytes) { - return neco_stream_read_dl(stream, data, nbytes, INT64_MAX); -} - -static ssize_t stream_readfull_dl(neco_stream *stream, void *data, - size_t nbytes, int64_t deadline) -{ - ssize_t nread = 0; - do { - ssize_t n = neco_stream_read_dl(stream, data, nbytes, deadline); - if (n <= 0) { - if (nread == 0) { - nread = n; - } - return nread; - } else { - data = (char*)data + n; - nbytes -= (size_t)n; - nread += n; - } - } while (nbytes > 0); - return nread; -} - -ssize_t neco_stream_readfull_dl(neco_stream *stream, void *data, size_t nbytes, - int64_t deadline) -{ - ssize_t ret = stream_readfull_dl(stream, data, nbytes, deadline); - error_guard(ret); - return ret; -} - -ssize_t neco_stream_readfull(neco_stream *stream, void *data, size_t nbytes) { - return neco_stream_readfull_dl(stream, data, nbytes, INT64_MAX); -} - -static ssize_t stream_buffered_read_size(neco_stream *stream) { - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } else if (!stream->buffered) { - return 0; - } - return (ssize_t)stream->rd.len; -} - -ssize_t neco_stream_buffered_read_size(neco_stream *stream) { - ssize_t ret = stream_buffered_read_size(stream); - error_guard(ret); - return ret; -} - -/// Same as neco_stream_read_byte() but with a deadline parameter. -int neco_stream_read_byte_dl(neco_stream *stream, int64_t deadline) { - unsigned char byte; - if (rt && stream && stream->rtid == rt->id && stream->buffered && - stream->rd.len > 0 && checkdl(coself(), deadline) == NECO_OK) - { - // fast-track read byte - byte = (unsigned char)stream->rd.data[stream->rd.pos]; - stream->rd.pos++; - stream->rd.len--; - } else { - ssize_t ret = neco_stream_read_dl(stream, &byte, 1, deadline); - if (ret != 1) { - return ret; - } - } - return byte; -} - -/// Read and returns a single byte. If no byte is available, returns an error. -int neco_stream_read_byte(neco_stream *stream) { - return neco_stream_read_byte_dl(stream, INT64_MAX); -} - -static int stream_unread_byte(neco_stream *stream) { - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } else if (!stream->buffered || stream->rd.pos == 0) { - return NECO_UNREADFAIL; - } - stream->rd.pos--; - stream->rd.len++; - return NECO_OK; -} - -/// Unread the last byte. Only the most recently read byte can be unread. -int neco_stream_unread_byte(neco_stream *stream) { - int ret = stream_unread_byte(stream); - error_guard(ret); - return ret; -} - -static int stream_flush_dl(neco_stream *stream, int64_t deadline) { - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } else if (!stream->buffered) { - // Not buffered. Only need to check the deadline. - return checkdl(coself(), deadline); - } - ssize_t n = neco_write_dl(stream->fd, stream->wr.data, stream->wr.len, - deadline); - if (n <= 0) { - if (n == 0 && stream->wr.len == 0) { - return NECO_OK; - } else { - return neco_errconv_from_sys(); - } - } - if ((size_t)n < stream->wr.len) { - // parital write. - memmove(stream->wr.data, stream->wr.data+n, stream->wr.len-(size_t)n); - stream->wr.len -= (size_t)n; - return NECO_PARTIALWRITE; - } else { - stream->wr.len = 0; - return NECO_OK; - } -} - -/// Same as neco_stream_flush() but with a deadline parameter. -int neco_stream_flush_dl(neco_stream *stream, int64_t deadline) { - int ret = stream_flush_dl(stream, deadline); - async_error_guard(ret); - return ret; -} - -/// Flush writes any buffered data to the underlying file descriptor. -int neco_stream_flush(neco_stream *stream) { - return neco_stream_flush_dl(stream, INT64_MAX); -} - -static ssize_t stream_write_dl(neco_stream *stream, const void *data, - size_t nbytes, int64_t deadline) -{ - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } - if (!stream->buffered) { - return neco_write_dl(stream->fd, data, nbytes, deadline); - } - if (!ensure_wr_data(stream)) { - return NECO_NOMEM; - } - ssize_t nwritten = 0; - while (nbytes > 0) { - if (stream->wr.len == stream->cap) { - // Buffer is full. - int ret = neco_stream_flush_dl(stream, deadline); - if (ret != NECO_OK) { - if (nwritten == 0) { - nwritten = ret; - } - break; - } - } - // Copy data into the buffer - size_t n = stream->cap - stream->wr.len; - n = n < nbytes ? n : nbytes; - memcpy(stream->wr.data+stream->wr.len, data, n); - stream->wr.len += n; - data = (char*)data + n; - nbytes -= n; - nwritten += n; - } - return nwritten; -} - -ssize_t neco_stream_write_dl(neco_stream *stream, const void *data, - size_t nbytes, int64_t deadline) -{ - ssize_t ret = stream_write_dl(stream, data, nbytes, deadline); - async_error_guard(ret); - return ret; -} - -ssize_t neco_stream_write(neco_stream *stream, const void *data, size_t nbytes){ - return neco_stream_write_dl(stream, data, nbytes, INT64_MAX); -} - -static ssize_t stream_buffered_write_size(neco_stream *stream) { - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } else if (!stream->buffered) { - return 0; - } - return (ssize_t)stream->wr.len; -} - -ssize_t neco_stream_buffered_write_size(neco_stream *stream) { - ssize_t ret = stream_buffered_write_size(stream); - error_guard(ret); - return ret; -} - -static int stream_close_dl(neco_stream *stream, int64_t deadline) { - if (!stream) { - return NECO_INVAL; - } else if (!rt || stream->rtid != rt->id) { - return NECO_PERM; - } - int ret = NECO_OK; - if (stream->buffered && (deadline < INT64_MAX || stream->wr.len > 0)) { - ret = stream_flush_dl(stream, deadline); - } - close(stream->fd); - stream_release(stream); - return ret; -} - -/// Close a stream with a deadline. -/// A deadline is provided to accomodate for buffered streams that may need to -/// flush bytes on close -int neco_stream_close_dl(neco_stream *stream, int64_t deadline) { - int ret = stream_close_dl(stream, deadline); - error_guard(ret); - return ret; -} - -/// Close a stream -int neco_stream_close(neco_stream *stream) { - return neco_stream_close_dl(stream, INT64_MAX); -} - -// pcg-family random number generator - -static int64_t rincr(int64_t seed) { - return (int64_t)((uint64_t)(seed)*6364136223846793005 + 1); -} - -static uint32_t rgen(int64_t seed) { - uint64_t state = (uint64_t)seed; - uint32_t xorshifted = (uint32_t)(((state >> 18) ^ state) >> 27); - uint32_t rot = (uint32_t)(state >> 59); - return (xorshifted >> rot) | (xorshifted << ((-rot) & 31)); -} - -static uint32_t rnext(int64_t *seed) { - *seed = rincr(rincr(*seed)); // twice called intentionally - uint32_t value = rgen(*seed); - return value; -} - -static void pcgrandom_buf(void *data, size_t nbytes, int64_t *seed) { - while (nbytes >= 4) { - uint32_t value = rnext(seed); - ((char*)data)[0] = ((char*)&value)[0]; - ((char*)data)[1] = ((char*)&value)[1]; - ((char*)data)[2] = ((char*)&value)[2]; - ((char*)data)[3] = ((char*)&value)[3]; - data = (char*)data + 4; - nbytes -= 4; - } - if (nbytes > 0) { - uint32_t value = rnext(seed); - for (size_t i = 0; i < nbytes; i++) { - ((char*)data)[i] = ((char*)&value)[i]; - } - } -} - -static int rand_setseed(int64_t seed, int64_t *oldseed) { - if (!rt) { - return NECO_PERM; - } - if (oldseed) { - *oldseed = rt->rand_seed; - } - rt->rand_seed = seed; - return NECO_OK; -} - -/// Set the random seed for the Neco pseudorandom number generator. -/// -/// The provided seed is only used for the (non-crypto) NECO_PRNG and is -/// ignored for NECO_CPRNG. -/// -/// @param seed -/// @param oldseed[out] The previous seed -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @see Random -int neco_rand_setseed(int64_t seed, int64_t *oldseed) { - int ret = rand_setseed(seed, oldseed); - error_guard(ret); - return ret; -} - -static int rand_dl(void *data, size_t nbytes, int attr, int64_t deadline) { - if (attr != NECO_CSPRNG && attr != NECO_PRNG) { - return NECO_INVAL; - } - if (!rt) { - return NECO_PERM; - } - void (*arc4random_buf_l)(void *, size_t) = 0; - if (attr == NECO_CSPRNG) { -#ifdef __linux__ - // arc4random_buf should be available in libbsd for Linux. - if (!rt->arc4random_buf) { - if (!rt->libbsd_handle) { - rt->libbsd_handle = dlopen("libbsd.so.0", RTLD_LAZY); - must(rt->libbsd_handle); - } - rt->arc4random_buf = (void(*)(void*,size_t)) - dlsym(rt->libbsd_handle, "arc4random_buf"); - must(rt->arc4random_buf); - } - arc4random_buf_l = rt->arc4random_buf; -#elif defined(__APPLE__) || defined(__FreeBSD__) - arc4random_buf_l = arc4random_buf; -#endif - } - struct coroutine *co = coself(); - while (1) { - int ret = checkdl(co, deadline); - if (ret != NECO_OK) { - return ret; - } - if (nbytes == 0) { - break; - } - size_t partsz = nbytes < 256 ? nbytes : 256; - if (arc4random_buf_l) { - arc4random_buf_l(data, partsz); - } else { - pcgrandom_buf(data, partsz, &rt->rand_seed); - } - nbytes -= partsz; - data = (char*)data + partsz; - if (nbytes == 0) { - break; - } - coyield(); - } - return NECO_OK; -} - -/// Same as neco_rand() but with a deadline parameter. -int neco_rand_dl(void *data, size_t nbytes, int attr, int64_t deadline) { - int ret = rand_dl(data, nbytes, attr, deadline); - async_error_guard(ret); - return ret; -} - -/// Generator random bytes -/// -/// This operation can generate cryptographically secure data by -/// providing the NECO_CSPRNG option or non-crypto secure data with -/// NECO_PRNG. -/// -/// Non-crypto secure data use the [pcg-family](https://www.pcg-random.org) -/// random number generator. -/// -/// @param data buffer for storing random bytes -/// @param nbytes number of bytes to generate -/// @param attr NECO_PRNG or NECO_CSPRNG -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_CANCELED Operation canceled -int neco_rand(void *data, size_t nbytes, int attr) { - return neco_rand_dl(data, nbytes, attr, INT64_MAX); -} - -/// Terminate the current coroutine. -/// -/// Any clean-up handlers established by neco_cleanup_push() that -/// have not yet been popped, are popped (in the reverse of the order -/// in which they were pushed) and executed. -/// -/// Calling this from outside of a coroutine context does nothing and will be -/// treated effectivley as a no-op. -void neco_exit(void) { - if (rt) { - coexit(true); - } -} - -struct neco_gen { - // A generator is actually a channel in disguise. - int _; -}; - -static int gen_start_chk(neco_gen **gen, size_t data_size) { - if (!gen || data_size > INT_MAX) { - return NECO_INVAL; - } - if (!rt) { - return NECO_PERM; - } - return NECO_OK; -} - -/// Start a generator coroutine -/// -/// **Example** -/// -/// ``` -/// void coroutine(int argc, void *argv[]) { -/// // Yield each int to the caller, one at a time. -/// for (int i = 0; i < 10; i++) { -/// neco_gen_yield(&i); -/// } -/// } -/// -/// int neco_main(int argc, char *argv[]) { -/// -/// // Create a new generator coroutine that is used to send ints. -/// neco_gen *gen; -/// neco_gen_start(&gen, sizeof(int), coroutine, 0); -/// -/// // Iterate over each int until the generator is closed. -/// int i; -/// while (neco_gen_next(gen, &i) != NECO_CLOSED) { -/// printf("%d\n", i); -/// } -/// -/// // This coroutine no longer needs the generator. -/// neco_gen_release(gen); -/// return 0; -/// } -/// ``` -/// -/// @param[out] gen Generator object -/// @param data_size Data size of messages -/// @param coroutine Generator coroutine -/// @param argc Number of arguments -/// @return NECO_OK Success -/// @return NECO_NOMEM The system lacked the necessary resources -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @note The caller is responsible for freeing the generator object with -/// with neco_gen_release(). -int neco_gen_start(neco_gen **gen, size_t data_size, - void(*coroutine)(int argc, void *argv[]), int argc, ...) -{ - int ret = gen_start_chk(gen, data_size); - if (ret == NECO_OK) { - va_list args; - va_start(args, argc); - ret = startv(coroutine, argc, &args, 0, (void*)gen, data_size); - va_end(args); - } - error_guard(ret); - return ret; -} - -/// Same as neco_gen_start() but using an array for arguments. -int neco_gen_startv(neco_gen **gen, size_t data_size, - void(*coroutine)(int argc, void *argv[]), int argc, void *argv[]) -{ - int ret = gen_start_chk(gen, data_size); - if (ret == NECO_OK) { - ret = startv(coroutine, argc, 0, argv, (void*)gen, data_size); - } - error_guard(ret); - return ret; -} - -/// Retain a reference of the generator so it can be shared with other -/// coroutines. -/// -/// This is needed for avoiding use-after-free bugs. -/// -/// See neco_gen_start() for an example. -/// -/// @param gen The generator -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @note The caller is responsible for releasing the reference with -/// neco_gen_release() -/// @see Generators -/// @see neco_gen_release() -int neco_gen_retain(neco_gen *gen) { - return neco_chan_retain((void*)gen); -} - -/// Release a reference to a generator -/// -/// See neco_gen_start() for an example. -/// -/// @param gen The generator -/// @return NECO_OK Success -/// @return NECO_INVAL An invalid parameter was provided -/// @return NECO_PERM Operation called outside of a coroutine -/// @see Generators -/// @see neco_gen_retain() -int neco_gen_release(neco_gen *gen) { - return neco_chan_release((void*)gen); -} - -/// Same as neco_gen_yield() but with a deadline parameter. -int neco_gen_yield_dl(void *data, int64_t deadline) { - struct coroutine *co = coself(); - if (!co) { - return NECO_PERM; - } - if (!co->gen) { - return NECO_NOTGENERATOR; - } - return neco_chan_send_dl((void*)co->gen, data, deadline); -} - -/// Send a value to the generator for the next iteration. -/// -/// See neco_gen_start() for an example. -int neco_gen_yield(void *data) { - return neco_gen_yield_dl(data, INT64_MAX); -} - -/// Same as neco_gen_next() but with a deadline parameter. -int neco_gen_next_dl(neco_gen *gen, void *data, int64_t deadline) { - return neco_chan_recv_dl((void*)gen, data, deadline); -} - -/// Receive the next value from a generator. -/// -/// See neco_gen_start() for an example. -int neco_gen_next(neco_gen *gen, void *data) { - return neco_gen_next_dl(gen, data, INT64_MAX); -} - -/// Close the generator. -/// @param gen Generator -/// @return NECO_OK Success -int neco_gen_close(neco_gen *gen) { - return neco_chan_close((void*)gen); -} - -/// Test a neco error code. -/// @return the provided value, unchanged. -int neco_testcode(int errcode) { - int ret = errcode; - error_guard(ret); - return ret; -} - -/// Stop normal execution of the current coroutine, print stack trace, and exit -/// the program immediately. -int neco_panic(const char *fmt, ...) { - char buf[256]; - va_list args; - va_start(args, fmt); - vsnprintf(buf, sizeof(buf), fmt, args); - va_end(args); - panic("%s", buf); - return NECO_OK; -} - -static int suspend_dl(int64_t deadline) { - struct coroutine *co = coself(); - if (!co) { - return NECO_PERM; - } - - co->suspended = true; - rt->nsuspended++; - copause(deadline); - rt->nsuspended--; - co->suspended = false; - - return checkdl(co, INT64_MAX); -} - -/// Same as neco_suspend() but with a deadline parameter. -int neco_suspend_dl(int64_t deadline) { - int ret = suspend_dl(deadline); - async_error_guard(ret); - return ret; -} - -/// Suspend the current coroutine. -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_CANCELED Operation canceled -/// @see neco_resume -/// @see neco_suspend_dl -int neco_suspend(void) { - return neco_suspend_dl(INT64_MAX); -} - -static int resume(int64_t id) { - if (!rt) { - return NECO_PERM; - } - struct coroutine *co = cofind(id); - if (!co) { - return NECO_NOTFOUND; - } - if (!co->suspended) { - return NECO_NOTSUSPENDED; - } - sco_resume(co->id); - return NECO_OK; -} - -/// Resume a suspended roroutine -/// @return NECO_OK Success -/// @return NECO_PERM Operation called outside of a coroutine -/// @return NECO_NOTFOUND Coroutine not found -/// @return NECO_NOTSUSPENDED Coroutine not suspended -/// @see neco_suspend -int neco_resume(int64_t id) { - int ret = resume(id); - error_guard(ret); - return ret; -} - -#ifndef NECO_NOWORKERS -struct iowork { - void(*work)(void *udata); - void *udata; - struct coroutine *co; - struct runtime *rt; -}; - -static void iowork(void *udata) { - struct iowork *info = udata; - info->work(info->udata); - pthread_mutex_lock(&info->rt->iomu); - colist_push_back(&info->rt->iolist, info->co); - pthread_mutex_unlock(&info->rt->iomu); -} -#endif - -static int workfn(int64_t pin, void(*work)(void *udata), void *udata) { - (void)pin; - struct coroutine *co = coself(); - if (!work) { - return NECO_INVAL; - } - if (!co) { - return NECO_PERM; - } -#ifdef NECO_NOWORKERS - // Run in foreground - work(udata); -#else - // Run in background - struct iowork info = { .work = work, .udata = udata, .co = co, .rt = rt }; - rt->niowaiters++; - while (!worker_submit(rt->worker, pin, iowork, &info)) { - sco_yield(); - } - sco_pause(); - rt->niowaiters--; -#endif - return NECO_OK; -} - -/// Perform work in a background thread and wait until the work is done. -/// -/// This operation cannot be canceled and cannot timeout. It's the responibilty -/// of the caller to figure out a mechanism for doing those things from inside -/// of the work function. -/// -/// The work function will not be inside of a Neco context, thus all `neco_*` -/// functions will fail if called from inside of the work function. -/// -/// @param pin pin to a thread, or use -1 for round robin selection. -/// @param work the work, must not be null -/// @param udata any user data -/// @return NECO_OK Success -/// @return NECO_NOMEM The system lacked the necessary resources -/// @return NECO_INVAL An invalid parameter was provided -/// @note There is no way to cancel or timeout this operation -/// @note There is no way to cancel or timeout this operation -int neco_work(int64_t pin, void(*work)(void *udata), void *udata) { - int ret = workfn(pin, work, udata); - error_guard(ret); - return ret; -} diff --git a/c/neco/_wrap/neco.h b/c/neco/_wrap/neco.h deleted file mode 100644 index 6b905c53..00000000 --- a/c/neco/_wrap/neco.h +++ /dev/null @@ -1,453 +0,0 @@ -// https://github.com/tidwall/neco -// -// Copyright 2024 Joshua J Baker. All rights reserved. -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. -// -// Neco -- Coroutine library for C - -#ifndef NECO_H -#define NECO_H - -#include -#include -#include -#ifdef _WIN32 -#include -#else -#include -#include -#endif - -//////////////////////////////////////////////////////////////////////////////// -// basic operations -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup BasicOperations Basic operations -/// Neco provides standard operations for starting a coroutine, sleeping, -/// suspending, resuming, yielding to another coroutine, joining/waiting for -/// child coroutines, and exiting a running coroutine. -/// @{ -int neco_start(void(*coroutine)(int argc, void *argv[]), int argc, ...); -int neco_startv(void(*coroutine)(int argc, void *argv[]), int argc, void *argv[]); -int neco_yield(void); -int neco_sleep(int64_t nanosecs); -int neco_sleep_dl(int64_t deadline); -int neco_join(int64_t id); -int neco_join_dl(int64_t id, int64_t deadline); -int neco_suspend(void); -int neco_suspend_dl(int64_t deadline); -int neco_resume(int64_t id); -void neco_exit(void); -int64_t neco_getid(void); -int64_t neco_lastid(void); -int64_t neco_starterid(void); -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// channels -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Channels Channels -/// Channels allow for sending and receiving values between coroutines. -/// By default, sends and receives will block until the other side is ready. -/// This allows the coroutines to synchronize without using locks or condition -/// variables. -/// @{ -typedef struct neco_chan neco_chan; - -int neco_chan_make(neco_chan **chan, size_t data_size, size_t capacity); -int neco_chan_retain(neco_chan *chan); -int neco_chan_release(neco_chan *chan); -int neco_chan_send(neco_chan *chan, void *data); -int neco_chan_send_dl(neco_chan *chan, void *data, int64_t deadline); -int neco_chan_broadcast(neco_chan *chan, void *data); -int neco_chan_recv(neco_chan *chan, void *data); -int neco_chan_recv_dl(neco_chan *chan, void *data, int64_t deadline); -int neco_chan_tryrecv(neco_chan *chan, void *data); -int neco_chan_close(neco_chan *chan); -int neco_chan_select(int nchans, ...); -int neco_chan_select_dl(int64_t deadline, int nchans, ...); -int neco_chan_selectv(int nchans, neco_chan *chans[]); -int neco_chan_selectv_dl(int nchans, neco_chan *chans[], int64_t deadline); -int neco_chan_tryselect(int nchans, ...); -int neco_chan_tryselectv(int nchans, neco_chan *chans[]); -int neco_chan_case(neco_chan *chan, void *data); -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// generators -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Generators Generators -/// A generator is a specialized iterator-bound coroutine that can produce a -/// sequence of values to be iterated over. -/// @{ -typedef struct neco_gen neco_gen; - -int neco_gen_start(neco_gen **gen, size_t data_size, void(*coroutine)(int argc, void *argv[]), int argc, ...); -int neco_gen_startv(neco_gen **gen, size_t data_size, void(*coroutine)(int argc, void *argv[]), int argc, void *argv[]); -int neco_gen_retain(neco_gen *gen); -int neco_gen_release(neco_gen *gen); -int neco_gen_yield(void *data); -int neco_gen_yield_dl(void *data, int64_t deadline); -int neco_gen_next(neco_gen *gen, void *data); -int neco_gen_next_dl(neco_gen *gen, void *data, int64_t deadline); -int neco_gen_close(neco_gen *gen); -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// synchronization mechanisms -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Mutexes Mutexes -/// A mutex is synchronization mechanism that blocks access to variables by -/// multiple coroutines at once. This enforces exclusive access by a coroutine -/// to a variable or set of variables and helps to avoid data inconsistencies -/// due to race conditions. -/// @{ -typedef struct { _Alignas(16) char _[48]; } neco_mutex; - -#define NECO_MUTEX_INITIALIZER { 0 } - -int neco_mutex_init(neco_mutex *mutex); -int neco_mutex_lock(neco_mutex *mutex); -int neco_mutex_lock_dl(neco_mutex *mutex, int64_t deadline); -int neco_mutex_trylock(neco_mutex *mutex); -int neco_mutex_unlock(neco_mutex *mutex); -int neco_mutex_rdlock(neco_mutex *mutex); -int neco_mutex_rdlock_dl(neco_mutex *mutex, int64_t deadline); -int neco_mutex_tryrdlock(neco_mutex *mutex); -/// @} - -/// @defgroup WaitGroups WaitGroups -/// A WaitGroup waits for a multiple coroutines to finish. -/// The main coroutine calls neco_waitgroup_add() to set the number of -/// coroutines to wait for. Then each of the coroutines runs and calls -/// neco_waitgroup_done() when complete. -/// At the same time, neco_waitgroup_wait() can be used to block until all -/// coroutines are completed. -/// @{ -typedef struct { _Alignas(16) char _[48]; } neco_waitgroup; - -#define NECO_WAITGROUP_INITIALIZER { 0 } - -int neco_waitgroup_init(neco_waitgroup *waitgroup); -int neco_waitgroup_add(neco_waitgroup *waitgroup, int delta); -int neco_waitgroup_done(neco_waitgroup *waitgroup); -int neco_waitgroup_wait(neco_waitgroup *waitgroup); -int neco_waitgroup_wait_dl(neco_waitgroup *waitgroup, int64_t deadline); -/// @} - -/// @defgroup CondVar Condition variables -/// A condition variable is a synchronization mechanism that allows coroutines -/// to suspend execution until some condition is true. -/// @{ -typedef struct { _Alignas(16) char _[48]; } neco_cond; -#define NECO_COND_INITIALIZER { 0 } - -int neco_cond_init(neco_cond *cond); -int neco_cond_signal(neco_cond *cond); -int neco_cond_broadcast(neco_cond *cond); -int neco_cond_wait(neco_cond *cond, neco_mutex *mutex); -int neco_cond_wait_dl(neco_cond *cond, neco_mutex *mutex, int64_t deadline); -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// file descriptors -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Posix Posix wrappers -/// Functions that work like their Posix counterpart but do not block, allowing -/// for usage in a Neco coroutine. -/// @{ - -// wrappers for various posix operations. -ssize_t neco_read(int fd, void *data, size_t nbytes); -ssize_t neco_read_dl(int fd, void *data, size_t nbytes, int64_t deadline); -ssize_t neco_write(int fd, const void *data, size_t nbytes); -ssize_t neco_write_dl(int fd, const void *data, size_t nbytes, int64_t deadline); -int neco_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); -int neco_accept_dl(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int64_t deadline); -int neco_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); -int neco_connect_dl(int sockfd, const struct sockaddr *addr, socklen_t addrlen, int64_t deadline); -int neco_getaddrinfo(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res); -int neco_getaddrinfo_dl(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res, int64_t deadline); -/// @} - -/// @defgroup Posix2 File descriptor helpers -/// Functions for working with file descriptors. -/// @{ - -// utility for enabling non-blocking on existing file descriptors -int neco_setnonblock(int fd, bool nonblock, bool *oldnonblock); - -// wait for a file descriptor to be readable or writeable. -#define NECO_WAIT_READ 1 -#define NECO_WAIT_WRITE 2 - -int neco_wait(int fd, int mode); -int neco_wait_dl(int fd, int mode, int64_t deadline); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// networking -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Networking Networking utilities -/// @{ - -int neco_serve(const char *network, const char *address); -int neco_serve_dl(const char *network, const char *address, int64_t deadline); -int neco_dial(const char *network, const char *address); -int neco_dial_dl(const char *network, const char *address, int64_t deadline); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// cancelation -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Cancelation Cancelation -/// @{ - -int neco_cancel(int64_t id); -int neco_cancel_dl(int64_t id, int64_t deadline); - -#define NECO_CANCEL_ASYNC 1 -#define NECO_CANCEL_INLINE 2 -#define NECO_CANCEL_ENABLE 3 -#define NECO_CANCEL_DISABLE 4 - -int neco_setcanceltype(int type, int *oldtype); -int neco_setcancelstate(int state, int *oldstate); - -#define neco_cleanup_push(routine, arg) {__neco_c0(&(char[32]){0},routine,arg); -#define neco_cleanup_pop(execute) __neco_c1(execute);} - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// random number generator -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Random Random number generator -/// @{ - -#define NECO_CSPRNG 0 // Cryptographically secure pseudorandom number generator -#define NECO_PRNG 1 // Pseudorandom number generator (non-crypto, faster) - -int neco_rand_setseed(int64_t seed, int64_t *oldseed); -int neco_rand(void *data, size_t nbytes, int attr); -int neco_rand_dl(void *data, size_t nbytes, int attr, int64_t deadline); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// signal handling -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Signals Signals -/// Allows for signals, such as SIGINT (Ctrl-C), to be intercepted or ignored. -/// @{ - -int neco_signal_watch(int signo); -int neco_signal_wait(void); -int neco_signal_wait_dl(int64_t deadline); -int neco_signal_unwatch(int signo); - -/// @} - - -//////////////////////////////////////////////////////////////////////////////// -// background worker -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Worker Background worker -/// Run arbitrary code in a background worker thread -/// @{ - -int neco_work(int64_t pin, void(*work)(void *udata), void *udata); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// Stats and information -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Stats Stats and information -/// @{ - -typedef struct neco_stats { - size_t coroutines; ///< Number of active coroutines - size_t sleepers; ///< Number of sleeping coroutines - size_t evwaiters; ///< Number of coroutines waiting on I/O events - size_t sigwaiters; ///< - size_t senders; ///< - size_t receivers; ///< - size_t locked; ///< - size_t waitgroupers; ///< - size_t condwaiters; ///< - size_t suspended; ///< - size_t workers; ///< Number of background worker threads -} neco_stats; - -int neco_getstats(neco_stats *stats); -int neco_is_main_thread(void); -const char *neco_switch_method(void); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// global behaviors -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup GlobalFuncs Global environment -/// @{ - -void neco_env_setallocator(void *(*malloc)(size_t), void *(*realloc)(void*, size_t), void (*free)(void*)); -void neco_env_setpaniconerror(bool paniconerror); -void neco_env_setcanceltype(int type); -void neco_env_setcancelstate(int state); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// time and duration -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Time Time -/// Functions for working with time. -/// -/// The following defines are available for convenience. -/// -/// ```c -/// #define NECO_NANOSECOND INT64_C(1) -/// #define NECO_MICROSECOND INT64_C(1000) -/// #define NECO_MILLISECOND INT64_C(1000000) -/// #define NECO_SECOND INT64_C(1000000000) -/// #define NECO_MINUTE INT64_C(60000000000) -/// #define NECO_HOUR INT64_C(3600000000000) -/// ``` -/// -/// @{ - -#define NECO_NANOSECOND INT64_C(1) -#define NECO_MICROSECOND INT64_C(1000) -#define NECO_MILLISECOND INT64_C(1000000) -#define NECO_SECOND INT64_C(1000000000) -#define NECO_MINUTE INT64_C(60000000000) -#define NECO_HOUR INT64_C(3600000000000) - -int64_t neco_now(void); - -///@} - -//////////////////////////////////////////////////////////////////////////////// -// errors -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup ErrorFuncs Error handling -/// Functions for working with [Neco errors](./API.md#neco-errors). -/// @{ - -#define NECO_OK 0 ///< Successful result (no error) -#define NECO_ERROR -1 ///< System error (check errno) -#define NECO_INVAL -2 ///< Invalid argument -#define NECO_PERM -3 ///< Operation not permitted -#define NECO_NOMEM -4 ///< Cannot allocate memory -#define NECO_EOF -5 ///< End of file or stream (neco_stream_*) -#define NECO_NOTFOUND -6 ///< No such coroutine (neco_cancel) -#define NECO_NOSIGWATCH -7 ///< Not watching on a signal -#define NECO_CLOSED -8 ///< Channel is closed -#define NECO_EMPTY -9 ///< Channel is empty (neco_chan_tryrecv) -#define NECO_TIMEDOUT -10 ///< Deadline has elapsed (neco_*_dl) -#define NECO_CANCELED -11 ///< Operation canceled (by neco_cancel) -#define NECO_BUSY -12 ///< Resource busy (mutex_trylock) -#define NECO_NEGWAITGRP -13 ///< Negative waitgroup counter -#define NECO_GAIERROR -14 ///< Error with getaddrinfo (check neco_gai_error) -#define NECO_UNREADFAIL -15 ///< Failed to unread byte (neco_stream_unread_byte) -#define NECO_PARTIALWRITE -16 ///< Failed to write all data (neco_stream_flush) -#define NECO_NOTGENERATOR -17 ///< Coroutine is not a generator (neco_gen_yield) -#define NECO_NOTSUSPENDED -18 ///< Coroutine is not suspended (neco_resume) - -const char *neco_strerror(ssize_t errcode); -int neco_lasterr(void); -int neco_gai_lasterr(void); -int neco_panic(const char *fmt, ...); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// streama -//////////////////////////////////////////////////////////////////////////////// - -/// @defgroup Streams Streams and Buffered I/O -/// Create a Neco stream from a file descriptor using neco_stream_make() or -/// a buffered stream using neco_stream_make_buffered(). -/// @{ - -typedef struct neco_stream neco_stream; - -int neco_stream_make(neco_stream **stream, int fd); -int neco_stream_make_buffered(neco_stream **stream, int fd); -int neco_stream_close(neco_stream *stream); -int neco_stream_close_dl(neco_stream *stream, int64_t deadline); -ssize_t neco_stream_read(neco_stream *stream, void *data, size_t nbytes); -ssize_t neco_stream_read_dl(neco_stream *stream, void *data, size_t nbytes, int64_t deadline); -ssize_t neco_stream_write(neco_stream *stream, const void *data, size_t nbytes); -ssize_t neco_stream_write_dl(neco_stream *stream, const void *data, size_t nbytes, int64_t deadline); -ssize_t neco_stream_readfull(neco_stream *stream, void *data, size_t nbytes); -ssize_t neco_stream_readfull_dl(neco_stream *stream, void *data, size_t nbytes, int64_t deadline); -int neco_stream_read_byte(neco_stream *stream); -int neco_stream_read_byte_dl(neco_stream *stream, int64_t deadline); -int neco_stream_unread_byte(neco_stream *stream); -int neco_stream_flush(neco_stream *stream); -int neco_stream_flush_dl(neco_stream *stream, int64_t deadline); -ssize_t neco_stream_buffered_read_size(neco_stream *stream); -ssize_t neco_stream_buffered_write_size(neco_stream *stream); - -/// @} - -//////////////////////////////////////////////////////////////////////////////// -// happy convenience macro -//////////////////////////////////////////////////////////////////////////////// - -// int neco_main(int argc, char *argv[]); - -#include -#include - -#define neco_main \ -__neco_main(int argc, char *argv[]); \ -static void _neco_main(int argc, void *argv[]) { \ - (void)argc; \ - __neco_exit_prog(__neco_main(*(int*)argv[0], *(char***)argv[1])); \ -} \ -int main(int argc, char *argv[]) { \ - neco_env_setpaniconerror(true); \ - neco_env_setcanceltype(NECO_CANCEL_ASYNC); \ - int ret = neco_start(_neco_main, 2, &argc, &argv); \ - fprintf(stderr, "neco_start: %s (code %d)\n", neco_strerror(ret), ret); \ - return -1; \ -}; \ -int __neco_main - -//////////////////////////////////////////////////////////////////////////////// -// private functions, not to be call directly -//////////////////////////////////////////////////////////////////////////////// - -void __neco_c0(void*,void(*)(void*),void*); -void __neco_c1(int); -void __neco_exit_prog(int); - -//////////////////////////////////////////////////////////////////////////////// - -#ifndef EAI_SYSTEM -#define EAI_SYSTEM 11 -#endif - -#endif // NECO_H diff --git a/c/neco/neco.go b/c/neco/neco.go deleted file mode 100644 index 1c4d8ccc..00000000 --- a/c/neco/neco.go +++ /dev/null @@ -1,81 +0,0 @@ -package neco - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoFiles = "_wrap/neco.c" - LLGoPackage = "link" -) - -const ( - OK = 0 ///< Successful result (no error) - ERROR = -1 ///< System error (check errno) - INVAL = -2 ///< Invalid argument - PERM = -3 ///< Operation not permitted - NOMEM = -4 ///< Cannot allocate memory - EOF = -5 ///< End of file or stream (neco_stream_*) - NOTFOUND = -6 ///< No such coroutine (neco_cancel) - NOSIGWATCH = -7 ///< Not watching on a signal - CLOSED = -8 ///< Channel is closed - EMPTY = -9 ///< Channel is empty (neco_chan_tryrecv) - TIMEDOUT = -10 ///< Deadline has elapsed (neco_*_dl) - CANCELED = -11 ///< Operation canceled (by neco_cancel) - BUSY = -12 ///< Resource busy (mutex_trylock) - NEGWAITGRP = -13 ///< Negative waitgroup counter - GAIERROR = -14 ///< Error with getaddrinfo (check neco_gai_error) - UNREADFAIL = -15 ///< Failed to unread byte (neco_stream_unread_byte) - PARTIALWRITE = -16 ///< Failed to write all data (neco_stream_flush) - NOTGENERATOR = -17 ///< Coroutine is not a generator (neco_gen_yield) - NOTSUSPENDED = -18 ///< Coroutine is not suspended (neco_resume) - - CANCEL_ASYNC = 1 - CANCEL_INLINE = 2 - CANCEL_ENABLE = 3 - CANCEL_DISABLE = 4 - - EAI_SYSTEM = 11 - - NANOSECOND = int64(1) - MICROSECOND = int64(1000) - MILLISECOND = int64(1000000) - SECOND = int64(1000000000) - MINUTE = int64(60000000000) - HOUR = int64(3600000000000) -) - -// generator -type Gen struct{} - -// llgo:type C -type Coro = func(argc c.Int, argv *c.Pointer) - -//go:linkname GenYield C.neco_gen_yield -func GenYield(data c.Pointer) c.Int - -//go:linkname GenNext C.neco_gen_next -func GenNext(gen *Gen, data c.Pointer) c.Int - -//go:linkname GenStart C.neco_gen_start -func GenStart(gen **Gen, dataSize uintptr, co Coro, argc c.Int, __llgo_va_list ...any) c.Int - -//go:linkname GenRelease C.neco_gen_release -func GenRelease(gen *Gen) c.Int - -//go:linkname ExitProg C.__neco_exit_prog -func ExitProg(code c.Int) - -//go:linkname EnvSetpaniconerror C.neco_env_setpaniconerror -func EnvSetpaniconerror(paniconerror bool) - -//go:linkname EnvSetcanceltype C.neco_env_setcanceltype -func EnvSetcanceltype(type_ c.Int) - -//go:linkname Strerror C.neco_strerror -func Strerror(errcode c.Int) *c.Char - -//go:linkname Start C.neco_start -func Start(co Coro, argc c.Int, __llgo_va_list ...any) c.Int diff --git a/c/net/llcppg.pub b/c/net/llcppg.pub deleted file mode 100644 index a467ee4b..00000000 --- a/c/net/llcppg.pub +++ /dev/null @@ -1,3 +0,0 @@ -sockaddr SockAddr -hostent Hostent -addrinfo AddrInfo diff --git a/c/net/net.go b/c/net/net.go deleted file mode 100644 index 847bd40b..00000000 --- a/c/net/net.go +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = true -) - -const ( - AF_UNSPEC = 0 // unspecified - AF_UNIX = 1 // local to host (pipes) - AF_LOCAL = AF_UNIX // backward compatibility - AF_INET = 2 // internetwork: UDP, TCP, etc. - AF_IMPLINK = 3 // arpanet imp addresses - AF_PUP = 4 // pup protocols: e.g. BSP - AF_CHAOS = 5 // mit CHAOS protocols - AF_NS = 6 // XEROX NS protocols - AF_ISO = 7 // ISO protocols - AF_OSI = AF_ISO - AF_ECMA = 8 // European computer manufacturers - AF_DATAKIT = 9 // datakit protocols - AF_CCITT = 10 // CCITT protocols, X.25 etc - AF_SNA = 11 // IBM SNA - AF_DECnet = 12 // DECnet - AF_DLI = 13 // DEC Direct data link interface - AF_LAT = 14 // LAT - AF_HYLINK = 15 // NSC Hyperchannel - AF_APPLETALK = 16 // Apple Talk - AF_ROUTE = 17 // Internal Routing Protocol - AF_LINK = 18 // Link layer interface - pseudo_AF_XTP = 19 // eXpress Transfer Protocol (no AF) - AF_COIP = 20 // connection-oriented IP, aka ST II - AF_CNT = 21 // Computer Network Technology - pseudo_AF_RTIP = 22 // Help Identify RTIP packets - AF_IPX = 23 // Novell Internet Protocol - AF_SIP = 24 // Simple Internet Protocol - pseudo_AF_PIP = 25 // Help Identify PIP packets - AF_NDRV = 27 // Network Driver 'raw' access - AF_ISDN = 28 // Integrated Services Digital Network - AF_E164 = AF_ISDN // CCITT E.164 recommendation - pseudo_AF_KEY = 29 // Internal key-management function - AF_INET6 = 30 // IPv6 - AF_NATM = 31 // native ATM access - AF_SYSTEM = 32 // Kernel event messages - AF_NETBIOS = 33 // NetBIOS - AF_PPP = 34 // PPP communication protocol - pseudo_AF_HDRCMPLT = 35 // Used by BPF to not rewrite headers in interface output routine - AF_RESERVED_36 = 36 // Reserved for internal usage - AF_IEEE80211 = 37 // IEEE 802.11 protocol - AF_UTUN = 38 - AF_VSOCK = 40 // VM Sockets - AF_MAX = 41 -) - -const ( - SOCK_STREAM = 1 // stream socket - SOCK_DGRAM = 2 // datagram socket - SOCK_RAW = 3 // raw-protocol interface - SOCK_RDM = 4 // reliably-delivered message - SOCK_SEQPACKET = 5 // sequenced packet stream -) - -const ( - EAI_ADDRFAMILY = iota + 1 /* address family for hostname not supported */ - EAI_AGAIN /* temporary failure in name resolution */ - EAI_BADFLAGS /* invalid value for ai_flags */ - EAI_FAIL /* non-recoverable failure in name resolution */ - EAI_FAMILY /* ai_family not supported */ - EAI_MEMORY /* memory allocation failure */ - EAI_NODATA /* no address associated with hostname */ - EAI_NONAME /* hostname nor servname provided, or not known */ - EAI_SERVICE /* servname not supported for ai_socktype */ - EAI_SOCKTYPE /* ai_socktype not supported */ - EAI_SYSTEM /* system error returned in errno */ - EAI_BADHINTS /* invalid value for hints */ - EAI_PROTOCOL /* resolved protocol is unknown */ - EAI_OVERFLOW /* argument buffer overflow */ -) - -const ( - ALIGNSIZE = unsafe.Sizeof(c.LongLong(0)) - MAXSIZE = 128 - PAD1_SIZE = ALIGNSIZE - unsafe.Sizeof(byte(0)) - unsafe.Sizeof(byte(0)) - PAD2_SIZE = MAXSIZE - unsafe.Sizeof(byte(0)) - unsafe.Sizeof(byte(0)) - PAD1_SIZE - ALIGNSIZE -) - -// (TODO) merge to inet -const INET_ADDRSTRLEN = 16 - -type SockaddrIn struct { - Len uint8 - Family uint8 - Port uint16 - Addr InAddr - Zero [8]c.Char -} - -type SockaddrIn6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo c.Uint - Addr In6Addr - ScopeId c.Uint -} - -type SockaddrStorage struct { - Len uint8 - Family uint8 - pad1 [PAD1_SIZE]c.Char - align c.LongLong - pad2 [PAD2_SIZE]c.Char -} - -type InAddr struct { - Addr c.Uint -} - -type In6Addr struct { - U6Addr [16]uint8 -} - -type SockAddr struct { - Len uint8 - Family uint8 - Data [14]c.Char -} - -type Hostent struct { - Name *c.Char // official name of host - Aliases **c.Char // null-terminated array of alternate names for the host - AddrType c.Int // host address type - Length c.Int // length of address - AddrList **c.Char // null-terminated array of addresses for the host -} - -//go:linkname Socket C.socket -func Socket(domain c.Int, typ c.Int, protocol c.Int) c.Int - -//go:linkname Bind C.bind -func Bind(sockfd c.Int, addr *SockaddrIn, addrlen c.Uint) c.Int - -//go:linkname Connect C.connect -func Connect(sockfd c.Int, addr *SockAddr, addrlen c.Uint) c.Int - -//go:linkname Listen C.listen -func Listen(sockfd c.Int, backlog c.Int) c.Int - -//go:linkname Accept C.accept -func Accept(sockfd c.Int, addr *SockaddrIn, addrlen *c.Uint) c.Int - -//go:linkname GetHostByName C.gethostbyname -func GetHostByName(name *c.Char) *Hostent - -// (TODO) merge to inet -// -//go:linkname InetNtop C.inet_ntop -func InetNtop(af c.Int, src c.Pointer, dst *c.Char, size c.Uint) *c.Char - -//go:linkname InetAddr C.inet_addr -func InetAddr(s *c.Char) c.Uint - -//go:linkname Send C.send -func Send(c.Int, c.Pointer, uintptr, c.Int) c.Long - -//go:linkname Recv C.recv -func Recv(c.Int, c.Pointer, uintptr, c.Int) c.Long - -//go:linkname SetSockOpt C.setsockopt -func SetSockOpt(socket c.Int, level c.Int, optionName c.Int, optionValue c.Pointer, sockLen c.Uint) c.Int - -//go:linkname Ntohs C.ntohs -func Ntohs(x uint16) uint16 - -//go:linkname Htons C.htons -func Htons(x uint16) uint16 - -//go:linkname Ntohl C.ntohl -func Ntohl(x c.Uint) c.Uint - -//go:linkname Htonl C.htonl -func Htonl(x c.Uint) c.Uint - -// ----------------------------------------------------------------------------- - -type AddrInfo struct { - Flags c.Int - Family c.Int - SockType c.Int - Protocol c.Int - AddrLen c.Uint - CanOnName *c.Char - Addr *SockAddr - Next *AddrInfo -} - -//go:linkname Getaddrinfo C.getaddrinfo -func Getaddrinfo(host *c.Char, port *c.Char, addrInfo *AddrInfo, result **AddrInfo) c.Int - -//go:linkname Freeaddrinfo C.freeaddrinfo -func Freeaddrinfo(addrInfo *AddrInfo) c.Int - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/_demo/cbigintdemo/fib.go b/c/openssl/_demo/cbigintdemo/fib.go deleted file mode 100644 index 0d7648a9..00000000 --- a/c/openssl/_demo/cbigintdemo/fib.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/openssl" -) - -func newInt(n openssl.BN_ULONG) *openssl.BIGNUM { - ret := openssl.BNNew() - ret.SetWord(n) - return ret -} - -func main() { - ctx := openssl.BN_CTXNew() - defer ctx.Free() - - // Initialize two big ints with the first two numbers in the sequence. - a := newInt(0) - b := newInt(1) - defer a.Free() - defer b.Free() - - // Initialize limit as 10^99, the smallest integer with 100 digits. - v10, v99 := newInt(10), newInt(99) - defer v10.Free() - defer v99.Free() - - limit := openssl.BNNew() - defer limit.Free() - - limit.Exp(v10, v99, ctx) - - // Loop while a is smaller than 1e100. - for a.Cmp(limit) < 0 { - // Compute the next Fibonacci number, storing it in a. - a.Add(a, b) - // Swap a and b so that b is the next number in the sequence. - a, b = b, a - } - cstr := a.CStr() - c.Printf(c.Str("%s\n"), cstr) // 100-digit Fibonacci number - openssl.FreeCStr(cstr) -} diff --git a/c/openssl/_demo/chmacdemo/hmac.go b/c/openssl/_demo/chmacdemo/hmac.go deleted file mode 100644 index 86d76aed..00000000 --- a/c/openssl/_demo/chmacdemo/hmac.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -import ( - "fmt" - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/openssl" -) - -func main() { - str := "Hello, World!" - key := "123456" - var lenKey = len(key) - - var digest = make([]byte, openssl.EVP_MAX_MD_SIZE) - var digestLen c.Uint - ctx := openssl.NewHMAC_CTX() - if ctx == nil { - c.Fprintf(c.Stderr, c.Str("%s\n"), c.Str("Error creating HMAC_CTX")) - return - } - defer ctx.Free() - var ret c.Int = ctx.InitEx(unsafe.Pointer(unsafe.StringData(key)), c.Int(lenKey), openssl.EVP_sha256(), nil) - if ret == 0 { - c.Fprintf(c.Stderr, c.Str("%s\n"), c.Str("Error initializing HMAC_CTX")) - return - } - ret = ctx.UpdateString(str) - if ret == 0 { - c.Fprintf(c.Stderr, c.Str("%s\n"), c.Str("Error updating HMAC_CTX")) - return - } - ret = ctx.Final(unsafe.SliceData(digest), &digestLen) - if ret == 0 { - c.Fprintf(c.Stderr, c.Str("%s\n"), c.Str("Error finalizing HMAC_CTX")) - return - } - fmt.Printf("HMAC:%x\n", digest[:digestLen]) -} diff --git a/c/openssl/_demo/cmd5demo/md5.go b/c/openssl/_demo/cmd5demo/md5.go deleted file mode 100644 index 26db4527..00000000 --- a/c/openssl/_demo/cmd5demo/md5.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "fmt" - "unsafe" - - "github.com/goplus/llgo/c/openssl" -) - -func main() { - var md5 openssl.MD5_CTX - var h = make([]byte, openssl.MD5_LBLOCK) - md5.Init() - md5.UpdateString("The fog is getting thicker!") - md5.UpdateString("And Leon's getting laaarger!") - md5.Final(unsafe.SliceData(h)) - fmt.Printf("%x", h) -} diff --git a/c/openssl/_demo/cranddemo/rand.go b/c/openssl/_demo/cranddemo/rand.go deleted file mode 100644 index 4fc3a803..00000000 --- a/c/openssl/_demo/cranddemo/rand.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/goplus/llgo/c/openssl" -) - -func main() { - b := make([]byte, 10) - - openssl.RANDBytes(b) - fmt.Printf("%x\n", b) - - openssl.RANDPrivBytes(b) - fmt.Printf("%x\n", b) -} diff --git a/c/openssl/_demo/cshademo/sha.go b/c/openssl/_demo/cshademo/sha.go deleted file mode 100644 index ee2577cb..00000000 --- a/c/openssl/_demo/cshademo/sha.go +++ /dev/null @@ -1,68 +0,0 @@ -package main - -import ( - "fmt" - "unsafe" - - "github.com/goplus/llgo/c/openssl" -) - -func main() { - str := "His money is twice tainted:" - - var sha1 openssl.SHA_CTX - sha1.Init() - sha1.UpdateString(str) - - h1 := make([]byte, openssl.SHA_DIGEST_LENGTH) - sha1.Final(unsafe.SliceData(h1)) - fmt.Printf("%x\n", h1) - - h2 := make([]byte, openssl.SHA_DIGEST_LENGTH) - openssl.SHA1String(str, unsafe.SliceData(h2)) - fmt.Printf("%x\n", h2) - - var sha256 openssl.SHA256_CTX - sha256.Init() - sha256.UpdateString(str) - h3 := make([]byte, openssl.SHA256_DIGEST_LENGTH) - sha256.Final(unsafe.SliceData(h3)) - fmt.Printf("%x\n", h3) - - h4 := make([]byte, openssl.SHA256_DIGEST_LENGTH) - openssl.SHA256String(str, unsafe.SliceData(h4)) - fmt.Printf("%x\n", h4) - - var sha512 openssl.SHA512_CTX - sha512.Init() - sha512.UpdateString("His money is twice tainted:") - - h5 := make([]byte, openssl.SHA512_DIGEST_LENGTH) - sha512.Final(unsafe.SliceData(h5)) - fmt.Printf("%x\n", h5) - - h6 := make([]byte, openssl.SHA512_DIGEST_LENGTH) - openssl.SHA512String(str, unsafe.SliceData(h6)) - fmt.Printf("%x\n", h6) - - var sha224 openssl.SHA224_CTX - sha224.Init() - sha224.UpdateString(str) - - h7 := make([]byte, openssl.SHA224_DIGEST_LENGTH) - sha224.Final(unsafe.SliceData(h7)) - fmt.Printf("%x\n", h7) - h8 := make([]byte, openssl.SHA224_DIGEST_LENGTH) - openssl.SHA224String(str, unsafe.SliceData(h8)) - fmt.Printf("%x\n", h8) - - var sha384 openssl.SHA384_CTX - sha384.Init() - sha384.UpdateString(str) - h9 := make([]byte, openssl.SHA384_DIGEST_LENGTH) - sha384.Final(unsafe.SliceData(h9)) - fmt.Printf("%x\n", h9) - h10 := make([]byte, openssl.SHA384_DIGEST_LENGTH) - openssl.SHA384String(str, unsafe.SliceData(h10)) - fmt.Printf("%x\n", h10) -} diff --git a/c/openssl/_wrap/openssl.c b/c/openssl/_wrap/openssl.c deleted file mode 100644 index 7cc5bbdb..00000000 --- a/c/openssl/_wrap/openssl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void opensslFree(void *ptr) { - OPENSSL_free(ptr); -} diff --git a/c/openssl/bio.go b/c/openssl/bio.go deleted file mode 100644 index f03fcb83..00000000 --- a/c/openssl/bio.go +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -type BIO struct { - Unused [0]byte -} - -// BIO *BIO_new_mem_buf(const void *buf, int len); -// -//go:linkname BIONewMemBuf C.BIO_new_mem_buf -func BIONewMemBuf(buf unsafe.Pointer, len c.Int) *BIO - -// int BIO_free(BIO *a); -// -// llgo:link (*BIO).Free C.BIO_free -func (*BIO) Free() c.Int { return 0 } - -// int BIO_up_ref(BIO *a); -// -// llgo:link (*BIO).UpRef C.BIO_up_ref -func (*BIO) UpRef() c.Int { return 0 } - -// int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes); -// -// llgo:link (*BIO).ReadEx C.BIO_read_ex -func (*BIO) ReadEx(data unsafe.Pointer, dlen uintptr, readbytes *uintptr) c.Int { return 0 } - -// int BIO_write(BIO *b, const void *data, int dlen); -// -// llgo:link (*BIO).Write C.BIO_write -func (*BIO) Write(data unsafe.Pointer, dlen c.Int) c.Int { return 0 } - -// int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written); -// -// llgo:link (*BIO).WriteEx C.BIO_write_ex -func (*BIO) WriteEx(data unsafe.Pointer, dlen uintptr, written *uintptr) c.Int { return 0 } - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/bn.go b/c/openssl/bn.go deleted file mode 100644 index 37cf3452..00000000 --- a/c/openssl/bn.go +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -type BN_ULONG = uint64 - -// ----------------------------------------------------------------------------- - -type BN_CTX struct { - Unused [0]byte -} - -// BN_CTX *BN_CTX_new(void); -// -//go:linkname BN_CTXNew C.BN_CTX_new -func BN_CTXNew() *BN_CTX - -// BN_CTX *BN_CTX_secure_new(void); -// -//go:linkname BN_CTXSecureNew C.BN_CTX_secure_new -func BN_CTXSecureNew() *BN_CTX - -// BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx); -// BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx); - -// void BN_CTX_free(BN_CTX *c); -// -// llgo:link (*BN_CTX).Free C.BN_CTX_free -func (*BN_CTX) Free() {} - -// void BN_CTX_start(BN_CTX *ctx); -// -// llgo:link (*BN_CTX).Start C.BN_CTX_start -func (*BN_CTX) Start() {} - -// BIGNUM *BN_CTX_get(BN_CTX *ctx); -// -// llgo:link (*BN_CTX).Get C.BN_CTX_get -func (*BN_CTX) Get() *BIGNUM { return nil } - -// void BN_CTX_end(BN_CTX *ctx); -// -// llgo:link (*BN_CTX).End C.BN_CTX_end -func (*BN_CTX) End() {} - -// ----------------------------------------------------------------------------- - -type BIGNUM struct { - Unused [0]byte -} - -// BIGNUM *BN_new(void); -// -//go:linkname BNNew C.BN_new -func BNNew() *BIGNUM - -// BIGNUM *BN_secure_new(void); -// -//go:linkname BNSecureNew C.BN_secure_new -func BNSecureNew() *BIGNUM - -// void BN_free(BIGNUM *a); -// -// llgo:link (*BIGNUM).Free C.BN_free -func (*BIGNUM) Free() {} - -// void BN_clear_free(BIGNUM *a); -// -// llgo:link (*BIGNUM).ClearFree C.BN_clear_free -func (*BIGNUM) ClearFree() {} - -// void BN_clear(BIGNUM *a); -// -// llgo:link (*BIGNUM).Clear C.BN_clear -func (*BIGNUM) Clear() {} - -// BIGNUM *BN_dup(const BIGNUM *a); -// -// llgo:link (*BIGNUM).Dup C.BN_dup -func (*BIGNUM) Dup() *BIGNUM { return nil } - -// BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Copy C.BN_copy -func (*BIGNUM) Copy(b *BIGNUM) *BIGNUM { return nil } - -// void BN_swap(BIGNUM *a, BIGNUM *b); -// -// llgo:link (*BIGNUM).Swap C.BN_swap -func (*BIGNUM) Swap(b *BIGNUM) {} - -// int BN_is_zero(const BIGNUM *a); -// -// llgo:link (*BIGNUM).IsZero C.BN_is_zero -func (*BIGNUM) IsZero() c.Int { return 0 } - -// void BN_zero_ex(BIGNUM *a); -// -// llgo:link (*BIGNUM).SetZero C.BN_zero_ex -func (*BIGNUM) SetZero() {} - -// int BN_is_one(const BIGNUM *a); -// -// llgo:link (*BIGNUM).IsOne C.BN_is_one -func (*BIGNUM) IsOne() c.Int { return 0 } - -// int BN_is_odd(const BIGNUM *a); -// -// llgo:link (*BIGNUM).IsOdd C.BN_is_odd -func (*BIGNUM) IsOdd() c.Int { return 0 } - -// int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w); -// -// llgo:link (*BIGNUM).AbsIsWord C.BN_abs_is_word -func (*BIGNUM) AbsIsWord(w BN_ULONG) c.Int { return 0 } - -// int BN_is_word(const BIGNUM *a, const BN_ULONG w); -// -// llgo:link (*BIGNUM).IsWord C.BN_is_word -func (*BIGNUM) IsWord(w BN_ULONG) c.Int { return 0 } - -// int BN_set_word(BIGNUM *a, BN_ULONG w); -// -// llgo:link (*BIGNUM).SetWord C.BN_set_word -func (*BIGNUM) SetWord(w BN_ULONG) c.Int { return 0 } - -// BN_ULONG BN_get_word(const BIGNUM *a); -// -// llgo:link (*BIGNUM).GetWord C.BN_get_word -func (*BIGNUM) GetWord() BN_ULONG { return 0 } - -// BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w); -// -// llgo:link (*BIGNUM).ModWord C.BN_mod_word -func (*BIGNUM) ModWord(w BN_ULONG) BN_ULONG { return 0 } - -// BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w); -// -// llgo:link (*BIGNUM).DivWord C.BN_div_word -func (*BIGNUM) DivWord(w BN_ULONG) BN_ULONG { return 0 } - -// int BN_mul_word(BIGNUM *a, BN_ULONG w); -// -// llgo:link (*BIGNUM).MulWord C.BN_mul_word -func (*BIGNUM) MulWord(w BN_ULONG) c.Int { return 0 } - -// int BN_add_word(BIGNUM *a, BN_ULONG w); -// -// llgo:link (*BIGNUM).AddWord C.BN_add_word -func (*BIGNUM) AddWord(w BN_ULONG) c.Int { return 0 } - -// int BN_sub_word(BIGNUM *a, BN_ULONG w); -// -// llgo:link (*BIGNUM).SubWord C.BN_sub_word -func (*BIGNUM) SubWord(w BN_ULONG) c.Int { return 0 } - -// char *BN_bn2hex(const BIGNUM *a); -// -// llgo:link (*BIGNUM).Bn2hex C.BN_bn2hex -func (*BIGNUM) Bn2hex() *c.Char { return nil } - -// char *BN_bn2dec(const BIGNUM *a); -// -// llgo:link (*BIGNUM).Bn2dec C.BN_bn2dec -func (*BIGNUM) Bn2dec() *c.Char { return nil } - -// llgo:link (*BIGNUM).CStr C.BN_bn2dec -func (*BIGNUM) CStr() *c.Char { return nil } - -// int BN_hex2bn(BIGNUM **a, const char *str); -// -//go:linkname BNHex2bn C.BN_hex2bn -func BNHex2bn(a **BIGNUM, str *c.Char) c.Int - -// int BN_dec2bn(BIGNUM **a, const char *str); -// -//go:linkname BNDec2bn C.BN_dec2bn -func BNDec2bn(a **BIGNUM, str *c.Char) c.Int - -// int BN_asc2bn(BIGNUM **a, const char *str); -// -//go:linkname BNAsc2bn C.BN_asc2bn -func BNAsc2bn(a **BIGNUM, str *c.Char) c.Int - -// BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNBin2bn C.BN_bin2bn -func BNBin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNSignedBin2bn C.BN_signed_bin2bn -func BNSignedBin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// int BN_bn2bin(const BIGNUM *a, unsigned char *to); -// -// llgo:link (*BIGNUM).Bn2bin C.BN_bn2bin -func (bn *BIGNUM) Bn2bin(to *byte) c.Int { return 0 } - -// int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen); -// -// llgo:link (*BIGNUM).Bn2binpad C.BN_bn2binpad -func (bn *BIGNUM) Bn2binpad(to *byte, tolen c.Int) c.Int { return 0 } - -// int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen); -// -// llgo:link (*BIGNUM).SignedBn2bin C.BN_signed_bn2bin -func (bn *BIGNUM) SignedBn2bin(to *byte, tolen c.Int) c.Int { return 0 } - -// BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNLebin2bn C.BN_lebin2bn -func BNLebin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNSignedLebin2bn C.BN_signed_lebin2bn -func BNSignedLebin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen); -// -// llgo:link (*BIGNUM).Bn2lebinpad C.BN_bn2lebinpad -func (bn *BIGNUM) Bn2lebinpad(to *byte, tolen c.Int) c.Int { return 0 } - -// int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen); -// -// llgo:link (*BIGNUM).SignedBn2lebin C.BN_signed_bn2lebin -func (bn *BIGNUM) SignedBn2lebin(to *byte, tolen c.Int) c.Int { return 0 } - -// BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNNative2bn C.BN_native2bn -func BNNative2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNSignedNative2bn C.BN_signed_native2bn -func BNSignedNative2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen); -// -// llgo:link (*BIGNUM).Bn2nativepad C.BN_bn2nativepad -func (bn *BIGNUM) Bn2nativepad(to *byte, tolen c.Int) c.Int { return 0 } - -// int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen); -// -// llgo:link (*BIGNUM).SignedBn2native C.BN_signed_bn2native -func (bn *BIGNUM) SignedBn2native(to *byte, tolen c.Int) c.Int { return 0 } - -// BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret); -// -//go:linkname BNMpi2bn C.BN_mpi2bn -func BNMpi2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM - -// int BN_bn2mpi(const BIGNUM *a, unsigned char *to); -// -// llgo:link (*BIGNUM).Bn2mpi C.BN_bn2mpi -func (bn *BIGNUM) Bn2mpi(to *byte) c.Int { return 0 } - -// int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Sub C.BN_sub -func (*BIGNUM) Sub(a, b *BIGNUM) c.Int { return 0 } - -// int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Add C.BN_add -func (*BIGNUM) Add(a, b *BIGNUM) c.Int { return 0 } - -// int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Usub C.BN_usub -func (*BIGNUM) Usub(a, b *BIGNUM) c.Int { return 0 } - -// int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Uadd C.BN_uadd -func (*BIGNUM) Uadd(a, b *BIGNUM) c.Int { return 0 } - -// int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).Mul C.BN_mul -func (*BIGNUM) Mul(r, a, b *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).Sqr C.BN_sqr -func (*BIGNUM) Sqr(r, a *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -/** BN_set_negative sets sign of a BIGNUM - * \param b pointer to the BIGNUM object - * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise - */ -// void BN_set_negative(BIGNUM *b, int n); -// -// llgo:link (*BIGNUM).SetNegative C.BN_set_negative -func (*BIGNUM) SetNegative(n c.Int) {} - -/** BN_is_negative returns 1 if the BIGNUM is negative - * \param b pointer to the BIGNUM object - * \return 1 if a < 0 and 0 otherwise - */ -// int BN_is_negative(const BIGNUM *b); -// -// llgo:link (*BIGNUM).IsNegative C.BN_is_negative -func (*BIGNUM) IsNegative() c.Int { return 0 } - -// int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).Div C.BN_div -func (*BIGNUM) Div(rem, m, d *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).Nnmod C.BN_nnmod -func (*BIGNUM) Nnmod(r, m, d *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// int BN_cmp(const BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Cmp C.BN_cmp -func (*BIGNUM) Cmp(b *BIGNUM) c.Int { return 0 } - -// int BN_ucmp(const BIGNUM *a, const BIGNUM *b); -// -// llgo:link (*BIGNUM).Ucmp C.BN_ucmp -func (*BIGNUM) Ucmp(b *BIGNUM) c.Int { return 0 } - -// int BN_is_bit_set(const BIGNUM *a, int n); -// -// llgo:link (*BIGNUM).IsBitSet C.BN_is_bit_set -func (*BIGNUM) IsBitSet(n c.Int) c.Int { return 0 } - -// int BN_set_bit(BIGNUM *a, int n); -// -// llgo:link (*BIGNUM).SetBit C.BN_set_bit -func (*BIGNUM) SetBit(n c.Int) c.Int { return 0 } - -// int BN_clear_bit(BIGNUM *a, int n); -// -// llgo:link (*BIGNUM).ClearBit C.BN_clear_bit -func (*BIGNUM) ClearBit(n c.Int) c.Int { return 0 } - -// int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); -// -// llgo:link (*BIGNUM).Lshift C.BN_lshift -func (*BIGNUM) Lshift(a *BIGNUM, n c.Int) c.Int { return 0 } - -// int BN_lshift1(BIGNUM *r, const BIGNUM *a); -// -// llgo:link (*BIGNUM).Lshift1 C.BN_lshift1 -func (*BIGNUM) Lshift1(a *BIGNUM) c.Int { return 0 } - -// int BN_rshift(BIGNUM *r, const BIGNUM *a, int n); -// -// llgo:link (*BIGNUM).Rshift C.BN_rshift -func (*BIGNUM) Rshift(a *BIGNUM, n c.Int) c.Int { return 0 } - -// int BN_rshift1(BIGNUM *r, const BIGNUM *a); -// -// llgo:link (*BIGNUM).Rshift1 C.BN_rshift1 -func (*BIGNUM) Rshift1(a *BIGNUM) c.Int { return 0 } - -// int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).Exp C.BN_exp -func (*BIGNUM) Exp(a, p *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).ModExp C.BN_mod_exp -func (*BIGNUM) ModExp(a, p, m *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).Gcd C.BN_gcd -func (*BIGNUM) Gcd(a, b *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// int BN_are_coprime(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -// -// llgo:link (*BIGNUM).AreCoprime C.BN_are_coprime -func (*BIGNUM) AreCoprime(b *BIGNUM, ctx *BN_CTX) c.Int { return 0 } - -// ----------------------------------------------------------------------------- - -type BN_GENCB struct { - Unused [0]byte -} - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/err.go b/c/openssl/err.go deleted file mode 100644 index 02fb7969..00000000 --- a/c/openssl/err.go +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -/*- - * The error code packs differently depending on if it records a system - * error or an OpenSSL error. - * - * A system error packs like this (we follow POSIX and only allow positive - * numbers that fit in an |int|): - * - * +-+-------------------------------------------------------------+ - * |1| system error number | - * +-+-------------------------------------------------------------+ - * - * An OpenSSL error packs like this: - * - * <---------------------------- 32 bits --------------------------> - * <--- 8 bits ---><------------------ 23 bits -----------------> - * +-+---------------+---------------------------------------------+ - * |0| library | reason | - * +-+---------------+---------------------------------------------+ - * - * A few of the reason bits are reserved as flags with special meaning: - * - * <5 bits-<>--------- 19 bits -----------------> - * +-------+-+-----------------------------------+ - * | rflags| | reason | - * +-------+-+-----------------------------------+ - * ^ - * | - * ERR_RFLAG_FATAL = ERR_R_FATAL - * - * The reason flags are part of the overall reason code for practical - * reasons, as they provide an easy way to place different types of - * reason codes in different numeric ranges. - * - * The currently known reason flags are: - * - * ERR_RFLAG_FATAL Flags that the reason code is considered fatal. - * For backward compatibility reasons, this flag - * is also the code for ERR_R_FATAL (that reason - * code served the dual purpose of flag and reason - * code in one in pre-3.0 OpenSSL). - * ERR_RFLAG_COMMON Flags that the reason code is common to all - * libraries. All ERR_R_ macros must use this flag, - * and no other _R_ macro is allowed to use it. - */ -type Errno c.Ulong - -// ERR_get_error returns the earliest error code from the thread's error queue and -// removes the entry. This function can be called repeatedly until there are no more -// error codes to return. -// -// unsigned long ERR_get_error(void); -// -//go:linkname ERRGetError C.ERR_get_error -func ERRGetError() Errno - -// ERR_get_error_all() is the same as ERR_get_error(), but on success it additionally -// stores the filename, line number and function where the error occurred in *file, -// *line and *func, and also extra text and flags in *data, *flags. If any of those -// parameters are NULL, it will not be changed. -// -// unsigned long ERR_get_error_all( -// const char **file, int *line, const char **func, const char **data, int *flags); -// -//go:linkname ERRGetErrorAll C.ERR_get_error_all -func ERRGetErrorAll( - file **c.Char, line *c.Int, function **c.Char, data **c.Char, flags *c.Int) Errno - -// unsigned long ERR_peek_error(void); -// -//go:linkname ERRPeekError C.ERR_peek_error -func ERRPeekError() Errno - -// unsigned long ERR_peek_error_all( -// const char **file, int *line, const char **func, const char **data, int *flags); -// -//go:linkname ERRPeekErrorAll C.ERR_peek_error_all -func ERRPeekErrorAll( - file **c.Char, line *c.Int, function **c.Char, data **c.Char, flags *c.Int) Errno - -// unsigned long ERR_peek_last_error(void); -// -//go:linkname ERRPeekLastError C.ERR_peek_last_error -func ERRPeekLastError() Errno - -// unsigned long ERR_peek_last_error_all( -// const char **file, int *line, const char **func, const char **data, int *flags); -// -//go:linkname ERRPeekLastErrorAll C.ERR_peek_last_error_all -func ERRPeekLastErrorAll( - file **c.Char, line *c.Int, function **c.Char, data **c.Char, flags *c.Int) Errno - -// void ERR_clear_error(void); -// -//go:linkname ERRClearError C.ERR_clear_error -func ERRClearError() - -// ERR_error_string() generates a human-readable string representing the error code e, -// and places it at buf. buf must be at least 256 bytes long. -// -// char *ERR_error_string(unsigned long e, char *buf); -// -//go:linkname ERRErrorString C.ERR_error_string -func ERRErrorString(e Errno, buf *c.Char) *c.Char - -// ERR_lib_error_string() and ERR_reason_error_string() return the library name and -// reason string respectively. -// -// const char *ERR_lib_error_string(unsigned long e); -// -//go:linkname ERRLibErrorString C.ERR_lib_error_string -func ERRLibErrorString(e Errno) *c.Char - -// const char *ERR_reason_error_string(unsigned long e); -// -//go:linkname ERRReasonErrorString C.ERR_reason_error_string -func ERRReasonErrorString(e Errno) *c.Char - -// void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u), void *u); -// -// [pid]:error:[error code]:[library name]:[function name]:[reason string]:[filename]:[line]:[optional text message] -// -//go:linkname ERRPrintErrorsCb C.ERR_print_errors_cb -func ERRPrintErrorsCb(cb func(str *c.Char, len uintptr, u unsafe.Pointer) c.Int, u unsafe.Pointer) - -// void ERR_print_errors_fp(FILE *fp); -// -//go:linkname ERRPrintErrorsFp C.ERR_print_errors_fp -func ERRPrintErrorsFp(fp c.FilePtr) - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/hmac.go b/c/openssl/hmac.go deleted file mode 100644 index 12e3af05..00000000 --- a/c/openssl/hmac.go +++ /dev/null @@ -1,133 +0,0 @@ -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - EVP_MAX_MD_SIZE = 64 /* longest known is SHA512 */ -) - -// ----------------------------------------------------------------------------- - -type EVP_MD struct { - Unused [0]byte -} - -// const EVP_MD *EVP_sha1(void) -// -//go:linkname EVP_sha1 C.EVP_sha1 -func EVP_sha1() *EVP_MD - -// const EVP_MD *EVP_sha224(void) -// -//go:linkname EVP_sha224 C.EVP_sha224 -func EVP_sha224() *EVP_MD - -// func EVP_sha256() *EVP_MD -// -//go:linkname EVP_sha256 C.EVP_sha256 -func EVP_sha256() *EVP_MD - -// const EVP_MD *EVP_sha512_224(void) -// -//go:linkname EVP_sha512_224 C.EVP_sha512_224 -func EVP_sha512_224() *EVP_MD - -// const EVP_MD *EVP_sha512_256(void) -// -//go:linkname EVP_sha512_256 C.EVP_sha512_256 -func EVP_sha512_256() *EVP_MD - -// const EVP_MD *EVP_sha384(void) -// -//go:linkname EVP_sha384 C.EVP_sha384 -func EVP_sha384() *EVP_MD - -// const EVP_MD *EVP_sha512(void) -// -//go:linkname EVP_sha512 C.EVP_sha512 -func EVP_sha512() *EVP_MD - -// ----------------------------------------------------------------------------- - -type HMAC_CTX struct { - Unused [0]byte -} - -// OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void); -// -//go:linkname NewHMAC_CTX C.HMAC_CTX_new -func NewHMAC_CTX() *HMAC_CTX - -// OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx); -// -// llgo:link (*HMAC_CTX).Free C.HMAC_CTX_free -func (ctx *HMAC_CTX) Free() {} - -// OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e); -// -// llgo:link (*HMAC_CTX).Size C.HMAC_size -func (ctx *HMAC_CTX) Size() uintptr { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx); -// -// llgo:link (*HMAC_CTX).Reset C.HMAC_CTX_reset -func (ctx *HMAC_CTX) Reset() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx, -// const void *key, int len, -// const EVP_MD *md); -// -// llgo:link (*HMAC_CTX).Init C.HMAC_Init -func (ctx *HMAC_CTX) Init(key unsafe.Pointer, len c.Int, md *EVP_MD) c.Int { return 0 } - -func (ctx *HMAC_CTX) InitBytes(key []byte, md *EVP_MD) c.Int { - return ctx.Init(unsafe.Pointer(unsafe.SliceData(key)), c.Int(len(key)), md) -} - -func (ctx *HMAC_CTX) InitString(key string, md *EVP_MD) c.Int { - return ctx.Init(unsafe.Pointer(unsafe.StringData(key)), c.Int(len(key)), md) -} - -// OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, -// const EVP_MD *md, ENGINE *impl); -// -// llgo:link (*HMAC_CTX).InitEx C.HMAC_Init_ex -func (ctx *HMAC_CTX) InitEx(key unsafe.Pointer, len c.Int, md *EVP_MD, impl unsafe.Pointer) c.Int { - return 0 -} - -// OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, -// size_t len); -// -// llgo:link (*HMAC_CTX).Update C.HMAC_Update -func (ctx *HMAC_CTX) Update(data unsafe.Pointer, len uintptr) c.Int { return 0 } - -func (ctx *HMAC_CTX) UpdateBytes(data []byte) c.Int { - return ctx.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} - -func (ctx *HMAC_CTX) UpdateString(data string) c.Int { - return ctx.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, -// unsigned int *len); -// -// llgo:link (*HMAC_CTX).Final C.HMAC_Final -func (ctx *HMAC_CTX) Final(md *byte, len *c.Uint) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); -// -// llgo:link (*HMAC_CTX).Copy C.HMAC_CTX_copy -func (ctx *HMAC_CTX) Copy(sctx *HMAC_CTX) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); -// -// llgo:link (*HMAC_CTX).SetFlags C.HMAC_CTX_set_flags -func (ctx *HMAC_CTX) SetFlags(flags c.Ulong) {} - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/md5.go b/c/openssl/md5.go deleted file mode 100644 index 99aac0c3..00000000 --- a/c/openssl/md5.go +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -const ( - MD5_CBLOCK = 64 - MD5_LBLOCK = MD5_CBLOCK / 4 -) - -// ----------------------------------------------------------------------------- - -type MD5_LONG = c.Uint - -type MD5_CTX struct { - A, B, C, D MD5_LONG - Nl, Nh MD5_LONG - Data [MD5_LBLOCK]MD5_LONG - Num c.Uint -} - -// OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c); -// -// llgo:link (*MD5_CTX).Init C.MD5_Init -func (c *MD5_CTX) Init() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len); -// -// llgo:link (*MD5_CTX).Update C.MD5_Update -func (c *MD5_CTX) Update(data unsafe.Pointer, n uintptr) c.Int { return 0 } - -func (c *MD5_CTX) UpdateBytes(data []byte) c.Int { - return c.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} - -func (c *MD5_CTX) UpdateString(data string) c.Int { - return c.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c); -// -//go:linkname md5Final C.MD5_Final -func md5Final(md *byte, c *MD5_CTX) c.Int - -func (c *MD5_CTX) Final(md *byte) c.Int { - return md5Final(md, c) -} - -// OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); -// -//go:linkname MD5 C.MD5 -func MD5(data unsafe.Pointer, n uintptr, md *byte) *byte - -func MD5Bytes(data []byte, md *byte) *byte { - return MD5(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data)), md) -} - -func MD5String(data string, md *byte) *byte { - return MD5(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data)), md) -} - -// OSSL_DEPRECATEDIN_3_0 void MD5_Transform(MD5_CTX *c, const unsigned char *b); - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/openssl.go b/c/openssl/openssl.go deleted file mode 100644 index 5002e851..00000000 --- a/c/openssl/openssl.go +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -const ( - LLGoFiles = "$(pkg-config --cflags openssl): _wrap/openssl.c" - LLGoPackage = "link: $(pkg-config --libs openssl); -lssl -lcrypto" -) - -//go:linkname Free C.opensslFree -func Free(ptr unsafe.Pointer) - -//go:linkname FreeCStr C.opensslFree -func FreeCStr(ptr *c.Char) - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/pem.go b/c/openssl/pem.go deleted file mode 100644 index fb2f360b..00000000 --- a/c/openssl/pem.go +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -// typedef int (*pem_password_cb)(char *buf, int size, int rwflag, void *userdata); -// -// llgo:type C -type PemPasswordCb func(buf *c.Char, size, rwflag c.Int, userdata unsafe.Pointer) c.Int - -// RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u); -// -//go:linkname PEMReadBioRSAPrivateKey C.PEM_read_bio_RSAPrivateKey -func PEMReadBioRSAPrivateKey(bp *BIO, x **RSA, cb PemPasswordCb, u unsafe.Pointer) *RSA - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/rand.go b/c/openssl/rand.go deleted file mode 100644 index f9ad6338..00000000 --- a/c/openssl/rand.go +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -// int RAND_bytes(unsigned char *buf, int num); -// -//go:linkname RANDBufferWithLen C.RAND_bytes -func RANDBufferWithLen(buf *byte, num c.Int) c.Int - -func RANDBytes(buf []byte) c.Int { - return RANDBufferWithLen(unsafe.SliceData(buf), c.Int(len(buf))) -} - -// int RAND_priv_bytes(unsigned char *buf, int num); -// -//go:linkname RANDPrivBufferWithLen C.RAND_priv_bytes -func RANDPrivBufferWithLen(buf *byte, num c.Int) c.Int - -func RANDPrivBytes(buf []byte) c.Int { - return RANDPrivBufferWithLen(unsafe.SliceData(buf), c.Int(len(buf))) -} - -// void RAND_seed(const void *buf, int num); -// -//go:linkname RANDSeed C.RAND_seed -func RANDSeed(buf unsafe.Pointer, num c.Int) - -// void RAND_keep_random_devices_open(int keep); -// -//go:linkname RANDKeepRandomDevicesOpen C.RAND_keep_random_devices_open -func RANDKeepRandomDevicesOpen(keep c.Int) - -// int RAND_load_file(const char *file, long max_bytes); -// -//go:linkname RANDLoadFile C.RAND_load_file -func RANDLoadFile(file *c.Char, maxBytes c.Long) c.Int - -// int RAND_write_file(const char *file); -// -//go:linkname RANDWriteFile C.RAND_write_file -func RANDWriteFile(file *c.Char) c.Int - -// const char *RAND_file_name(char *file, size_t num); -// -//go:linkname RANDFileName C.RAND_file_name -func RANDFileName(file *c.Char, num uintptr) *c.Char - -// int RAND_status(void); -// -//go:linkname RANDStatus C.RAND_status -func RANDStatus() c.Int - -// int RAND_poll(void); -// -//go:linkname RANDPoll C.RAND_poll -func RANDPoll() c.Int - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/rsa.go b/c/openssl/rsa.go deleted file mode 100644 index 23c60f28..00000000 --- a/c/openssl/rsa.go +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -type RSA_METHOD struct { - Unused [0]byte -} - -// OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_new(const char *name, int flags); -// -//go:linkname RSAMethNew C.RSA_meth_new -func RSAMethNew(name *byte, flags c.Int) *RSA_METHOD - -// OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth); -// -// llgo:link (*RSA_METHOD).Free C.RSA_meth_free -func (*RSA_METHOD) Free() {} - -// OSSL_DEPRECATEDIN_3_0 -// int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa)); -// -// llgo:link (*RSA_METHOD).SetInit C.RSA_meth_set_init -func (*RSA_METHOD) SetInit(init func(rsa *RSA) c.Int) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 -// int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa)); -// -// llgo:link (*RSA_METHOD).SetFinish C.RSA_meth_set_finish -func (*RSA_METHOD) SetFinish(finish func(rsa *RSA) c.Int) c.Int { return 0 } - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_mod_exp(RSA_METHOD *rsa, - int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa, - BN_CTX *ctx)); -*/ -// llgo:link (*RSA_METHOD).SetModExp C.RSA_meth_set_mod_exp -func (*RSA_METHOD) SetModExp(modExp func( - r0 *BIGNUM, i *BIGNUM, rsa *RSA, ctx *BN_CTX) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa, - int (*bn_mod_exp) (BIGNUM *r, - const BIGNUM *a, - const BIGNUM *p, - const BIGNUM *m, - BN_CTX *ctx, - BN_MONT_CTX *m_ctx)); -//-llgo:link (*RSA_METHOD).SetBnModExp C.RSA_meth_set_bn_mod_exp -func (*RSA_METHOD) SetBnModExp(bnModExp func( - r *BIGNUM, a *BIGNUM, p *BIGNUM, m *BIGNUM, ctx *BN_CTX, mCtx *BN_MONT_CTX) c.Int) c.Int { - return 0 -} -*/ - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_pub_enc(RSA_METHOD *rsa, - int (*pub_enc) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, - int padding)); -*/ -// llgo:link (*RSA_METHOD).SetPubEnc C.RSA_meth_set_pub_enc -func (*RSA_METHOD) SetPubEnc(pubEnc func( - flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_pub_dec(RSA_METHOD *rsa, - int (*pub_dec) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, - int padding)); -*/ -// llgo:link (*RSA_METHOD).SetPubDec C.RSA_meth_set_pub_dec -func (*RSA_METHOD) SetPubDec(pubDec func( - flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_priv_enc(RSA_METHOD *rsa, - int (*priv_enc) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, - int padding)); -*/ -// llgo:link (*RSA_METHOD).SetPrivEnc C.RSA_meth_set_priv_enc -func (*RSA_METHOD) SetPrivEnc(privEnc func( - flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_priv_dec(RSA_METHOD *rsa, - int (*priv_dec) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, - int padding)); -*/ -// llgo:link (*RSA_METHOD).SetPrivDec C.RSA_meth_set_priv_dec -func (*RSA_METHOD) SetPrivDec(privDec func( - flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_sign(RSA_METHOD *rsa, - int (*sign) (int type, const unsigned char *m, - unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, - const RSA *rsa)); -*/ -// llgo:link (*RSA_METHOD).SetSign C.RSA_meth_set_sign -func (*RSA_METHOD) SetSign(sign func( - typ c.Int, msg *byte, mlen c.Uint, - sigret *byte, siglen *c.Uint, rsa *RSA) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_verify(RSA_METHOD *rsa, - int (*verify) (int dtype, const unsigned char *m, - unsigned int m_length, - const unsigned char *sigbuf, - unsigned int siglen, const RSA *rsa)); -*/ -// llgo:link (*RSA_METHOD).SetVerify C.RSA_meth_set_verify -func (*RSA_METHOD) SetVerify(verify func( - dtype c.Int, msg *byte, mlen c.Uint, - sigbuf *byte, siglen c.Uint, rsa *RSA) c.Int) c.Int { - return 0 -} - -/* -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_keygen(RSA_METHOD *rsa, - int (*keygen) (RSA *rsa, int bits, BIGNUM *e, - BN_GENCB *cb)); - -OSSL_DEPRECATEDIN_3_0 -int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth, - int (*keygen) (RSA *rsa, int bits, - int primes, BIGNUM *e, - BN_GENCB *cb)); -*/ - -// ----------------------------------------------------------------------------- - -type RSA struct { - Unused [0]byte -} - -// OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void); -// -//go:linkname RSANew C.RSA_new -func RSANew() *RSA - -// OSSL_DEPRECATEDIN_3_0 RSA *RSA_new_method(ENGINE *engine); - -// OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r); -// -// llgo:link (*RSA).Free C.RSA_free -func (*RSA) Free() {} - -// "up" the RSA object's reference count -// OSSL_DEPRECATEDIN_3_0 int RSA_up_ref(RSA *r); -// -// llgo:link (*RSA).UpRef C.RSA_up_ref -func (*RSA) UpRef() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_bits(const RSA *rsa); -// -// llgo:link (*RSA).Bits C.RSA_bits -func (*RSA) Bits() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa); -// -// llgo:link (*RSA).Size C.RSA_size -func (*RSA) Size() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_security_bits(const RSA *rsa); -// -// llgo:link (*RSA).SecurityBits C.RSA_security_bits -func (*RSA) SecurityBits() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_flags(const RSA *r); -// -// llgo:link (*RSA).Flags C.RSA_flags -func (*RSA) Flags() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 void RSA_set_flags(RSA *r, int flags); -// -// llgo:link (*RSA).SetFlags C.RSA_set_flags -func (*RSA) SetFlags(flags c.Int) {} - -// OSSL_DEPRECATEDIN_3_0 void RSA_clear_flags(RSA *r, int flags); -// -// llgo:link (*RSA).ClearFlags C.RSA_clear_flags -func (*RSA) ClearFlags(flags c.Int) {} - -// OSSL_DEPRECATEDIN_3_0 int RSA_test_flags(const RSA *r, int flags); -// -// llgo:link (*RSA).TestFlags C.RSA_test_flags -func (*RSA) TestFlags(flags c.Int) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_get_version(RSA *r); -// -// llgo:link (*RSA).GetVersion C.RSA_get_version -func (*RSA) GetVersion() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg); -// -// llgo:link (*RSA).SetExData C.RSA_set_ex_data -func (*RSA) SetExData(idx c.Int, arg unsafe.Pointer) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx); -// -// llgo:link (*RSA).GetExData C.RSA_get_ex_data -func (*RSA) GetExData(idx c.Int) unsafe.Pointer { return nil } - -// OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); -// -// llgo:link (*RSA).SetMethod C.RSA_set_method -func (*RSA) SetMethod(meth *RSA_METHOD) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); -// -// llgo:link (*RSA).GenerateKeyEx C.RSA_generate_key_ex -func (*RSA) GenerateKeyEx(bits c.Int, e *BIGNUM, cb *BN_GENCB) c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); -// -// llgo:link (*RSA).GenerateMultiPrimeKey C.RSA_generate_multi_prime_key -func (*RSA) GenerateMultiPrimeKey(bits, primes c.Int, e *BIGNUM, cb *BN_GENCB) c.Int { return 0 } - -/* -// next 4 return -1 on error - -OSSL_DEPRECATEDIN_3_0 -int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, - RSA *rsa, int padding); -OSSL_DEPRECATEDIN_3_0 -int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, - RSA *rsa, int padding); -OSSL_DEPRECATEDIN_3_0 -int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, - RSA *rsa, int padding); -OSSL_DEPRECATEDIN_3_0 -int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, - RSA *rsa, int padding); -*/ -//go:linkname RSAPublicEncrypt C.RSA_public_encrypt -func RSAPublicEncrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int - -//go:linkname RSAPrivateEncrypt C.RSA_private_encrypt -func RSAPrivateEncrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int - -//go:linkname RSAPublicDecrypt C.RSA_public_decrypt -func RSAPublicDecrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int - -//go:linkname RSAPrivateDecrypt C.RSA_private_decrypt -func RSAPrivateDecrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int - -// OSSL_DEPRECATEDIN_3_0 int RSA_sign( -// int type, const unsigned char *m, unsigned int m_length, -// unsigned char *sigret, unsigned int *siglen, RSA *rsa); -// -//go:linkname RSASign C.RSA_sign -func RSASign(typ c.Int, msg *byte, mlen c.Uint, sigret *byte, siglen *c.Uint, rsa *RSA) c.Int - -// OSSL_DEPRECATEDIN_3_0 int RSA_verify(int type, const unsigned char *m, -// unsigned int m_length, -// const unsigned char *sigbuf, -// unsigned int siglen, RSA *rsa); - -// ----------------------------------------------------------------------------- diff --git a/c/openssl/sha1.go b/c/openssl/sha1.go deleted file mode 100644 index 4ad88ca9..00000000 --- a/c/openssl/sha1.go +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - SHA_DIGEST_LENGTH = 20 - SHA_LBLOCK = 16 - SHA_CBLOCK = (SHA_LBLOCK * 4) - SHA_LAST_BLOCK = (SHA_CBLOCK - 8) - - SHA256_CBLOCK = (SHA_LBLOCK * 4) - SHA256_192_DIGEST_LENGTH = 24 - SHA224_DIGEST_LENGTH = 28 - SHA256_DIGEST_LENGTH = 32 - SHA384_DIGEST_LENGTH = 48 - SHA512_DIGEST_LENGTH = 64 - SHA512_CBLOCK = (SHA_LBLOCK * 8) -) - -type SHA_LONG64 = c.UlongLong - -type SHA_LONG = c.Uint - -type SHA_CTX struct { - H0, H1, H2, H3, H4 SHA_LONG - Nl, Nh SHA_LONG - Data [SHA_LBLOCK]SHA_LONG - Num c.Uint -} - -// OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); -// -// llgo:link (*SHA_CTX).Init C.SHA1_Init -func (c *SHA_CTX) Init() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); -// -// llgo:link (*SHA_CTX).Update C.SHA1_Update -func (c *SHA_CTX) Update(data unsafe.Pointer, n uintptr) c.Int { return 0 } - -func (c *SHA_CTX) UpdateBytes(data []byte) c.Int { - return c.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} - -func (c *SHA_CTX) UpdateString(data string) c.Int { - return c.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); -// -//go:linkname sha1Final C.SHA1_Final -func sha1Final(md *byte, c *SHA_CTX) c.Int - -func (c *SHA_CTX) Final(md *byte) c.Int { - return sha1Final(md, c) -} - -// OSSL_DEPRECATEDIN_3_0 void SHA1_Transform(SHA_CTX *c, const unsigned char *data); -// -// llgo:link (*SHA_CTX).Transform C.SHA1_Transform -func (c *SHA_CTX) Transform(data *byte) {} - -// unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); -// -//go:linkname SHA1 C.SHA1 -func SHA1(data unsafe.Pointer, n uintptr, md *byte) *byte - -func SHA1Bytes(data []byte, md *byte) *byte { - return SHA1(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data)), md) -} - -func SHA1String(data string, md *byte) *byte { - return SHA1(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data)), md) -} diff --git a/c/openssl/sha256.go b/c/openssl/sha256.go deleted file mode 100644 index f7bd9f82..00000000 --- a/c/openssl/sha256.go +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -type SHA256_CTX struct { - H [8]SHA_LONG - Nl, Nh SHA_LONG - Data [SHA_LBLOCK]SHA_LONG - Num, MdLen c.Uint -} - -type SHA224_CTX SHA256_CTX - -// OSSL_DEPRECATEDIN_3_0 int SHA224_Init(SHA256_CTX *c); -// -// llgo:link (*SHA224_CTX).Init C.SHA224_Init -func (c *SHA224_CTX) Init() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); -// -// llgo:link (*SHA224_CTX).Update C.SHA224_Update -func (c *SHA224_CTX) Update(data unsafe.Pointer, n uintptr) c.Int { return 0 } - -func (c *SHA224_CTX) UpdateBytes(data []byte) c.Int { - return c.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} - -func (c *SHA224_CTX) UpdateString(data string) c.Int { - return c.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA224_Final(unsigned char *md, SHA256_CTX *c); -// -//go:linkname sha224Final C.SHA224_Final -func sha224Final(md *byte, c *SHA224_CTX) c.Int - -func (c *SHA224_CTX) Final(md *byte) c.Int { - return sha224Final(md, c) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c); -// -// llgo:link (*SHA256_CTX).Init C.SHA256_Init -func (c *SHA256_CTX) Init() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); -// -// llgo:link (*SHA256_CTX).Update C.SHA256_Update -func (c *SHA256_CTX) Update(data unsafe.Pointer, n uintptr) c.Int { return 0 } - -func (c *SHA256_CTX) UpdateBytes(data []byte) c.Int { - return c.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} - -func (c *SHA256_CTX) UpdateString(data string) c.Int { - return c.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c); -// -//go:linkname sha256Final C.SHA256_Final -func sha256Final(md *byte, c *SHA256_CTX) c.Int - -func (c *SHA256_CTX) Final(md *byte) c.Int { - return sha256Final(md, c) -} - -// OSSL_DEPRECATEDIN_3_0 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); -// -// llgo:link (*SHA256_CTX).Transform C.SHA256_Transform -func (c *SHA256_CTX) Transform(data *byte) {} - -// unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); -// -//go:linkname SHA224 C.SHA224 -func SHA224(data unsafe.Pointer, n uintptr, md *byte) *byte - -func SHA224Bytes(data []byte, md *byte) *byte { - return SHA224(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data)), md) -} - -func SHA224String(data string, md *byte) *byte { - return SHA224(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data)), md) -} - -// unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); -// -//go:linkname SHA256 C.SHA256 -func SHA256(data unsafe.Pointer, n uintptr, md *byte) *byte - -func SHA256Bytes(data []byte, md *byte) *byte { - return SHA256(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data)), md) -} - -func SHA256String(data string, md *byte) *byte { - return SHA256(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data)), md) -} diff --git a/c/openssl/sha512.go b/c/openssl/sha512.go deleted file mode 100644 index ec2e0739..00000000 --- a/c/openssl/sha512.go +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package openssl - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -type SHA512_CTX struct { - H [8]SHA_LONG64 - N1, Nh SHA_LONG64 - D [SHA_LBLOCK]SHA_LONG64 - Num, MdLen c.Uint -} - -type SHA384_CTX SHA512_CTX - -// OSSL_DEPRECATEDIN_3_0 int SHA384_Init(SHA512_CTX *c); -// -// llgo:link (*SHA384_CTX).Init C.SHA384_Init -func (c *SHA384_CTX) Init() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); -// -// llgo:link (*SHA384_CTX).Update C.SHA384_Update -func (c *SHA384_CTX) Update(data unsafe.Pointer, n uintptr) c.Int { return 0 } - -func (c *SHA384_CTX) UpdateBytes(data []byte) c.Int { - return c.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} - -func (c *SHA384_CTX) UpdateString(data string) c.Int { - return c.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA384_Final(unsigned char *md, SHA512_CTX *c); -// -//go:linkname sha384Final C.SHA384_Final -func sha384Final(md *byte, c *SHA384_CTX) c.Int - -func (c *SHA384_CTX) Final(md *byte) c.Int { - return sha384Final(md, c) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c); -// -// llgo:link (*SHA512_CTX).Init C.SHA512_Init -func (c *SHA512_CTX) Init() c.Int { return 0 } - -// OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); -// -// llgo:link (*SHA512_CTX).Update C.SHA512_Update -func (c *SHA512_CTX) Update(data unsafe.Pointer, n uintptr) c.Int { return 0 } -func (c *SHA512_CTX) UpdateBytes(data []byte) c.Int { - return c.Update(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data))) -} -func (c *SHA512_CTX) UpdateString(data string) c.Int { - return c.Update(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data))) -} - -// OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c); -// -//go:linkname sha512Final C.SHA512_Final -func sha512Final(md *byte, c *SHA512_CTX) c.Int - -func (c *SHA512_CTX) Final(md *byte) c.Int { - return sha512Final(md, c) -} - -// OSSL_DEPRECATEDIN_3_0 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); -// -// llgo:link (*SHA512_CTX).Transform C.SHA512_Transform -func (c *SHA512_CTX) Transform(data *byte) {} - -// unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); -// -//go:linkname SHA384 C.SHA384 -func SHA384(data unsafe.Pointer, n uintptr, md *byte) *byte - -func SHA384Bytes(data []byte, md *byte) *byte { - return SHA384(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data)), md) -} - -func SHA384String(data string, md *byte) *byte { - return SHA384(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data)), md) -} - -// unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); -// -//go:linkname SHA512 C.SHA512 -func SHA512(data unsafe.Pointer, n uintptr, md *byte) *byte - -func SHA512Bytes(data []byte, md *byte) *byte { - return SHA512(unsafe.Pointer(unsafe.SliceData(data)), uintptr(len(data)), md) -} - -func SHA512String(data string, md *byte) *byte { - return SHA512(unsafe.Pointer(unsafe.StringData(data)), uintptr(len(data)), md) -} diff --git a/c/os/_os/os.c b/c/os/_os/os.c deleted file mode 100644 index 1d904faf..00000000 --- a/c/os/_os/os.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - -int llgoClearenv() { - extern char **environ; - if (environ != NULL) { - *environ = NULL; - } - return 0; -} - -int llgoErrno() { return errno; } diff --git a/c/os/llcppg.pub b/c/os/llcppg.pub deleted file mode 100644 index 5754f2a3..00000000 --- a/c/os/llcppg.pub +++ /dev/null @@ -1,7 +0,0 @@ -mode_t ModeT -uid_t UidT -gid_t GidT -off_t OffT -dev_t DevT -stat StatT -pid_t PidT diff --git a/c/os/os.go b/c/os/os.go deleted file mode 100644 index b7a81770..00000000 --- a/c/os/os.go +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package os - -// #include -// #include -import "C" - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/syscall" -) - -const ( - PATH_MAX = C.PATH_MAX -) - -const ( - /* get file status flags */ - F_GETFL = 3 - /* set file status flags */ - F_SETFL = 4 - - /* open for reading only */ - O_RDONLY = 0x0000 - /* open for writing only */ - O_WRONLY = 0x0001 - /* open for reading and writing */ - O_RDWR = 0x0002 - /* mask for above modes */ - O_ACCMODE = 0x0003 - - /* no delay */ - O_NONBLOCK = 0x00000004 - /* create if nonexistant */ - O_CREAT = 0x00000200 - /* truncate to zero length */ - O_TRUNC = 0x00000400 -) - -const ( - EAGAIN = 35 -) - -type ( - ModeT C.mode_t - UidT C.uid_t - GidT C.gid_t - OffT C.off_t - DevT C.dev_t -) - -type ( - StatT = syscall.Stat_t -) - -//go:linkname Errno C.llgoErrno -func Errno() c.Int - -//go:linkname Umask C.umask -func Umask(cmask ModeT) ModeT - -//go:linkname Mkdir C.mkdir -func Mkdir(path *c.Char, mode ModeT) c.Int - -//go:linkname Rmdir C.rmdir -func Rmdir(path *c.Char) c.Int - -//go:linkname Link C.link -func Link(oldpath *c.Char, newpath *c.Char) c.Int - -//go:linkname Symlink C.symlink -func Symlink(target *c.Char, linkpath *c.Char) c.Int - -//go:linkname Readlink C.readlink -func Readlink(path *c.Char, buf c.Pointer, bufsize uintptr) int - -//go:linkname Unlink C.unlink -func Unlink(path *c.Char) c.Int - -//go:linkname Remove C.remove -func Remove(path *c.Char) c.Int - -//go:linkname Rename C.rename -func Rename(oldpath *c.Char, newpath *c.Char) c.Int - -//go:linkname Stat C.stat -func Stat(path *c.Char, buf *StatT) c.Int - -//go:linkname Lstat C.lstat -func Lstat(path *c.Char, buf *StatT) c.Int - -//go:linkname Truncate C.truncate -func Truncate(path *c.Char, length OffT) c.Int - -//go:linkname Chmod C.chmod -func Chmod(path *c.Char, mode ModeT) c.Int - -//go:linkname Chown C.chown -func Chown(path *c.Char, owner UidT, group GidT) c.Int - -//go:linkname Lchown C.lchown -func Lchown(path *c.Char, owner UidT, group GidT) c.Int - -// ----------------------------------------------------------------------------- - -//go:linkname Getcwd C.getcwd -func Getcwd(buffer c.Pointer, size uintptr) *c.Char - -//go:linkname Chdir C.chdir -func Chdir(path *c.Char) c.Int - -//go:linkname Chroot C.chroot -func Chroot(path *c.Char) c.Int - -// ----------------------------------------------------------------------------- - -//go:linkname Environ environ -var Environ **c.Char - -//go:linkname Getenv C.getenv -func Getenv(name *c.Char) *c.Char - -//go:linkname Setenv C.setenv -func Setenv(name *c.Char, value *c.Char, overwrite c.Int) c.Int - -//go:linkname Putenv C.putenv -func Putenv(env *c.Char) c.Int - -//go:linkname Unsetenv C.unsetenv -func Unsetenv(name *c.Char) c.Int - -// ----------------------------------------------------------------------------- - -//go:linkname Fchdir C.fchdir -func Fchdir(dirfd c.Int) c.Int - -//go:linkname Faccessat C.faccessat -func Faccessat(dirfd c.Int, path *c.Char, mode c.Int, flags c.Int) c.Int - -//go:linkname Fchmodat C.fchmodat -func Fchmodat(dirfd c.Int, path *c.Char, mode ModeT, flags c.Int) c.Int - -//go:linkname Fchownat C.fchownat -func Fchownat(dirfd c.Int, path *c.Char, owner UidT, group GidT, flags c.Int) c.Int - -//go:linkname Fstatat C.fstatat -func Fstatat(dirfd c.Int, path *c.Char, buf *StatT, flags c.Int) c.Int - -// ----------------------------------------------------------------------------- - -//go:linkname Open C.open -func Open(path *c.Char, flags c.Int, __llgo_va_list ...any) c.Int - -//go:linkname Openat C.openat -func Openat(dirfd c.Int, path *c.Char, flags c.Int, mode ModeT) c.Int - -//go:linkname Creat C.creat -func Creat(path *c.Char, mode ModeT) c.Int - -//go:linkname Fcntl C.fcntl -func Fcntl(a c.Int, b c.Int, __llgo_va_list ...any) c.Int - -//go:linkname Dup C.dup -func Dup(fd c.Int) c.Int - -//go:linkname Dup2 C.dup2 -func Dup2(oldfd c.Int, newfd c.Int) c.Int - -/* TODO(xsw): -On Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64, pipe() has the following prototype: -struct fd_pair { - long fd[2]; -}; -struct fd_pair pipe(void); -*/ -//go:linkname Pipe C.pipe -func Pipe(fds *[2]c.Int) c.Int - -//go:linkname Mkfifo C.mkfifo -func Mkfifo(path *c.Char, mode ModeT) c.Int - -//go:linkname Mknod C.mknod -func Mknod(path *c.Char, mode ModeT, dev DevT) c.Int - -//go:linkname Close C.close -func Close(fd c.Int) c.Int - -//go:linkname Read C.read -func Read(fd c.Int, buf c.Pointer, count uintptr) int - -//go:linkname Write C.write -func Write(fd c.Int, buf c.Pointer, count uintptr) int - -//go:linkname Lseek C.lseek -func Lseek(fd c.Int, offset OffT, whence c.Int) OffT - -//go:linkname Fsync C.fsync -func Fsync(fd c.Int) c.Int - -//go:linkname Ftruncate C.ftruncate -func Ftruncate(fd c.Int, length OffT) c.Int - -//go:linkname Fchmod C.fchmod -func Fchmod(fd c.Int, mode ModeT) c.Int - -//go:linkname Fchown C.fchown -func Fchown(fd c.Int, owner UidT, group GidT) c.Int - -//go:linkname Fstat C.fstat -func Fstat(fd c.Int, buf *StatT) c.Int - -//go:linkname Isatty C.isatty -func Isatty(fd c.Int) c.Int - -// ----------------------------------------------------------------------------- - -// Execl(const char *path, const char *arg0, ..., /*, (char *)0, */) -// -// Execl requires the full path of the program to be provided. -// -//go:linkname Execl C.execl -func Execl(path *c.Char, arg0 *c.Char, __llgo_va_list ...any) c.Int - -// Execle(const char *path, const char *arg0, ..., /* (char *)0, char *const envp[] */) -// -//go:linkname Execle C.execle -func Execle(path *c.Char, arg0 *c.Char, __llgo_va_list ...any) c.Int - -// Execlp(const char *file, const char *arg0, ..., /*, (char *)0, */) -// -// Execlp only needs to provide the program name and it will search for the program in the -// paths specified in the PATH environment variable. -// -//go:linkname Execlp C.execlp -func Execlp(file *c.Char, arg0 *c.Char, __llgo_va_list ...any) c.Int - -//go:linkname Execv C.execv -func Execv(path *c.Char, argv **c.Char) c.Int - -//go:linkname Execve C.execve -func Execve(path *c.Char, argv **c.Char, envp **c.Char) c.Int - -//go:linkname Execvp C.execvp -func Execvp(file *c.Char, argv **c.Char) c.Int - -// ----------------------------------------------------------------------------- - -type PidT c.Int - -//go:linkname Fork C.fork -func Fork() PidT - -//go:linkname Getpid C.getpid -func Getpid() PidT - -//go:linkname Getppid C.getppid -func Getppid() PidT - -//go:linkname Kill C.kill -func Kill(pid PidT, sig c.Int) c.Int - -// If wait() returns due to a stopped or terminated child process, the process ID -// of the child is returned to the calling process. Otherwise, a value of -1 is -// returned and errno is set to indicate the error. -// -//go:linkname Wait C.wait -func Wait(statLoc *c.Int) PidT - -// If wait3(), wait4(), or waitpid() returns due to a stopped or terminated child -// process, the process ID of the child is returned to the calling process. If -// there are no children not previously awaited, -1 is returned with errno set to -// [ECHILD]. Otherwise, if WNOHANG is specified and there are no stopped or exited -// children, 0 is returned. If an error is detected or a caught signal aborts the -// call, a value of -1 is returned and errno is set to indicate the error. -// -//go:linkname Wait3 C.wait3 -func Wait3(statLoc *c.Int, options c.Int, rusage *syscall.Rusage) PidT - -//go:linkname Wait4 C.wait4 -func Wait4(pid PidT, statLoc *c.Int, options c.Int, rusage *syscall.Rusage) PidT - -//go:linkname Waitpid C.waitpid -func Waitpid(pid PidT, statLoc *c.Int, options c.Int) PidT - -// ----------------------------------------------------------------------------- - -//go:linkname Exit C.exit -func Exit(c.Int) - -//go:linkname Getuid C.getuid -func Getuid() UidT - -//go:linkname Geteuid C.geteuid -func Geteuid() UidT - -//go:linkname Getgid C.getgid -func Getgid() GidT - -//go:linkname Getegid C.getegid -func Getegid() GidT - -// ----------------------------------------------------------------------------- - -//go:linkname Getrlimit C.getrlimit -func Getrlimit(resource c.Int, rlp *syscall.Rlimit) c.Int - -//go:linkname Setrlimit C.setrlimit -func Setrlimit(resource c.Int, rlp *syscall.Rlimit) c.Int - -// ----------------------------------------------------------------------------- - -// Upon successful completion, the value 0 is returned; otherwise the value -1 -// is returned and the global variable errno is set to indicate the error. -// -//go:linkname Sysctl C.sysctl -func Sysctl( - name *c.Int, namelen c.Uint, - oldp c.Pointer, oldlenp *uintptr, - newp c.Pointer, newlen uintptr) c.Int - -//go:linkname Sysctlbyname C.sysctlbyname -func Sysctlbyname( - name *c.Char, oldp c.Pointer, oldlenp *uintptr, - newp c.Pointer, newlen uintptr) c.Int - -// The sysctlnametomib() function accepts an ASCII representation of the -// name, looks up the integer name vector, and returns the numeric repre- -// sentation in the mib array pointed to by mibp. The number of elements -// in the mib array is given by the location specified by sizep before the -// call, and that location gives the number of entries copied after a suc- -// cessful call. The resulting mib and size may be used in subsequent -// sysctl() calls to get the data associated with the requested ASCII -// name. This interface is intended for use by applications that want to -// repeatedly request the same variable (the sysctl() function runs in -// about a third the time as the same request made via the sysctlbyname() -// function). The sysctlnametomib() function is also useful for fetching -// mib prefixes and then adding a final component. -// -//go:linkname Sysctlnametomib C.sysctlnametomib -func Sysctlnametomib(name *c.Char, mibp *c.Int, sizep *uintptr) c.Int - -// ----------------------------------------------------------------------------- diff --git a/c/os/os_linux.go b/c/os/os_linux.go deleted file mode 100644 index 6886a3f2..00000000 --- a/c/os/os_linux.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build linux - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package os - -import "C" - -const ( - LLGoFiles = "_os/os.c" - LLGoPackage = "link" -) - -//go:linkname Clearenv C.clearenv -func Clearenv() diff --git a/c/os/os_other.go b/c/os/os_other.go deleted file mode 100644 index ae78cd41..00000000 --- a/c/os/os_other.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build !linux - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package os - -import "C" - -const ( - LLGoFiles = "_os/os.c" - LLGoPackage = "link" -) - -//go:linkname Clearenv C.llgoClearenv -func Clearenv() diff --git a/c/pthread/llcppg.pub b/c/pthread/llcppg.pub deleted file mode 100644 index 5de67020..00000000 --- a/c/pthread/llcppg.pub +++ /dev/null @@ -1,3 +0,0 @@ -pthread_t Thread -attr Attr -pthread_key_t Key diff --git a/c/pthread/pthread.go b/c/pthread/pthread.go deleted file mode 100644 index 8fb1c48f..00000000 --- a/c/pthread/pthread.go +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pthread - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -func __noop__() c.Int { - return 0 -} - -// ----------------------------------------------------------------------------- - -type aThread struct { - Unused [8]byte -} - -//llgo:type C -type RoutineFunc func(c.Pointer) c.Pointer - -// Thread represents a POSIX thread. -type Thread = *aThread - -// The pthread_exit() function terminates the calling thread and -// returns a value via retval that (if the thread is joinable) is -// available to another thread in the same process that calls -// pthread_join(3). -// -// See https://man7.org/linux/man-pages/man3/pthread_exit.3.html -// -//go:linkname Exit C.pthread_exit -func Exit(retval c.Pointer) - -// The pthread_cancel() function sends a cancelation request to the -// thread thread. -// -// See https://man7.org/linux/man-pages/man3/pthread_cancel.3.html -// -//go:linkname Cancel C.pthread_cancel -func Cancel(thread Thread) c.Int - -// ----------------------------------------------------------------------------- - -// Attr represents a POSIX thread attributes. -type Attr struct { - Detached byte - SsSp *c.Char - SsSize uintptr -} - -// llgo:link (*Attr).Init C.pthread_attr_init -func (attr *Attr) Init() c.Int { return 0 } - -// llgo:link (*Attr).Destroy C.pthread_attr_destroy -func (attr *Attr) Destroy() c.Int { return 0 } - -// llgo:link (*Attr).GetDetached C.pthread_attr_getdetachstate -func (attr *Attr) GetDetached(detached *c.Int) c.Int { return 0 } - -// llgo:link (*Attr).SetDetached C.pthread_attr_setdetachstate -func (attr *Attr) SetDetached(detached c.Int) c.Int { return 0 } - -// llgo:link (*Attr).GetStackSize C.pthread_attr_getstacksize -func (attr *Attr) GetStackSize(stackSize *uintptr) c.Int { return 0 } - -// llgo:link (*Attr).SetStackSize C.pthread_attr_setstacksize -func (attr *Attr) SetStackSize(stackSize uintptr) c.Int { return 0 } - -// llgo:link (*Attr).GetStackAddr C.pthread_attr_getstackaddr -func (attr *Attr) GetStackAddr(stackAddr *c.Pointer) c.Int { return 0 } - -// llgo:link (*Attr).SetStackAddr C.pthread_attr_setstackaddr -func (attr *Attr) SetStackAddr(stackAddr c.Pointer) c.Int { return 0 } - -// ----------------------------------------------------------------------------- -// Thread Local Storage - -type Key c.Uint - -// llgo:link (*Key).Create C.pthread_key_create -func (key *Key) Create(destructor func(c.Pointer)) c.Int { return 0 } - -// llgo:link Key.Delete C.pthread_key_delete -func (key Key) Delete() c.Int { return 0 } - -// llgo:link Key.Get C.pthread_getspecific -func (key Key) Get() c.Pointer { return nil } - -// llgo:link Key.Set C.pthread_setspecific -func (key Key) Set(value c.Pointer) c.Int { return __noop__() } - -// ----------------------------------------------------------------------------- diff --git a/c/pthread/pthread_gc.go b/c/pthread/pthread_gc.go deleted file mode 100644 index 1150e1a8..00000000 --- a/c/pthread/pthread_gc.go +++ /dev/null @@ -1,80 +0,0 @@ -//go:build !nogc -// +build !nogc - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pthread - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs bdw-gc); -lgc" -) - -// The pthread_create() function starts a new thread in the calling -// process. The new thread starts execution by invoking -// start_routine(); arg is passed as the sole argument of -// start_routine(). -// -// The new thread terminates in one of the following ways: -// -// - It calls pthread_exit(3), specifying an exit status value that -// is available to another thread in the same process that calls -// pthread_join(3). -// -// - It returns from start_routine(). This is equivalent to -// calling pthread_exit(3) with the value supplied in the return -// statement. -// -// - It is canceled (see pthread_cancel(3)). -// -// - Any of the threads in the process calls exit(3), or the main -// thread performs a return from main(). This causes the -// termination of all threads in the process. -// -// On success, pthread_create() returns 0; on error, it returns an -// error number, and the contents of *thread are undefined. -// -// See https://man7.org/linux/man-pages/man3/pthread_create.3.html -// -//go:linkname Create C.GC_pthread_create -func Create(pthread *Thread, attr *Attr, routine RoutineFunc, arg c.Pointer) c.Int - -// The pthread_join() function waits for the thread specified by -// thread to terminate. If that thread has already terminated, then -// pthread_join() returns immediately. The thread specified by -// thread must be joinable. -// -// If retval is not NULL, then pthread_join() copies the exit status -// of the target thread (i.e., the value that the target thread -// supplied to pthread_exit(3)) into the location pointed to by -// retval. If the target thread was canceled, then PTHREAD_CANCELED -// is placed in the location pointed to by retval. -// -// If multiple threads simultaneously try to join with the same -// thread, the results are undefined. If the thread calling -// pthread_join() is canceled, then the target thread will remain -// joinable (i.e., it will not be detached). -// -// See https://man7.org/linux/man-pages/man3/pthread_join.3.html -// -//go:linkname Join C.GC_pthread_join -func Join(thread Thread, retval *c.Pointer) c.Int diff --git a/c/pthread/pthread_nogc.go b/c/pthread/pthread_nogc.go deleted file mode 100644 index 97a6d216..00000000 --- a/c/pthread/pthread_nogc.go +++ /dev/null @@ -1,80 +0,0 @@ -//go:build nogc -// +build nogc - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pthread - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "decl" -) - -// The pthread_create() function starts a new thread in the calling -// process. The new thread starts execution by invoking -// start_routine(); arg is passed as the sole argument of -// start_routine(). -// -// The new thread terminates in one of the following ways: -// -// - It calls pthread_exit(3), specifying an exit status value that -// is available to another thread in the same process that calls -// pthread_join(3). -// -// - It returns from start_routine(). This is equivalent to -// calling pthread_exit(3) with the value supplied in the return -// statement. -// -// - It is canceled (see pthread_cancel(3)). -// -// - Any of the threads in the process calls exit(3), or the main -// thread performs a return from main(). This causes the -// termination of all threads in the process. -// -// On success, pthread_create() returns 0; on error, it returns an -// error number, and the contents of *thread are undefined. -// -// See https://man7.org/linux/man-pages/man3/pthread_create.3.html -// -//go:linkname Create C.pthread_create -func Create(pthread *Thread, attr *Attr, routine RoutineFunc, arg c.Pointer) c.Int - -// The pthread_join() function waits for the thread specified by -// thread to terminate. If that thread has already terminated, then -// pthread_join() returns immediately. The thread specified by -// thread must be joinable. -// -// If retval is not NULL, then pthread_join() copies the exit status -// of the target thread (i.e., the value that the target thread -// supplied to pthread_exit(3)) into the location pointed to by -// retval. If the target thread was canceled, then PTHREAD_CANCELED -// is placed in the location pointed to by retval. -// -// If multiple threads simultaneously try to join with the same -// thread, the results are undefined. If the thread calling -// pthread_join() is canceled, then the target thread will remain -// joinable (i.e., it will not be detached). -// -// See https://man7.org/linux/man-pages/man3/pthread_join.3.html -// -//go:linkname Join C.pthread_join -func Join(thread Thread, retval *c.Pointer) c.Int diff --git a/c/pthread/sync/_sema.go b/c/pthread/sync/_sema.go deleted file mode 100644 index c46105c7..00000000 --- a/c/pthread/sync/_sema.go +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package sync - -// #include -import "C" - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// Sem represents a semaphore. -type Sem C.sem_t - -// initializes the unnamed semaphore at the address -// pointed to by sem. The value argument specifies the initial -// value for the semaphore. -// -// The pshared argument indicates whether this semaphore is to be -// shared between the threads of a process, or between processes. -// -// If pshared has the value 0, then the semaphore is shared between -// the threads of a process, and should be located at some address -// that is visible to all threads (e.g., a global variable, or a -// variable allocated dynamically on the heap). -// -// If pshared is nonzero, then the semaphore is shared between -// processes, and should be located in a region of shared memory -// (see shm_open(3), mmap(2), and shmget(2)). (Since a child -// created by fork(2) inherits its parent's memory mappings, it can -// also access the semaphore.) Any process that can access the -// shared memory region can operate on the semaphore using -// sem_post(3), sem_wait(3), and so on. -// -// Initializing a semaphore that has already been initialized -// results in undefined behavior. -// -// llgo:link (*Sem).Init C.sem_init -func (*Sem) Init(pshared c.Int, value c.Uint) c.Int { return 0 } - -// llgo:link (*Sem).Destroy C.sem_destroy -func (*Sem) Destroy() c.Int { return 0 } - -// llgo:link (*Sem).Post C.sem_post -func (*Sem) Post() c.Int { return 0 } - -// llgo:link (*Sem).Wait C.sem_wait -func (*Sem) Wait() c.Int { return 0 } - -// llgo:link (*Sem).TryWait C.sem_trywait -func (*Sem) TryWait() c.Int { return 0 } - -// llgo:link (*Sem).GetValue C.sem_getvalue -func (*Sem) GetValue(sval *c.Int) c.Int { return 0 } diff --git a/c/pthread/sync/_wrap/pthd.c b/c/pthread/sync/_wrap/pthd.c deleted file mode 100644 index f7bc7eb9..00000000 --- a/c/pthread/sync/_wrap/pthd.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -// ----------------------------------------------------------------------------- - -pthread_once_t llgoSyncOnceInitVal = PTHREAD_ONCE_INIT; - -// ----------------------------------------------------------------------------- - -// wrap return type to void -void wrap_pthread_mutex_lock(pthread_mutex_t *mutex) { - pthread_mutex_lock(mutex); -} - -// wrap return type to void -void wrap_pthread_mutex_unlock(pthread_mutex_t *mutex) { - pthread_mutex_unlock(mutex); -} - -// ----------------------------------------------------------------------------- diff --git a/c/pthread/sync/llcppg.pub b/c/pthread/sync/llcppg.pub deleted file mode 100644 index 2ac7e00c..00000000 --- a/c/pthread/sync/llcppg.pub +++ /dev/null @@ -1,7 +0,0 @@ -pthread_once_t Once -pthread_mutexattr_t MutexAttr -pthread_mutex_t Mutex -pthread_rwlockattr_t RWLockAttr -pthread_rwlock_t RWLock -pthread_condattr_t CondAttr -pthread_cond_t Cond diff --git a/c/pthread/sync/sync.go b/c/pthread/sync/sync.go deleted file mode 100644 index af0480ce..00000000 --- a/c/pthread/sync/sync.go +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package sync - -// #include -import "C" - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/time" -) - -const ( - LLGoFiles = "_wrap/pthd.c" - LLGoPackage = "link" -) - -// ----------------------------------------------------------------------------- - -// Once is an object that will perform exactly one action. -type Once C.pthread_once_t - -//go:linkname OnceInit llgoSyncOnceInitVal -var OnceInit Once - -// llgo:link (*Once).Do C.pthread_once -func (o *Once) Do(f func()) c.Int { return 0 } - -// ----------------------------------------------------------------------------- - -type MutexType c.Int - -const ( - MUTEX_NORMAL MutexType = C.PTHREAD_MUTEX_NORMAL - MUTEX_ERRORCHECK MutexType = C.PTHREAD_MUTEX_ERRORCHECK - MUTEX_RECURSIVE MutexType = C.PTHREAD_MUTEX_RECURSIVE - MUTEX_DEFAULT MutexType = C.PTHREAD_MUTEX_DEFAULT -) - -// MutexAttr is a mutex attribute object. -type MutexAttr C.pthread_mutexattr_t - -// llgo:link (*MutexAttr).Init C.pthread_mutexattr_init -func (a *MutexAttr) Init(attr *MutexAttr) c.Int { return 0 } - -// llgo:link (*MutexAttr).Destroy C.pthread_mutexattr_destroy -func (a *MutexAttr) Destroy() {} - -// llgo:link (*MutexAttr).SetType C.pthread_mutexattr_settype -func (a *MutexAttr) SetType(typ MutexType) c.Int { return 0 } - -// ----------------------------------------------------------------------------- - -// Mutex is a mutual exclusion lock. -type Mutex C.pthread_mutex_t - -// llgo:link (*Mutex).Init C.pthread_mutex_init -func (m *Mutex) Init(attr *MutexAttr) c.Int { return 0 } - -// llgo:link (*Mutex).Destroy C.pthread_mutex_destroy -func (m *Mutex) Destroy() {} - -// llgo:link (*Mutex).TryLock C.pthread_mutex_trylock -func (m *Mutex) TryLock() c.Int { return 0 } - -// llgo:link (*Mutex).Lock C.wrap_pthread_mutex_lock -func (m *Mutex) Lock() {} - -// llgo:link (*Mutex).Unlock C.wrap_pthread_mutex_unlock -func (m *Mutex) Unlock() {} - -// ----------------------------------------------------------------------------- - -// RWLockAttr is a read-write lock attribute object. -type RWLockAttr C.pthread_rwlockattr_t - -// llgo:link (*RWLockAttr).Init C.pthread_rwlockattr_init -func (a *RWLockAttr) Init(attr *RWLockAttr) c.Int { return 0 } - -// llgo:link (*RWLockAttr).Destroy C.pthread_rwlockattr_destroy -func (a *RWLockAttr) Destroy() {} - -// llgo:link (*RWLockAttr).SetPShared C.pthread_rwlockattr_setpshared -func (a *RWLockAttr) SetPShared(pshared c.Int) c.Int { return 0 } - -// llgo:link (*RWLockAttr).GetPShared C.pthread_rwlockattr_getpshared -func (a *RWLockAttr) GetPShared(pshared *c.Int) c.Int { return 0 } - -// ----------------------------------------------------------------------------- - -// RWLock is a read-write lock. -type RWLock C.pthread_rwlock_t - -// llgo:link (*RWLock).Init C.pthread_rwlock_init -func (rw *RWLock) Init(attr *RWLockAttr) c.Int { return 0 } - -// llgo:link (*RWLock).Destroy C.pthread_rwlock_destroy -func (rw *RWLock) Destroy() {} - -// llgo:link (*RWLock).RLock C.pthread_rwlock_rdlock -func (rw *RWLock) RLock() {} - -// llgo:link (*RWLock).TryRLock C.pthread_rwlock_tryrdlock -func (rw *RWLock) TryRLock() c.Int { return 0 } - -// llgo:link (*RWLock).RUnlock C.pthread_rwlock_unlock -func (rw *RWLock) RUnlock() {} - -// llgo:link (*RWLock).Lock C.pthread_rwlock_wrlock -func (rw *RWLock) Lock() {} - -// llgo:link (*RWLock).TryLock C.pthread_rwlock_trywrlock -func (rw *RWLock) TryLock() c.Int { return 0 } - -// llgo:link (*RWLock).Unlock C.pthread_rwlock_unlock -func (rw *RWLock) Unlock() {} - -// ----------------------------------------------------------------------------- - -// CondAttr is a condition variable attribute object. -type CondAttr C.pthread_condattr_t - -// llgo:link (*CondAttr).Init C.pthread_condattr_init -func (a *CondAttr) Init(attr *CondAttr) c.Int { return 0 } - -// llgo:link (*CondAttr).Destroy C.pthread_condattr_destroy -func (a *CondAttr) Destroy() {} - -// llgo:link (*CondAttr).SetClock C.pthread_condattr_setclock -func (a *CondAttr) SetClock(clock time.ClockidT) c.Int { return 0 } - -// llgo:link (*CondAttr).GetClock C.pthread_condattr_getclock -func (a *CondAttr) GetClock(clock *time.ClockidT) c.Int { return 0 } - -// ----------------------------------------------------------------------------- - -// Cond is a condition variable. -type Cond C.pthread_cond_t - -// llgo:link (*Cond).Init C.pthread_cond_init -func (c *Cond) Init(attr *CondAttr) c.Int { return 0 } - -// llgo:link (*Cond).Destroy C.pthread_cond_destroy -func (c *Cond) Destroy() {} - -// llgo:link (*Cond).Signal C.pthread_cond_signal -func (c *Cond) Signal() c.Int { return 0 } - -// llgo:link (*Cond).Broadcast C.pthread_cond_broadcast -func (c *Cond) Broadcast() c.Int { return 0 } - -// llgo:link (*Cond).Wait C.pthread_cond_wait -func (c *Cond) Wait(m *Mutex) c.Int { return 0 } - -// llgo:link (*Cond).TimedWait C.pthread_cond_timedwait -func (c *Cond) TimedWait(m *Mutex, abstime *time.Timespec) c.Int { return 0 } - -// ----------------------------------------------------------------------------- diff --git a/c/raylib/README.md b/c/raylib/README.md deleted file mode 100644 index f27e06a5..00000000 --- a/c/raylib/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# LLGo wrapper of raysan5/raylib - -## How to install - -### on macOS (Homebrew) - -```sh -brew install raylib -``` - -### on Linux (Debian/Ubuntu) - -```sh -TODO -``` - -## Demos - -The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it): - -- [tetris](_demo/tetris/tetris.go): tetris powered by raylib - -### How to run demos - -To run the demos in directory `_demo`: - -```sh -cd # eg. cd _demo/tetris -llgo run . -``` diff --git a/c/raylib/_demo/raylibdemo/raydemo.go b/c/raylib/_demo/raylibdemo/raydemo.go deleted file mode 100644 index 62baabc1..00000000 --- a/c/raylib/_demo/raylibdemo/raydemo.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/raylib" -) - -func main() { - const screenWidth = 800 - const screenHeight = 450 - raylib.InitWindow(screenWidth, screenHeight, c.Str("Raylib DEMO")) - for !raylib.WindowShouldClose() { - raylib.BeginDrawing() - raylib.ClearBackground(raylib.RAYWHITE) - raylib.DrawRectangle(screenWidth/2-50, screenHeight/2-50, 100, 100, raylib.BLUE) - raylib.EndDrawing() - } -} diff --git a/c/raylib/_demo/tetris/tetris.go b/c/raylib/_demo/tetris/tetris.go deleted file mode 100644 index 7082c7f1..00000000 --- a/c/raylib/_demo/tetris/tetris.go +++ /dev/null @@ -1,181 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/raylib" -) - -const ( - BOARD_WIDTH = 10 - BOARD_HEIGHT = 20 - BLOCK_SIZE = 30 - - SCREENWIDTH = 300 - SCREENHEIGHT = 600 -) - -const MAX_BLOCKS = 4 - -type Shape struct { - Blocks [MAX_BLOCKS]raylib.Vector2 - Color raylib.Color -} - -var SHAPES = []Shape{ - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 0, Y: 0}, {X: 1, Y: 0}, {X: 2, Y: 0}, {X: 3, Y: 0}}, Color: raylib.SKYBLUE}, - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 0, Y: 0}, {X: 1, Y: 0}, {X: 0, Y: 1}, {X: 1, Y: 1}}, Color: raylib.YELLOW}, - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 1, Y: 0}, {X: 0, Y: 1}, {X: 1, Y: 1}, {X: 2, Y: 1}}, Color: raylib.PURPLE}, - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 1, Y: 0}, {X: 2, Y: 0}, {X: 0, Y: 1}, {X: 1, Y: 1}}, Color: raylib.GREEN}, - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 0, Y: 0}, {X: 1, Y: 0}, {X: 1, Y: 1}, {X: 2, Y: 1}}, Color: raylib.RED}, - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 0, Y: 0}, {X: 0, Y: 1}, {X: 1, Y: 1}, {X: 2, Y: 1}}, Color: raylib.BLUE}, - {Blocks: [MAX_BLOCKS]raylib.Vector2{{X: 2, Y: 0}, {X: 0, Y: 1}, {X: 1, Y: 1}, {X: 2, Y: 1}}, Color: raylib.ORANGE}, -} - -var board [BOARD_HEIGHT][BOARD_WIDTH]raylib.Color - -var curShape Shape -var curPos raylib.Vector2 - -var fallTime = c.Float(0) -var fallSpeed = c.Float(0.2) -var score = 0 -var scoreText = make([]c.Char, 20) -var gameOver = false - -func genShape() { - curShape = SHAPES[raylib.GetRandomValue(c.Int(0), c.Int(6))] - curPos = raylib.Vector2{BOARD_WIDTH/2 - 1, 0} -} - -func checkCollision() bool { - for i := 0; i < MAX_BLOCKS; i++ { - x := int(curPos.X + curShape.Blocks[i].X) - y := int(curPos.Y + curShape.Blocks[i].Y) - if x < 0 || x >= BOARD_WIDTH || y >= BOARD_HEIGHT || (y >= 0 && board[y][x] != raylib.BLANK) { - return true - } - } - return false -} - -func lockShape() { - for i := 0; i < MAX_BLOCKS; i++ { - x := int(curPos.X + curShape.Blocks[i].X) - y := int(curPos.Y + curShape.Blocks[i].Y) - if y >= 0 { - board[y][x] = curShape.Color - } - } -} - -func rotateShape() { - rotated := curShape - for i := 0; i < MAX_BLOCKS; i++ { - x := rotated.Blocks[i].X - rotated.Blocks[i].X = -rotated.Blocks[i].Y - rotated.Blocks[i].Y = x - } - - temp := curShape - curShape = rotated - if checkCollision() { - curShape = temp - } -} - -func clearLines() int { - linesCleared := 0 - for y := BOARD_HEIGHT - 1; y >= 0; y-- { - lineFull := true - for x := 0; x < BOARD_WIDTH; x++ { - if board[y][x] == raylib.BLANK { - lineFull = false - break - } - } - if lineFull { - for yy := y; yy > 0; yy-- { - for x := 0; x < BOARD_WIDTH; x++ { - board[yy][x] = board[yy-1][x] - } - } - for x := 0; x < BOARD_WIDTH; x++ { - board[0][x] = raylib.BLANK - } - y += 1 - linesCleared += 1 - } - } - return linesCleared -} - -func keyPressed(key c.Int) bool { - return raylib.IsKeyPressed(key) || raylib.IsKeyPressedRepeat(key) -} - -func main() { - raylib.InitWindow(SCREENWIDTH, SCREENHEIGHT, c.Str("tetris (powered by raylib + llgo)")) - raylib.SetTargetFPS(c.Int(60)) - genShape() - for !raylib.WindowShouldClose() && !gameOver { - fallTime += raylib.GetFrameTime() - if fallTime >= fallSpeed { - fallTime = 0 - curPos.Y += 1 - if checkCollision() { - curPos.Y -= 1 - lockShape() - linesCleared := clearLines() - score += linesCleared * 100 - genShape() - if checkCollision() { - gameOver = true - } - } - } - - if keyPressed(raylib.KEY_LEFT) { - curPos.X -= 1 - if checkCollision() { - curPos.X += 1 - } - } - if keyPressed(raylib.KEY_RIGHT) { - curPos.X += 1 - if checkCollision() { - curPos.X -= 1 - } - } - if keyPressed(raylib.KEY_SPACE) || keyPressed(raylib.KEY_UP) || keyPressed(raylib.KEY_DOWN) { - rotateShape() - } - - raylib.BeginDrawing() - raylib.ClearBackground(raylib.RAYWHITE) - for y := 0; y < BOARD_HEIGHT; y++ { - for x := 0; x < BOARD_WIDTH; x++ { - raylib.DrawRectangle(c.Int(x*BLOCK_SIZE), c.Int(y*BLOCK_SIZE), c.Int(BLOCK_SIZE-1), c.Int(BLOCK_SIZE-1), board[y][x]) - } - } - - for i := 0; i < MAX_BLOCKS; i++ { - raylib.DrawRectangle(c.Int((curPos.X+curShape.Blocks[i].X)*BLOCK_SIZE), c.Int((curPos.Y+curShape.Blocks[i].Y)*BLOCK_SIZE), - BLOCK_SIZE-1, BLOCK_SIZE-1, curShape.Color) - } - - c.Sprintf(unsafe.SliceData(scoreText), c.Str("Score:%d"), score) - raylib.DrawText(unsafe.SliceData(scoreText), 10, 10, 20, raylib.BLACK) - - raylib.EndDrawing() - } - - for !raylib.WindowShouldClose() { - raylib.BeginDrawing() - raylib.ClearBackground(raylib.RAYWHITE) - raylib.DrawText(c.Str("Game Over"), SCREENWIDTH/2-50, SCREENHEIGHT/2-10, 20, raylib.RED) - raylib.DrawText(unsafe.SliceData(scoreText), SCREENWIDTH/2-50, SCREENHEIGHT/2+10, 20, raylib.BLACK) - raylib.EndDrawing() - } -} diff --git a/c/raylib/raylib.go b/c/raylib/raylib.go deleted file mode 100644 index f3c3d9bc..00000000 --- a/c/raylib/raylib.go +++ /dev/null @@ -1,485 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package raylib - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs raylib); -lraylib" -) - -// ----------------------------------------------------------------------------- - -// Vector2, 2 components -type Vector2 struct { - X float32 // Vector x component - Y float32 // Vector y component -} - -// Vector3, 3 components -type Vector3 struct { - X float32 // Vector x component - Y float32 // Vector y component - Z float32 // Vector z component -} - -// Vector4, 4 components -type Vector4 struct { - X float32 // Vector x component - Y float32 // Vector y component - Z float32 // Vector z component - W float32 // Vector w component -} - -// Quaternion, 4 components (Vector4 alias) -type Quaternion = Vector4 - -//---------------------------------------------------------------------------------- -// Enumerators Definition - -// System/Window config flags -// By default all flags are set to 0 - -// Trace log level - -// Keyboard keys (US keyboard layout) -// required keys for alternative layouts -const ( - KEY_NULL = 0 // Key: NULL, used for no key pressed - - // Alphanumeric keys - KEY_APOSTROPHE = 39 // Key: ' - KEY_COMMA = 44 // Key: , - KEY_MINUS = 45 // Key: - - KEY_PERIOD = 46 // Key: . - KEY_SLASH = 47 // Key: / - KEY_ZERO = 48 // Key: 0 - KEY_ONE = 49 // Key: 1 - KEY_TWO = 50 // Key: 2 - KEY_THREE = 51 // Key: 3 - KEY_FOUR = 52 // Key: 4 - KEY_FIVE = 53 // Key: 5 - KEY_SIX = 54 // Key: 6 - KEY_SEVEN = 55 // Key: 7 - KEY_EIGHT = 56 // Key: 8 - KEY_NINE = 57 // Key: 9 - KEY_SEMICOLON = 59 // Key: ; - KEY_EQUAL = 61 // Key: = - KEY_A = 65 // Key: A | a - KEY_B = 66 // Key: B | b - KEY_C = 67 // Key: C | c - KEY_D = 68 // Key: D | d - KEY_E = 69 // Key: E | e - KEY_F = 70 // Key: F | f - KEY_G = 71 // Key: G | g - KEY_H = 72 // Key: H | h - KEY_I = 73 // Key: I | i - KEY_J = 74 // Key: J | j - KEY_K = 75 // Key: K | k - KEY_L = 76 // Key: L | l - KEY_M = 77 // Key: M | m - KEY_N = 78 // Key: N | n - KEY_O = 79 // Key: O | o - KEY_P = 80 // Key: P | p - KEY_Q = 81 // Key: Q | q - KEY_R = 82 // Key: R | r - KEY_S = 83 // Key: S | s - KEY_T = 84 // Key: T | t - KEY_U = 85 // Key: U | u - KEY_V = 86 // Key: V | v - KEY_W = 87 // Key: W | w - KEY_X = 88 // Key: X | x - KEY_Y = 89 // Key: Y | y - KEY_Z = 90 // Key: Z | z - KEY_LEFT_BRACKET = 91 // Key: [ - KEY_BACKSLASH = 92 // Key: '\' - KEY_RIGHT_BRACKET = 93 // Key: ] - KEY_GRAVE = 96 // Key: ` - - // Function keys - KEY_SPACE = 32 // Key: Space - KEY_ESCAPE = 256 // Key: Esc - KEY_ENTER = 257 // Key: Enter - KEY_TAB = 258 // Key: Tab - KEY_BACKSPACE = 259 // Key: Backspace - KEY_INSERT = 260 // Key: Ins - KEY_DELETE = 261 // Key: Del - KEY_RIGHT = 262 // Key: Cursor right - KEY_LEFT = 263 // Key: Cursor left - KEY_DOWN = 264 // Key: Cursor down - KEY_UP = 265 // Key: Cursor up - KEY_PAGE_UP = 266 // Key: Page up - KEY_PAGE_DOWN = 267 // Key: Page down - KEY_HOME = 268 // Key: Home - KEY_END = 269 // Key: End - KEY_CAPS_LOCK = 280 // Key: Caps lock - KEY_SCROLL_LOCK = 281 // Key: Scroll down - KEY_NUM_LOCK = 282 // Key: Num lock - KEY_PRINT_SCREEN = 283 // Key: Print screen - KEY_PAUSE = 284 // Key: Pause - KEY_F1 = 290 // Key: F1 - KEY_F2 = 291 // Key: F2 - KEY_F3 = 292 // Key: F3 - KEY_F4 = 293 // Key: F4 - KEY_F5 = 294 // Key: F5 - KEY_F6 = 295 // Key: F6 - KEY_F7 = 296 // Key: F7 - KEY_F8 = 297 // Key: F8 - KEY_F9 = 298 // Key: F9 - KEY_F10 = 299 // Key: F10 - KEY_F11 = 300 // Key: F11 - KEY_F12 = 301 // Key: F12 - KEY_LEFT_SHIFT = 340 // Key: Shift left - KEY_LEFT_CONTROL = 341 // Key: Control left - KEY_LEFT_ALT = 342 // Key: Alt left - KEY_LEFT_SUPER = 343 // Key: Super left - KEY_RIGHT_SHIFT = 344 // Key: Shift right - KEY_RIGHT_CONTROL = 345 // Key: Control right - KEY_RIGHT_ALT = 346 // Key: Alt right - KEY_RIGHT_SUPER = 347 // Key: Super right - KEY_KB_MENU = 348 // Key: KB menu - - // Keypad keys - KEY_KP_0 = 320 // Key: Keypad 0 - KEY_KP_1 = 321 // Key: Keypad 1 - KEY_KP_2 = 322 // Key: Keypad 2 - KEY_KP_3 = 323 // Key: Keypad 3 - KEY_KP_4 = 324 // Key: Keypad 4 - KEY_KP_5 = 325 // Key: Keypad 5 - KEY_KP_6 = 326 // Key: Keypad 6 - KEY_KP_7 = 327 // Key: Keypad 7 - KEY_KP_8 = 328 // Key: Keypad 8 - KEY_KP_9 = 329 // Key: Keypad 9 - KEY_KP_DECIMAL = 330 // Key: Keypad . - KEY_KP_DIVIDE = 331 // Key: Keypad / - KEY_KP_MULTIPLY = 332 // Key: Keypad * - KEY_KP_SUBTRACT = 333 // Key: Keypad - - KEY_KP_ADD = 334 // Key: Keypad + - KEY_KP_ENTER = 335 // Key: Keypad Enter - KEY_KP_EQUAL = 336 // Key: Keypad = - - // Android key buttons - KEY_BACK = 4 // Key: Android back button - KEY_MENU = 82 // Key: Android menu button - KEY_VOLUME_UP = 24 // Key: Android volume up button - KEY_VOLUME_DOWN = 25 // Key: Android volume down button -) - -// Mouse buttons - -// Mouse cursor - -// Gamepad buttons - -// Gamepad axis - -// Material map index - -// Shader location index - -// Shader uniform data type - -// Shader attribute data types - -// Pixel formats - -// Texture parameters: filter mode - -// Texture parameters: wrap mode - -// Cubemap layouts - -// Font type, defines generation method - -// Color blending modes (pre-defined) - -// Gesture - -// Camera system modes - -// Camera projection - -// N-patch layout - -// ----------------------------------------------------------------------------- -// Window-related functions - -//go:linkname InitWindow C.InitWindow -func InitWindow(width, height c.Int, title *c.Char) - -//go:linkname CloseWindow C.CloseWindow -func CloseWindow() - -//go:linkname WindowShouldClose C.WindowShouldClose -func WindowShouldClose() bool - -//go:linkname IsWindowReady C.IsWindowReady -func IsWindowReady() bool - -//go:linkname IsWindowFullscreen C.IsWindowFullscreen -func IsWindowFullscreen() bool - -//go:linkname IsWindowHidden C.IsWindowHidden -func IsWindowHidden() bool - -//go:linkname IsWindowMinimized C.IsWindowMinimized -func IsWindowMinimized() bool - -//go:linkname IsWindowMaximized C.IsWindowMaximized -func IsWindowMaximized() bool - -//go:linkname IsWindowFocused C.IsWindowFocused -func IsWindowFocused() bool - -//go:linkname IsWindowResized C.IsWindowResized -func IsWindowResized() bool - -//go:linkname IsWindowState C.IsWindowState -func IsWindowState(flag c.Int) bool - -//go:linkname SetWindowState C.SetWindowState -func SetWindowState(flags c.Int) - -//go:linkname ClearWindowState C.ClearWindowState -func ClearWindowState(flags c.Int) - -//go:linkname ToggleFullscreen C.ToggleFullscreen -func ToggleFullscreen() - -//go:linkname MaximizeWindow C.MaximizeWindow -func MaximizeWindow() - -//go:linkname MinimizeWindow C.MinimizeWindow -func MinimizeWindow() - -//go:linkname RestoreWindow C.RestoreWindow -func RestoreWindow() - -//go:linkname SetWindowIcon C.SetWindowIcon -func SetWindowIcon(icon Image) - -//go:linkname SetWindowIcons C.SetWindowIcons -func SetWindowIcons(icons *Image, count c.Int) - -//go:linkname SetWindowTitle C.SetWindowTitle -func SetWindowTitle(title *c.Char) - -//go:linkname SetWindowPosition C.SetWindowPosition -func SetWindowPosition(x, y c.Int) - -//go:linkname SetWindowMonitor C.SetWindowMonitor -func SetWindowMonitor(monitor c.Int) - -//go:linkname SetWindowMinSize C.SetWindowMinSize -func SetWindowMinSize(width, height c.Int) - -//go:linkname SetWindowSize C.SetWindowSize -func SetWindowSize(width, height c.Int) - -//go:linkname SetWindowOpacity C.SetWindowOpacity -func SetWindowOpacity(opacity c.Float) - -//go:linkname SetWindowFocused C.SetWindowFocused -func SetWindowFocused() - -//go:linkname GetWindowHandle C.GetWindowHandle -func GetWindowHandle() c.Pointer - -//go:linkname GetScreenWidth C.GetScreenWidth -func GetScreenWidth() c.Int - -//go:linkname GetScreenHeight C.GetScreenHeight -func GetScreenHeight() c.Int - -// Get current render width (it considers HiDPI) -// -//go:linkname GetRenderWidth C.GetRenderWidth -func GetRenderWidth() c.Int - -// Get current render height (it considers HiDPI) -// -//go:linkname GetRenderHeight C.GetRenderHeight -func GetRenderHeight() c.Int - -// Get number of connected monitors -// -//go:linkname GetMonitorCount C.GetMonitorCount -func GetMonitorCount() c.Int - -// Get current connected monitor -// -//go:linkname GetCurrentMonitor C.GetCurrentMonitor -func GetCurrentMonitor() c.Int - -// Get specified monitor position -// -//go:linkname GetMonitorPosition C.GetMonitorPosition -func GetMonitorPosition(monitor c.Int) Vector2 - -//go:linkname GetMonitorWidth C.GetMonitorWidth -func GetMonitorWidth(monitor c.Int) c.Int - -//go:linkname GetMonitorHeight C.GetMonitorHeight -func GetMonitorHeight(monitor c.Int) c.Int - -//go:linkname GetMonitorPhysicalWidth C.GetMonitorPhysicalWidth -func GetMonitorPhysicalWidth(monitor c.Int) c.Int - -//go:linkname GetMonitorPhysicalHeight C.GetMonitorPhysicalHeight -func GetMonitorPhysicalHeight(monitor c.Int) c.Int - -//go:linkname GetMonitorRefreshRate C.GetMonitorRefreshRate -func GetMonitorRefreshRate(monitor c.Int) c.Int - -//go:linkname GetWindowPosition C.GetWindowPosition -func GetWindowPosition() Vector2 - -//go:linkname GetWindowScaleDPI C.GetWindowScaleDPI -func GetWindowScaleDPI() Vector2 - -//go:linkname GetMonitorName C.GetMonitorName -func GetMonitorName(monitor c.Int) *c.Char - -//go:linkname SetClipboardText C.SetClipboardText -func SetClipboardText(text *c.Char) - -//go:linkname GetClipboardText C.GetClipboardText -func GetClipboardText() *c.Char - -// Enable waiting for events on EndDrawing(), no automatic event polling -// -//go:linkname EnableEventWaiting C.EnableEventWaiting -func EnableEventWaiting() - -// Disable waiting for events on EndDrawing(), automatic events polling -// -//go:linkname DisableEventWaiting C.DisableEventWaiting -func DisableEventWaiting() - -// ----------------------------------------------------------------------------- -// Cursor-related functions - -//go:linkname ShowCursor C.ShowCursor -func ShowCursor() - -//go:linkname HideCursor C.HideCursor -func HideCursor() - -//go:linkname IsCursorHidden C.IsCursorHidden -func IsCursorHidden() bool - -//go:linkname EnableCursor C.EnableCursor -func EnableCursor() - -//go:linkname DisableCursor C.DisableCursor -func DisableCursor() - -//go:linkname IsCursorOnScreen C.IsCursorOnScreen -func IsCursorOnScreen() bool - -// ----------------------------------------------------------------------------- -// Shader management functions - -// ----------------------------------------------------------------------------- -// Screen-space-related functions - -// ----------------------------------------------------------------------------- -// Timing-related functions - -// Set target FPS (maximum) -// -//go:linkname SetTargetFPS C.SetTargetFPS -func SetTargetFPS(fps c.Int) - -// Returns current FPS -// -//go:linkname GetFPS C.GetFPS -func GetFPS() c.Int - -// Returns time in seconds for last frame drawn (delta time) -// -//go:linkname GetFrameTime C.GetFrameTime -func GetFrameTime() c.Float - -// Returns elapsed time in seconds since InitWindow() -// -//go:linkname GetTime C.GetTime -func GetTime() c.Double - -// ----------------------------------------------------------------------------- -// Custom frame control functions - -// NOTE: Those functions are intended for advance users that want full control over the frame processing -// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() -// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL - -// ----------------------------------------------------------------------------- -// Random values generation functions - -//go:linkname SetRandomSeed C.SetRandomSeed -func SetRandomSeed(seed c.Uint) - -//go:linkname GetRandomValue C.GetRandomValue -func GetRandomValue(min c.Int, max c.Int) c.Int - -// ----------------------------------------------------------------------------- -// Misc. functions - -// ----------------------------------------------------------------------------- -// Input-related functions: keyboard - -//go:linkname IsKeyPressed C.IsKeyPressed -func IsKeyPressed(key c.Int) bool - -//go:linkname IsKeyPressedRepeat C.IsKeyPressedRepeat -func IsKeyPressedRepeat(key c.Int) bool - -//go:linkname IsKeyDown C.IsKeyDown -func IsKeyDown(key c.Int) bool - -//go:linkname IsKeyReleased C.IsKeyReleased -func IsKeyReleased(key c.Int) bool - -//go:linkname IsKeyUp C.IsKeyUp -func IsKeyUp(key c.Int) bool - -//go:linkname GetKeyPressed C.GetKeyPressed -func GetKeyPressed() c.Int - -//go:linkname GetCharPressed C.GetCharPressed -func GetCharPressed() c.Int - -//go:linkname SetExitKey C.SetExitKey -func SetExitKey(key c.Int) - -// ----------------------------------------------------------------------------- -// Input-related functions: gamepads - -// ----------------------------------------------------------------------------- -// Input-related functions: mouse - -// ----------------------------------------------------------------------------- -// Input-related functions: touch - -// ----------------------------------------------------------------------------- -// Gestures and Touch Handling Functions (Module: rgestures) - -// ----------------------------------------------------------------------------- diff --git a/c/raylib/shape.go b/c/raylib/shape.go deleted file mode 100644 index 4e78b4c2..00000000 --- a/c/raylib/shape.go +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package raylib - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -// Color, 4 components, R8G8B8A8 (32bit) -// R, G, B, A uint8 -type Color uint32 - -const ( - LIGHTGRAY = Color(200 | 200<<8 | 200<<16 | 255<<24) // Light Gray - GRAY = Color(130 | 130<<8 | 130<<16 | 255<<24) // Gray - DARKGRAY = Color(80 | 80<<8 | 80<<16 | 255<<24) // Dark Gray - YELLOW = Color(253 | 249<<8 | 0<<16 | 255<<24) // Yellow - GOLD = Color(255 | 203<<8 | 0<<16 | 255<<24) // Gold - ORANGE = Color(255 | 161<<8 | 0<<16 | 255<<24) // Orange - PINK = Color(255 | 109<<8 | 194<<16 | 255<<24) // Pink - RED = Color(230 | 41<<8 | 55<<16 | 255<<24) // Red - MAROON = Color(190 | 33<<8 | 55<<16 | 255<<24) // Maroon - GREEN = Color(0 | 228<<8 | 48<<16 | 255<<24) // Green - LIME = Color(0 | 158<<8 | 47<<16 | 255<<24) // Lime - DARKGREEN = Color(0 | 117<<8 | 44<<16 | 255<<24) // Dark Green - SKYBLUE = Color(102 | 191<<8 | 255<<16 | 255<<24) // Sky Blue - BLUE = Color(0 | 121<<8 | 241<<16 | 255<<24) // Blue - - DARKBLUE = Color(0 | 82<<8 | 172<<16 | 255<<24) // Dark Blue - PURPLE = Color(200 | 122<<8 | 255<<16 | 255<<24) // Purple - VIOLET = Color(135 | 60<<8 | 190<<16 | 255<<24) // Violet - DARKPURPLE = Color(112 | 31<<8 | 126<<16 | 255<<24) // Dark Purple - BEIGE = Color(211 | 176<<8 | 131<<16 | 255<<24) // Beige - BROWN = Color(127 | 106<<8 | 79<<16 | 255<<24) // Brown - DARKBROWN = Color(76 | 63<<8 | 47<<16 | 255<<24) // Dark Brown - - WHITE = Color(255 | 255<<8 | 255<<16 | 255<<24) // White - BLACK = Color(0 | 0<<8 | 0<<16 | 255<<24) // Black - BLANK = Color(0 | 0<<8 | 0<<16 | 0<<24) // Blank (Transparent) - MAGENTA = Color(255 | 0<<8 | 255<<16 | 255<<24) // Magenta - RAYWHITE = Color(245 | 245<<8 | 245<<16 | 255<<24) // My own White (raylib logo) -) - -// Image, pixel data stored in CPU memory (RAM) -type Image struct { - Data c.Pointer // Image raw data - Width c.Int // Image base width - Height c.Int // Image base height - Mipmaps c.Int // Mipmap levels, 1 by default - Format c.Int // Data format (PixelFormat type) -} - -// Camera, defines position/orientation in 3d space -type Camera3D struct { - Position Vector3 // Camera position - Target Vector3 // Camera target it looks-at - Up Vector3 // Camera up vector (rotation over its axis) - Fovy float32 // Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic - Projection c.Int // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC -} - -type Camera = Camera3D // Camera type fallback, defaults to Camera3D - -// Camera2D, defines position/orientation in 2d space -type Camera2D struct { - Offset Vector2 // Camera offset (displacement from target) - Target Vector2 // Camera target (rotation and zoom origin) - Rotation float32 // Camera rotation in degrees - Zoom float32 // Camera zoom (scaling), should be 1.0f by default -} - -// Shader -type Shader struct { - Id c.Uint // Shader program id - Locs *c.Int // Shader locations array (RL_MAX_SHADER_LOCATIONS) -} - -// ----------------------------------------------------------------------------- -// Drawing-related functions - -// Set background color (framebuffer clear color) -// -//go:linkname ClearBackground C.ClearBackground -func ClearBackground(color Color) - -// Begin drawing (call before drawing anything) -// -//go:linkname BeginDrawing C.BeginDrawing -func BeginDrawing() - -// End drawing and swap buffers (call after drawing) -// -//go:linkname EndDrawing C.EndDrawing -func EndDrawing() - -// Begin 2D mode with custom camera (2D) -// -//go:linkname BeginMode2D C.BeginMode2D -func BeginMode2D(camera Camera2D) - -// End mode (2D) -// -//go:linkname EndMode2D C.EndMode2D -func EndMode2D() - -// Begin 3D mode with custom camera (3D) -// -//go:linkname BeginMode3D C.BeginMode3D -func BeginMode3D(camera Camera3D) - -// End mode (3D) -// -//go:linkname EndMode3D C.EndMode3D -func EndMode3D() - -// Begin drawing to render texture -//-go:linkname BeginTextureMode C.BeginTextureMode -//func BeginTextureMode(target RenderTexture2D) - -// End drawing to render texture -// -//go:linkname EndTextureMode C.EndTextureMode -func EndTextureMode() - -// Begin custom shader drawing -// -//go:linkname BeginShaderMode C.BeginShaderMode -func BeginShaderMode(shader Shader) - -// End custom shader drawing (use default shader) -// -//go:linkname EndShaderMode C.EndShaderMode -func EndShaderMode() - -// Color blending modes (pre-defined) -type BlendMode c.Int - -const ( - BLEND_ALPHA BlendMode = iota // Blend textures considering alpha (default) - BLEND_ADDITIVE // Blend textures adding colors - BLEND_MULTIPLIED // Blend textures multiplying colors - BLEND_ADD_COLORS // Blend textures adding colors (alternative) - BLEND_SUBTRACT_COLORS // Blend textures subtracting colors (alternative) - BLEND_ALPHA_PREMULTIPLY // Blend premultiplied textures considering alpha - BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendFactors()) - BLEND_CUSTOM_SEPARATE // Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) -) - -// Begin blending mode (alpha, additive, multiplied, subtract, custom) -// -//go:linkname BeginBlendMode C.BeginBlendMode -func BeginBlendMode(mode BlendMode) - -// End blending mode (reset to default: alpha blending) -// -//go:linkname EndBlendMode C.EndBlendMode -func EndBlendMode() - -// Begin scissor mode (define screen area for following drawing) -// -//go:linkname BeginScissorMode C.BeginScissorMode -func BeginScissorMode(x, y, width, height c.Int) - -// End scissor mode -// -//go:linkname EndScissorMode C.EndScissorMode -func EndScissorMode() - -// ----------------------------------------------------------------------------- -// VR stereo config functions for VR simulator - -// ----------------------------------------------------------------------------- -// Camera System Functions (Module: rcamera) - -// Update camera position for selected mode -// -//go:linkname UpdateCamera C.UpdateCamera -func UpdateCamera(camera *Camera, mode c.Int) - -// Update camera movement/rotation -// -//go:linkname UpdateCameraPro C.UpdateCameraPro -func UpdateCameraPro(camera *Camera, movement, rotation Vector3, zoom float32) - -// ----------------------------------------------------------------------------- - -// Draw a color-filled rectangle -// -//go:linkname DrawRectangle C.DrawRectangle -func DrawRectangle(posX, posY, width, height c.Int, color Color) - -// Draw text (using default font) -// -//go:linkname DrawText C.DrawText -func DrawText(text *c.Char, posX, posY, fontSize c.Int, color Color) - -// ----------------------------------------------------------------------------- diff --git a/c/raylib/utils.go b/c/raylib/utils.go deleted file mode 100644 index 80d22b1a..00000000 --- a/c/raylib/utils.go +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package raylib - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) -// -//go:linkname TraceLog C.TraceLog -func TraceLog(logLevel int, text *c.Char, __llgo_va_list ...any) - -// Set the current threshold (minimum) log level -// -//go:linkname SetTraceLogLevel C.SetTraceLogLevel -func SetTraceLogLevel(logLevel int) - -// ----------------------------------------------------------------------------- -// Set custom callbacks - -// ----------------------------------------------------------------------------- -// Files management functions - -// ----------------------------------------------------------------------------- -// File system functions - -// Check if file exists -// -//go:linkname FileExists C.FileExists -func FileExists(fileName *c.Char) bool - -// Check if a directory path exists -// -//go:linkname DirectoryExists C.DirectoryExists -func DirectoryExists(dirPath *c.Char) bool - -// Check file extension (including point: .png, .wav) -// -//go:linkname IsFileExtension C.IsFileExtension -func IsFileExtension(fileName *c.Char, ext *c.Char) bool - -// ----------------------------------------------------------------------------- -// Compression/Encoding functionality - -// ----------------------------------------------------------------------------- -// Automation events functionality - -// ----------------------------------------------------------------------------- diff --git a/c/setjmp/setjmp.go b/c/setjmp/setjmp.go deleted file mode 100644 index c4bccb18..00000000 --- a/c/setjmp/setjmp.go +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package setjmp - -// #include -import "C" - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "decl" -) - -type ( - JmpBuf = C.jmp_buf - SigjmpBuf = C.sigjmp_buf -) - -// ----------------------------------------------------------------------------- - -//go:linkname Setjmp C.setjmp -func Setjmp(env *JmpBuf) c.Int - -//go:linkname Longjmp C.longjmp -func Longjmp(env *JmpBuf, val c.Int) - -// ----------------------------------------------------------------------------- - -//go:linkname Siglongjmp C.siglongjmp -func Siglongjmp(env *SigjmpBuf, val c.Int) - -// ----------------------------------------------------------------------------- diff --git a/c/setjmp/setjmp_linux.go b/c/setjmp/setjmp_linux.go deleted file mode 100644 index 17bad916..00000000 --- a/c/setjmp/setjmp_linux.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build linux - -package setjmp - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -//go:linkname Sigsetjmp C.__sigsetjmp -func Sigsetjmp(env *SigjmpBuf, savemask c.Int) c.Int diff --git a/c/setjmp/setjmp_other.go b/c/setjmp/setjmp_other.go deleted file mode 100644 index a83d513d..00000000 --- a/c/setjmp/setjmp_other.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build !linux - -package setjmp - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -//go:linkname Sigsetjmp C.sigsetjmp -func Sigsetjmp(env *SigjmpBuf, savemask c.Int) c.Int diff --git a/c/setjmp/trycatch/_code/demo.cpp b/c/setjmp/trycatch/_code/demo.cpp deleted file mode 100644 index 92f82eb6..00000000 --- a/c/setjmp/trycatch/_code/demo.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -extern "C" void throwCppException() { - throw std::runtime_error("C++ exception"); -} diff --git a/c/setjmp/trycatch/_code/try_catch.cpp b/c/setjmp/trycatch/_code/try_catch.cpp deleted file mode 100644 index 0b160194..00000000 --- a/c/setjmp/trycatch/_code/try_catch.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -extern "C" void throwCppException(); - -int main() { - try { - throwCppException(); - } catch (std::exception& e) { - printf("Hi, %s\n", e.what()); - } - return 0; -} diff --git a/c/setjmp/trycatch/demo.go b/c/setjmp/trycatch/demo.go deleted file mode 100644 index 79ae2ce1..00000000 --- a/c/setjmp/trycatch/demo.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package trycatch - -import ( - _ "unsafe" -) - -const ( - LLGoPackage = "link: c++" -) - -//go:linkname ThrowCppException C.throwCppException -func ThrowCppException() diff --git a/c/setjmp/trycatch/llgo.cfg b/c/setjmp/trycatch/llgo.cfg deleted file mode 100644 index d7d46372..00000000 --- a/c/setjmp/trycatch/llgo.cfg +++ /dev/null @@ -1,8 +0,0 @@ -{ - "cl": [ - "clang -emit-llvm -S -o demo.ll -c _code/demo.cpp", - "clang -emit-llvm -S -o _code/llgo_autogen.ll -c _code/try_catch.cpp", - "llgen .", - "rm llgo_autogen.lla; zip llgo_autogen.lla llgo_autogen.ll demo.ll", - ] -} diff --git a/c/signal/signal.go b/c/signal/signal.go deleted file mode 100644 index 5be95f97..00000000 --- a/c/signal/signal.go +++ /dev/null @@ -1,32 +0,0 @@ -package signal - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) -import "C" - -const ( - LLGoPackage = "link" -) - -//llgo:type C -type SignalHandler func(c.Int) - -//llgo:type C -type sigactiont struct { - handler SignalHandler - tramp unsafe.Pointer - mask c.Int - flags c.Int -} - -//go:linkname sigaction C.sigaction -func sigaction(sig c.Int, act, old *sigactiont) c.Int - -func Signal(sig c.Int, hanlder SignalHandler) c.Int { - var act sigactiont - act.handler = hanlder - return sigaction(sig, &act, nil) -} diff --git a/c/sqlite/README.md b/c/sqlite/README.md deleted file mode 100644 index 65c74f02..00000000 --- a/c/sqlite/README.md +++ /dev/null @@ -1,31 +0,0 @@ -LLGo wrapper of sqlite -===== - -## How to install - -### on macOS (Homebrew) - -```sh -brew install sqlite3 -``` - -### on Linux (Debian/Ubuntu) - -```sh -apt-get install -y libsqlite3-dev -``` - -## Demos - -The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it): - -* [sqlitedemo](_demo/sqlitedemo/demo.go): a basic sqlite demo - -### How to run demos - -To run the demos in directory `_demo`: - -```sh -cd # eg. cd _demo/sqlitedemo -llgo run . -``` diff --git a/c/sqlite/_demo/sqlitedemo/demo.go b/c/sqlite/_demo/sqlitedemo/demo.go deleted file mode 100644 index c78ed2a3..00000000 --- a/c/sqlite/_demo/sqlitedemo/demo.go +++ /dev/null @@ -1,62 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/os" - "github.com/goplus/llgo/c/sqlite" -) - -func main() { - os.Remove(c.Str("test.db")) - - db, err := sqlite.Open(c.Str("test.db")) - check(err, db, "sqlite: Open") - - err = db.Exec(c.Str("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)"), nil, nil, nil) - check(err, db, "sqlite: Exec CREATE TABLE") - - stmt, err := db.PrepareV3("INSERT INTO users (id, name) VALUES (?, ?)", 0, nil) - check(err, db, "sqlite: PrepareV3 INSERT") - - stmt.BindInt(1, 100) - stmt.BindText(2, c.Str("Hello World"), -1, nil) - - err = stmt.Step() - checkDone(err, db, "sqlite: Step INSERT 1") - - stmt.Reset() - stmt.BindInt(1, 200) - stmt.BindText(2, c.Str("This is llgo"), -1, nil) - - err = stmt.Step() - checkDone(err, db, "sqlite: Step INSERT 2") - - stmt.Close() - - stmt, err = db.PrepareV3("SELECT * FROM users", 0, nil) - check(err, db, "sqlite: PrepareV3 SELECT") - - for { - if err = stmt.Step(); err != sqlite.HasRow { - break - } - c.Printf(c.Str("==> id=%d, name=%s\n"), stmt.ColumnInt(0), stmt.ColumnText(1)) - } - checkDone(err, db, "sqlite: Step done") - - stmt.Close() - db.Close() -} - -func check(err sqlite.Errno, db *sqlite.Sqlite3, at string) { - if err != sqlite.OK { - c.Printf(c.Str("==> %s Error: (%d) %s\n"), c.AllocaCStr(at), err, db.Errmsg()) - c.Exit(1) - } -} - -func checkDone(err sqlite.Errno, db *sqlite.Sqlite3, at string) { - if err != sqlite.Done { - check(err, db, at) - } -} diff --git a/c/sqlite/sqlite.go b/c/sqlite/sqlite.go deleted file mode 100644 index af60f323..00000000 --- a/c/sqlite/sqlite.go +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package sqlite - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs sqlite3); -lsqlite3" -) - -// llgo:type C -type Sqlite3 struct { - Unused [8]byte -} - -// llgo:type C -type Stmt struct { - Unused [8]byte -} - -// ----------------------------------------------------------------------------- - -type Errno c.Int - -const ( - OK Errno = 0 // Successful result - - Error Errno = 1 // Generic error - ErrInternal Errno = 2 // Internal logic error in SQLite - ErrPerm Errno = 3 // Access permission denied - ErrAbort Errno = 4 // Callback routine requested an abort - ErrBusy Errno = 5 // The database file is locked - ErrLocked Errno = 6 // A table in the database is locked - ErrNomem Errno = 7 // A malloc() failed - ErrReadOnly Errno = 8 // Attempt to write a readonly database - ErrInterrupt Errno = 9 // Operation terminated by sqlite3_interrupt() - ErrIo Errno = 10 // Some kind of disk I/O error occurred - ErrCorrupt Errno = 11 // The database disk image is malformed - ErrNotfound Errno = 12 // Unknown opcode in sqlite3_file_control() - ErrFull Errno = 13 // Insertion failed because database is full - ErrCantopen Errno = 14 // Unable to open the database file - ErrProtocol Errno = 15 // Database lock protocol error - _ErrEmpty Errno = 16 // Internal use only - ErrSchema Errno = 17 // The database schema changed - ErrToobig Errno = 18 // String or BLOB exceeds size limit - ErrConstraint Errno = 19 // Abort due to constraint violation - ErrMismatch Errno = 20 // Data type mismatch - ErrMisuse Errno = 21 // Library used incorrectly - ErrNolfs Errno = 22 // Uses OS features not supported on host - ErrAuth Errno = 23 // Authorization denied - _ErrFormat Errno = 24 // Not used - ErrRange Errno = 25 // 2nd parameter to sqlite3_bind out of range - ErrNotadb Errno = 26 // File opened that is not a database file - ErrNotice Errno = 27 // Notifications from sqlite3_log() - ErrWarning Errno = 28 // Warnings from sqlite3_log() - - HasRow Errno = 100 // sqlite3_step() has another row ready - Done Errno = 101 // sqlite3_step() has finished executing -) - -// llgo:link Errno.Errstr C.sqlite3_errstr -func (err Errno) Errstr() *c.Char { return nil } - -// llgo:link (*Sqlite3).Errmsg C.sqlite3_errmsg -func (db *Sqlite3) Errmsg() *c.Char { return nil } - -// llgo:link (*Sqlite3).Errcode C.sqlite3_errcode -func (db *Sqlite3) Errcode() Errno { return 0 } - -// llgo:link (*Sqlite3).ExtendedErrcode C.sqlite3_extended_errcode -func (db *Sqlite3) ExtendedErrcode() Errno { return 0 } - -// ----------------------------------------------------------------------------- - -//go:linkname doOpen C.sqlite3_open -func doOpen(filename *c.Char, ppDb **Sqlite3) Errno - -//go:linkname doOpenV2 C.sqlite3_open_v2 -func doOpenV2(filename *c.Char, ppDb **Sqlite3, flags OpenFlags, zVfs *c.Char) Errno - -// OpenFlags represents SQLite open flags. -type OpenFlags c.Int - -const ( - OpenReadOnly OpenFlags = 0x00000001 - OpenReadWrite OpenFlags = 0x00000002 - OpenCreate OpenFlags = 0x00000004 - OpenDeleteOnClose OpenFlags = 0x00000008 // VFS only - OpenExclusive OpenFlags = 0x00000010 // VFS only - OpenAutoProxy OpenFlags = 0x00000020 // VFS only - OpenUri OpenFlags = 0x00000040 - OpenMemory OpenFlags = 0x00000080 - OpenMainDb OpenFlags = 0x00000100 // VFS only - OpenTempDb OpenFlags = 0x00000200 // VFS only - OpenTransientDb OpenFlags = 0x00000400 // VFS only - OpenMainJournal OpenFlags = 0x00000800 // VFS only - OpenTempJournal OpenFlags = 0x00001000 // VFS only - OpenSubJournal OpenFlags = 0x00002000 // VFS only - OpenSuperJournal OpenFlags = 0x00004000 // VFS only - OpenNoMutex OpenFlags = 0x00008000 - OpenFullMutex OpenFlags = 0x00010000 - OpenSharedCache OpenFlags = 0x00020000 - OpenPrivateCache OpenFlags = 0x00040000 - OpenWal OpenFlags = 0x00080000 // VFS only - OpenNoFollow OpenFlags = 0x01000000 - OpenExResCode OpenFlags = 0x02000000 // Extended result codes -) - -// Opening A New Database Connection -// filename: Database filename (UTF-8) -func Open(filename *c.Char) (db *Sqlite3, err Errno) { - err = doOpen(filename, &db) - return -} - -// Opening A New Database Connection -// filename: Database filename (UTF-8) -// zVfs: Name of VFS module to use -func OpenV2(filename *c.Char, flags OpenFlags, zVfs *c.Char) (db *Sqlite3, err Errno) { - err = doOpenV2(filename, &db, flags, zVfs) - return -} - -// Closing A Database Connection -// -// llgo:link (*Sqlite3).Close C.sqlite3_close -func (db *Sqlite3) Close() Errno { return 0 } - -// Closing A Database Connection -// -// llgo:link (*Sqlite3).CloseV2 C.sqlite3_close_v2 -func (db *Sqlite3) CloseV2() Errno { return 0 } - -// ----------------------------------------------------------------------------- - -// llgo:link (*Sqlite3).doPrepare C.sqlite3_prepare -func (*Sqlite3) doPrepare(*c.Char, c.Int, **Stmt, **c.Char) Errno { - return 0 -} - -// llgo:link (*Sqlite3).doPrepareV2 C.sqlite3_prepare_v2 -func (*Sqlite3) doPrepareV2(*c.Char, c.Int, **Stmt, **c.Char) Errno { - return 0 -} - -// llgo:link (*Sqlite3).doPrepareV3 C.sqlite3_prepare_v3 -func (*Sqlite3) doPrepareV3(*c.Char, c.Int, PrepareFlags, **Stmt, **c.Char) Errno { - return 0 -} - -// PrepareFlags represents SQLite prepare flags. -type PrepareFlags c.Int - -const ( - PreparePersistent PrepareFlags = 0x01 - PrepareNormalize PrepareFlags = 0x02 - PrepareNoVtab PrepareFlags = 0x04 -) - -// Compiling An SQL Statement -// tail: Pointer to unused portion of sql -func (db *Sqlite3) Prepare(sql string, tail **c.Char) (stmt *Stmt, err Errno) { - err = db.doPrepare(c.GoStringData(sql), c.Int(len(sql)), &stmt, tail) - return -} - -func (db *Sqlite3) PrepareV2(sql string, tail **c.Char) (stmt *Stmt, err Errno) { - err = db.doPrepareV2(c.GoStringData(sql), c.Int(len(sql)), &stmt, tail) - return -} - -func (db *Sqlite3) PrepareV3(sql string, flags PrepareFlags, tail **c.Char) (stmt *Stmt, err Errno) { - err = db.doPrepareV3(c.GoStringData(sql), c.Int(len(sql)), flags, &stmt, tail) - return -} - -// Destroy A Prepared Statement Object -// -// llgo:link (*Stmt).Close C.sqlite3_finalize -func (stmt *Stmt) Close() Errno { return 0 } - -// ----------------------------------------------------------------------------- - -// llgo:link (*Stmt).BindInt C.sqlite3_bind_int -func (*Stmt) BindInt(idx c.Int, val c.Int) Errno { return 0 } - -// llgo:link (*Stmt).BindInt64 C.sqlite3_bind_int64 -func (*Stmt) BindInt64(idx c.Int, val int64) Errno { return 0 } - -/* -const ( - Static = (func(Pointer))(nil) // val is a static string - Transient = (func(Pointer))(-1) // val is a transient (temporary) string -) -*/ - -// llgo:link (*Stmt).BindText C.sqlite3_bind_text -func (*Stmt) BindText(idx c.Int, val *c.Char, nByte c.Int, destructor func(c.Pointer)) Errno { - return 0 -} - -// ----------------------------------------------------------------------------- - -// Reset A Prepared Statement Object -// -// llgo:link (*Stmt).Reset C.sqlite3_reset -func (stmt *Stmt) Reset() Errno { - return 0 -} - -// Evaluate An SQL Statement -// -// llgo:link (*Stmt).Step C.sqlite3_step -func (*Stmt) Step() Errno { return 0 } - -// ----------------------------------------------------------------------------- - -// llgo:link (*Stmt).ColumnCount C.sqlite3_column_count -func (stmt *Stmt) ColumnCount() c.Int { return 0 } - -// llgo:link (*Stmt).ColumnName C.sqlite3_column_name -func (stmt *Stmt) ColumnName(idx c.Int) *c.Char { return nil } - -// llgo:link (*Stmt).ColumnInt C.sqlite3_column_int -func (stmt *Stmt) ColumnInt(idx c.Int) c.Int { return 0 } - -// llgo:link (*Stmt).ColumnInt64 C.sqlite3_column_int64 -func (stmt *Stmt) ColumnInt64(idx c.Int) int64 { return 0 } - -// llgo:link (*Stmt).ColumnText C.sqlite3_column_text -func (stmt *Stmt) ColumnText(idx c.Int) *c.Char { return nil } - -// ----------------------------------------------------------------------------- - -// One-Step Query Execution Interface -// -// llgo:link (*Sqlite3).Exec C.sqlite3_exec -func (*Sqlite3) Exec( - sql *c.Char, callback func(arg c.Pointer, resultCols c.Int, colVals, colNames **c.Char) c.Int, - arg c.Pointer, errmsg **c.Char) Errno { - return 0 -} - -// ----------------------------------------------------------------------------- diff --git a/c/sync/atomic/atomic.go b/c/sync/atomic/atomic.go deleted file mode 100644 index 395de99c..00000000 --- a/c/sync/atomic/atomic.go +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package atomic - -import ( - "unsafe" -) - -const ( - LLGoPackage = "decl" -) - -type valtype interface { - ~int | ~uint | ~uintptr | ~int32 | ~uint32 | ~int64 | ~uint64 | ~unsafe.Pointer -} - -// llgo:link Add llgo.atomicAdd -func Add[T valtype](ptr *T, v T) T { return v } - -// llgo:link Sub llgo.atomicSub -func Sub[T valtype](ptr *T, v T) T { return v } - -// llgo:link And llgo.atomicAnd -func And[T valtype](ptr *T, v T) T { return v } - -// llgo:link NotAnd llgo.atomicNand -func NotAnd[T valtype](ptr *T, v T) T { return v } - -// llgo:link Or llgo.atomicOr -func Or[T valtype](ptr *T, v T) T { return v } - -// llgo:link Xor llgo.atomicXor -func Xor[T valtype](ptr *T, v T) T { return v } - -// llgo:link Max llgo.atomicMax -func Max[T valtype](ptr *T, v T) T { return v } - -// llgo:link Min llgo.atomicMin -func Min[T valtype](ptr *T, v T) T { return v } - -// llgo:link UMax llgo.atomicUMax -func UMax[T valtype](ptr *T, v T) T { return v } - -// llgo:link UMin llgo.atomicUMin -func UMin[T valtype](ptr *T, v T) T { return v } - -// llgo:link Load llgo.atomicLoad -func Load[T valtype](ptr *T) T { return *ptr } - -// llgo:link Store llgo.atomicStore -func Store[T valtype](ptr *T, v T) {} - -// llgo:link Exchange llgo.atomicXchg -func Exchange[T valtype](ptr *T, v T) T { return v } - -// llgo:link CompareAndExchange llgo.atomicCmpXchg -func CompareAndExchange[T valtype](ptr *T, old, new T) (T, bool) { return old, false } diff --git a/c/sys/_demo/selectdemo/select.go b/c/sys/_demo/selectdemo/select.go deleted file mode 100644 index eaff1c80..00000000 --- a/c/sys/_demo/selectdemo/select.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/os" - "github.com/goplus/llgo/c/sys" -) - -func main() { - var readFds sys.FdSet - sys.FD_ZERO(&readFds) - sys.FD_SET(0, &readFds) - - var tv sys.Timeval - tv.Sec = 5 - tv.Usec = 0 - - c.Printf(c.Str("Waiting for input on stdin...\n")) - ret := sys.Select(1, &readFds, nil, nil, &tv) - if ret == -1 { - c.Perror(c.Str("select error")) - c.Exit(1) - } else if ret == 0 { - c.Printf(c.Str("Timeout occurred! No data after 5 seconds.\n")) - } else { - if sys.FD_ISSET(0, &readFds) != 0 { - var buffer [100]c.Char - n := os.Read(0, c.Pointer(&buffer[:][0]), unsafe.Sizeof(buffer)-1) - if n == -1 { - c.Perror(c.Str("read error")) - c.Exit(1) - } else if n == 0 { - c.Printf(c.Str("End of file\n")) - } else { - buffer[n] = c.Char(0) - c.Printf(c.Str("Read %ld bytes: %s\n"), n, &buffer[0]) - } - } - } -} diff --git a/c/sys/_demo/selectdemo2/select2.go b/c/sys/_demo/selectdemo2/select2.go deleted file mode 100644 index ada4418a..00000000 --- a/c/sys/_demo/selectdemo2/select2.go +++ /dev/null @@ -1,88 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/net" - "github.com/goplus/llgo/c/os" - "github.com/goplus/llgo/c/sys" -) - -const ( - SERVER_IP = "110.242.68.66" // Get the IP address by ping baidu.com - SERVER_PORT = 80 - BUFFER_SIZE = 4096 * 1024 -) - -func main() { - var server net.SockaddrIn - - sendBuf := c.Str("GET / HTTP/1.1\r\nHost: baidu.com\r\n\r\n") - var recvBuf [BUFFER_SIZE]c.Char - var bytes_sent, bytes_received c.Int - - // create net - sock := net.Socket(net.AF_INET, net.SOCK_STREAM, 0) - if sock < 0 { - c.Perror(c.Str("Socket creation failed")) - return - } - - // set server addr - c.Memset(c.Pointer(&server), 0, unsafe.Sizeof(server)) - server.Family = net.AF_INET - server.Port = net.Htons(SERVER_PORT) - server.Addr.Addr = net.InetAddr(c.Str(SERVER_IP)) - - // connect to server - if net.Connect(sock, (*net.SockAddr)(c.Pointer(&server)), c.Uint(unsafe.Sizeof(server))) < 0 { - c.Perror(c.Str("Connect failed")) - return - } - - var writefds, readfds sys.FdSet - var timeout sys.Timeval - - // Monitor socket writes - sys.FD_ZERO(&writefds) - sys.FD_SET(sock, &writefds) - timeout.Sec = 10 - timeout.Usec = 0 - - // Use select to monitor the readiness of writes - if sys.Select(sock+1, nil, &writefds, nil, &timeout) > 0 { - if sys.FD_ISSET(sock, &writefds) != 0 { - bytes_sent = c.Int(net.Send(sock, c.Pointer(sendBuf), c.Strlen(sendBuf), 0)) - if bytes_sent < 0 { - c.Perror(c.Str("send failed")) - return - } - } - } else { - c.Perror(c.Str("Select write error")) - return - } - - // Monitor socket reads - sys.FD_ZERO(&readfds) - sys.FD_SET(sock, &readfds) - - // Use select to monitor the readiness of the read operation - if sys.Select(sock+1, &readfds, nil, nil, &timeout) > 0 { - if sys.FD_ISSET(sock, &writefds) != -1 { - bytes_received = c.Int(net.Recv(sock, c.Pointer(&recvBuf[:][0]), BUFFER_SIZE-1, 0)) - if bytes_received < 0 { - c.Perror(c.Str("receive failed")) - return - } - recvBuf[bytes_received] = c.Char(0) - c.Printf(c.Str("Received:\n%s\n"), &recvBuf[0]) - } - } else { - c.Perror(c.Str("Select read error")) - return - } - - os.Close(sock) -} diff --git a/c/sys/_wrap/fddef.c b/c/sys/_wrap/fddef.c deleted file mode 100644 index 26ff237b..00000000 --- a/c/sys/_wrap/fddef.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -int llgo_FD_ISSET(int n, fd_set *fd) { - return FD_ISSET(n, fd); -} - -void llgo_FD_SET(int n, fd_set *fd) { - FD_SET(n, fd); -} - -void llgo_FD_ZERO(fd_set *fd) { - FD_ZERO(fd); -} diff --git a/c/sys/select.go b/c/sys/select.go deleted file mode 100644 index 2478e9b5..00000000 --- a/c/sys/select.go +++ /dev/null @@ -1,34 +0,0 @@ -package sys - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/syscall" -) - -const ( - LLGoFiles = "_wrap/fddef.c" - LLGoPackage = "link" -) - -// ----------------------------------------------------------------------------- - -type ( - FdSet = syscall.FdSet - Timeval = syscall.Timeval -) - -//go:linkname FD_ZERO C.llgo_FD_ZERO -func FD_ZERO(fds *FdSet) - -//go:linkname FD_SET C.llgo_FD_SET -func FD_SET(fd c.Int, fds *FdSet) - -//go:linkname FD_ISSET C.llgo_FD_ISSET -func FD_ISSET(fd c.Int, fds *FdSet) c.Int - -//go:linkname Select C.select -func Select(n c.Int, fdsRead, fdsWrite, fdsError *FdSet, timeout *Timeval) c.Int - -// ----------------------------------------------------------------------------- diff --git a/c/syscall/syscall.go b/c/syscall/syscall.go deleted file mode 100644 index e9a08e06..00000000 --- a/c/syscall/syscall.go +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package syscall - -const ( - LLGoPackage = "noinit" -) - -type Errno = uintptr - -// A Signal is a number describing a process signal. -// It implements the os.Signal interface. -type Signal = int - -// Unix returns the time stored in ts as seconds plus nanoseconds. -func (ts *Timespec) Unix() (sec int64, nsec int64) { - return int64(ts.Sec), int64(ts.Nsec) -} diff --git a/c/syscall/unix/at_sysnum_darwin.go b/c/syscall/unix/at_sysnum_darwin.go deleted file mode 100644 index 208ff34d..00000000 --- a/c/syscall/unix/at_sysnum_darwin.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -const AT_REMOVEDIR = 0x80 -const AT_SYMLINK_NOFOLLOW = 0x0020 - -const UTIME_OMIT = -0x2 diff --git a/c/syscall/unix/at_sysnum_dragonfly.go b/c/syscall/unix/at_sysnum_dragonfly.go deleted file mode 100644 index da9fded2..00000000 --- a/c/syscall/unix/at_sysnum_dragonfly.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -const AT_REMOVEDIR = 0x2 -const AT_SYMLINK_NOFOLLOW = 0x1 - -const UTIME_OMIT = -0x1 diff --git a/c/syscall/unix/at_sysnum_freebsd.go b/c/syscall/unix/at_sysnum_freebsd.go deleted file mode 100644 index 7ecbf875..00000000 --- a/c/syscall/unix/at_sysnum_freebsd.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -const ( - AT_REMOVEDIR = 0x800 - AT_SYMLINK_NOFOLLOW = 0x200 - - UTIME_OMIT = -0x2 -) diff --git a/c/syscall/unix/at_sysnum_linux.go b/c/syscall/unix/at_sysnum_linux.go deleted file mode 100644 index 7d3816e0..00000000 --- a/c/syscall/unix/at_sysnum_linux.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -const ( - AT_EACCESS = 0x200 - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 - AT_SYMLINK_NOFOLLOW = 0x100 - - UTIME_OMIT = 0x3ffffffe -) diff --git a/c/syscall/unix/at_sysnum_netbsd.go b/c/syscall/unix/at_sysnum_netbsd.go deleted file mode 100644 index e9575310..00000000 --- a/c/syscall/unix/at_sysnum_netbsd.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -const AT_REMOVEDIR = 0x800 -const AT_SYMLINK_NOFOLLOW = 0x200 - -const UTIME_OMIT = (1 << 30) - 2 diff --git a/c/syscall/unix/at_sysnum_openbsd.go b/c/syscall/unix/at_sysnum_openbsd.go deleted file mode 100644 index a26c9072..00000000 --- a/c/syscall/unix/at_sysnum_openbsd.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -const AT_REMOVEDIR = 0x08 -const AT_SYMLINK_NOFOLLOW = 0x02 - -const UTIME_OMIT = -0x1 diff --git a/c/syscall/unix/unix.go b/c/syscall/unix/unix.go deleted file mode 100644 index ab5144f6..00000000 --- a/c/syscall/unix/unix.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package unix - -const ( - LLGoPackage = "decl" -) diff --git a/c/syscall/zerrors_aix_ppc64.go b/c/syscall/zerrors_aix_ppc64.go deleted file mode 100644 index 5544610e..00000000 --- a/c/syscall/zerrors_aix_ppc64.go +++ /dev/null @@ -1,1153 +0,0 @@ -// mkerrors.sh -maix64 -// Code generated by the command above; DO NOT EDIT. - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -maix64 _const.go - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_BYPASS = 0x19 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_INTF = 0x14 - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_MAX = 0x1e - AF_NDD = 0x17 - AF_NETWARE = 0x16 - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_RIF = 0x15 - AF_ROUTE = 0x11 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_802_3 = 0x6 - ARPHRD_802_5 = 0x6 - ARPHRD_ETHER = 0x1 - ARPHRD_FDDI = 0x1 - B0 = 0x0 - B110 = 0x3 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2400 = 0xb - B300 = 0x7 - B38400 = 0xf - B4800 = 0xc - B50 = 0x1 - B600 = 0x8 - B75 = 0x2 - B9600 = 0xd - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIOCGIFCONF = -0x3fef96dc - CSIZE = 0x30 - CSMAP_DIR = "/usr/lib/nls/csmap/" - CSTART = '\021' - CSTOP = '\023' - CSTOPB = 0x40 - CSUSP = 0x1a - ECHO = 0x8 - ECHOCTL = 0x20000 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x80000 - ECHONL = 0x40 - ECHOPRT = 0x40000 - ECH_ICMPID = 0x2 - ETHERNET_CSMACD = 0x6 - EVENP = 0x80 - EXCONTINUE = 0x0 - EXDLOK = 0x3 - EXIO = 0x2 - EXPGIO = 0x0 - EXRESUME = 0x2 - EXRETURN = 0x1 - EXSIG = 0x4 - EXTA = 0xe - EXTB = 0xf - EXTRAP = 0x1 - EYEC_RTENTRYA = 0x257274656e747241 - EYEC_RTENTRYF = 0x257274656e747246 - E_ACC = 0x0 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0xfffe - FLUSHBAND = 0x40 - FLUSHLOW = 0x8 - FLUSHO = 0x100000 - FLUSHR = 0x1 - FLUSHRW = 0x3 - FLUSHW = 0x2 - F_CLOSEM = 0xa - F_DUP2FD = 0xe - F_DUPFD = 0x0 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETLK64 = 0xb - F_GETOWN = 0x8 - F_LOCK = 0x1 - F_OK = 0x0 - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLK64 = 0xc - F_SETLKW = 0xd - F_SETLKW64 = 0xd - F_SETOWN = 0x9 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_TSTLK = 0xf - F_ULOCK = 0x0 - F_UNLCK = 0x3 - F_WRLCK = 0x2 - HUPCL = 0x400 - ICANON = 0x2 - ICMP6_FILTER = 0x26 - ICMP6_SEC_SEND_DEL = 0x46 - ICMP6_SEC_SEND_GET = 0x47 - ICMP6_SEC_SEND_SET = 0x44 - ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45 - ICRNL = 0x100 - IEXTEN = 0x200000 - IFA_FIRSTALIAS = 0x2000 - IFA_ROUTE = 0x1 - IFF_64BIT = 0x4000000 - IFF_ALLCAST = 0x20000 - IFF_ALLMULTI = 0x200 - IFF_BPF = 0x8000000 - IFF_BRIDGE = 0x40000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x80c52 - IFF_CHECKSUM_OFFLOAD = 0x10000000 - IFF_D1 = 0x8000 - IFF_D2 = 0x4000 - IFF_D3 = 0x2000 - IFF_D4 = 0x1000 - IFF_DEBUG = 0x4 - IFF_DEVHEALTH = 0x4000 - IFF_DO_HW_LOOPBACK = 0x10000 - IFF_GROUP_ROUTING = 0x2000000 - IFF_IFBUFMGT = 0x800000 - IFF_LINK0 = 0x100000 - IFF_LINK1 = 0x200000 - IFF_LINK2 = 0x400000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x80000 - IFF_NOARP = 0x80 - IFF_NOECHO = 0x800 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_PSEG = 0x40000000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SNAP = 0x8000 - IFF_TCP_DISABLE_CKSUM = 0x20000000 - IFF_TCP_NOCKSUM = 0x1000000 - IFF_UP = 0x1 - IFF_VIPA = 0x80000000 - IFNAMSIZ = 0x10 - IFO_FLUSH = 0x1 - IFT_1822 = 0x2 - IFT_AAL5 = 0x31 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ATM = 0x25 - IFT_CEPT = 0x13 - IFT_CLUSTER = 0x3e - IFT_DS3 = 0x1e - IFT_EON = 0x19 - IFT_ETHER = 0x6 - IFT_FCS = 0x3a - IFT_FDDI = 0xf - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_GIFTUNNEL = 0x3c - IFT_HDH1822 = 0x3 - IFT_HF = 0x3d - IFT_HIPPI = 0x2f - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IB = 0xc7 - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88026 = 0xa - IFT_LAPB = 0x10 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_NSIP = 0x1b - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PPP = 0x17 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PTPSERIAL = 0x16 - IFT_RS232 = 0x21 - IFT_SDLC = 0x11 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SN = 0x38 - IFT_SONET = 0x27 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SP = 0x39 - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_TUNNEL = 0x3b - IFT_ULTRA = 0x1d - IFT_V35 = 0x2d - IFT_VIPA = 0x37 - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x10000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_USE = 0x1 - IPPROTO_AH = 0x33 - IPPROTO_BIP = 0x53 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GIF = 0x8c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_LOCAL = 0x3f - IPPROTO_MAX = 0x100 - IPPROTO_MH = 0x87 - IPPROTO_NONE = 0x3b - IPPROTO_PUP = 0xc - IPPROTO_QOS = 0x2d - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPV6_ADDRFORM = 0x16 - IPV6_ADDR_PREFERENCES = 0x4a - IPV6_ADD_MEMBERSHIP = 0xc - IPV6_AIXRAWSOCKET = 0x39 - IPV6_CHECKSUM = 0x27 - IPV6_DONTFRAG = 0x2d - IPV6_DROP_MEMBERSHIP = 0xd - IPV6_DSTOPTS = 0x36 - IPV6_FLOWINFO_FLOWLABEL = 0xffffff - IPV6_FLOWINFO_PRIFLOW = 0xfffffff - IPV6_FLOWINFO_PRIORITY = 0xf000000 - IPV6_FLOWINFO_SRFLAG = 0x10000000 - IPV6_FLOWINFO_VERSION = 0xf0000000 - IPV6_HOPLIMIT = 0x28 - IPV6_HOPOPTS = 0x34 - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MIPDSTOPTS = 0x36 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_NOPROBE = 0x1c - IPV6_PATHMTU = 0x2e - IPV6_PKTINFO = 0x21 - IPV6_PKTOPTIONS = 0x24 - IPV6_PRIORITY_10 = 0xa000000 - IPV6_PRIORITY_11 = 0xb000000 - IPV6_PRIORITY_12 = 0xc000000 - IPV6_PRIORITY_13 = 0xd000000 - IPV6_PRIORITY_14 = 0xe000000 - IPV6_PRIORITY_15 = 0xf000000 - IPV6_PRIORITY_8 = 0x8000000 - IPV6_PRIORITY_9 = 0x9000000 - IPV6_PRIORITY_BULK = 0x4000000 - IPV6_PRIORITY_CONTROL = 0x7000000 - IPV6_PRIORITY_FILLER = 0x1000000 - IPV6_PRIORITY_INTERACTIVE = 0x6000000 - IPV6_PRIORITY_RESERVED1 = 0x3000000 - IPV6_PRIORITY_RESERVED2 = 0x5000000 - IPV6_PRIORITY_UNATTENDED = 0x2000000 - IPV6_PRIORITY_UNCHARACTERIZED = 0x0 - IPV6_RECVDSTOPTS = 0x38 - IPV6_RECVHOPLIMIT = 0x29 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVHOPS = 0x22 - IPV6_RECVIF = 0x1e - IPV6_RECVPATHMTU = 0x2f - IPV6_RECVPKTINFO = 0x23 - IPV6_RECVRTHDR = 0x33 - IPV6_RECVSRCRT = 0x1d - IPV6_RECVTCLASS = 0x2a - IPV6_RTHDR = 0x32 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RTHDR_TYPE_2 = 0x2 - IPV6_SENDIF = 0x1f - IPV6_SRFLAG_LOOSE = 0x0 - IPV6_SRFLAG_STRICT = 0x10000000 - IPV6_TCLASS = 0x2b - IPV6_TOKEN_LENGTH = 0x40 - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2c - IPV6_V6ONLY = 0x25 - IPV6_VERSION = 0x60000000 - IP_ADDRFORM = 0x16 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x3c - IP_BLOCK_SOURCE = 0x3a - IP_BROADCAST_IF = 0x10 - IP_CACHE_LINE_SIZE = 0x80 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DHCPMODE = 0x11 - IP_DONTFRAG = 0x19 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x3d - IP_FINDPMTU = 0x1a - IP_HDRINCL = 0x2 - IP_INC_MEMBERSHIPS = 0x14 - IP_INIT_MEMBERSHIP = 0x14 - IP_MAXPACKET = 0xffff - IP_MF = 0x2000 - IP_MSS = 0x240 - IP_MULTICAST_HOPS = 0xa - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OPT = 0x1b - IP_OPTIONS = 0x1 - IP_PMTUAGE = 0x1b - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVIFINFO = 0xf - IP_RECVINTERFACE = 0x20 - IP_RECVMACHDR = 0xe - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x22 - IP_RETOPTS = 0x8 - IP_SOURCE_FILTER = 0x48 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x3b - IP_UNICAST_HOPS = 0x4 - ISIG = 0x1 - ISTRIP = 0x20 - IXANY = 0x1000 - IXOFF = 0x400 - IXON = 0x200 - I_FLUSH = 0x20005305 - LNOFLSH = 0x8000 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ANON = 0x10 - MAP_ANONYMOUS = 0x10 - MAP_FILE = 0x0 - MAP_FIXED = 0x100 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_TYPE = 0xf0 - MAP_VARIABLE = 0x0 - MCL_CURRENT = 0x100 - MCL_FUTURE = 0x200 - MSG_ANY = 0x4 - MSG_ARGEXT = 0x400 - MSG_BAND = 0x2 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_EOR = 0x8 - MSG_HIPRI = 0x1 - MSG_MAXIOVLEN = 0x10 - MSG_MPEG2 = 0x80 - MSG_NONBLOCK = 0x4000 - MSG_NOSIGNAL = 0x100 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITFORONE = 0x200 - MS_ASYNC = 0x10 - MS_EINTR = 0x80 - MS_INVALIDATE = 0x40 - MS_PER_SEC = 0x3e8 - MS_SYNC = 0x20 - NOFLSH = 0x80 - NOFLUSH = 0x80000000 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - ONOEOT = 0x80000 - OPOST = 0x1 - O_ACCMODE = 0x23 - O_APPEND = 0x8 - O_CIO = 0x80 - O_CIOR = 0x800000000 - O_CLOEXEC = 0x800000 - O_CREAT = 0x100 - O_DEFER = 0x2000 - O_DELAY = 0x4000 - O_DIRECT = 0x8000000 - O_DIRECTORY = 0x80000 - O_DSYNC = 0x400000 - O_EFSOFF = 0x400000000 - O_EFSON = 0x200000000 - O_EXCL = 0x400 - O_EXEC = 0x20 - O_LARGEFILE = 0x4000000 - O_NDELAY = 0x8000 - O_NOCACHE = 0x100000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x1000000 - O_NONBLOCK = 0x4 - O_NONE = 0x3 - O_NSHARE = 0x10000 - O_RAW = 0x100000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSHARE = 0x1000 - O_RSYNC = 0x200000 - O_SEARCH = 0x20 - O_SNAPSHOT = 0x40 - O_SYNC = 0x10 - O_TRUNC = 0x200 - O_TTY_INIT = 0x0 - O_WRONLY = 0x1 - PARENB = 0x100 - PAREXT = 0x100000 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_64BIT = 0x20 - PR_ADDR = 0x2 - PR_ARGEXT = 0x400 - PR_ATOMIC = 0x1 - PR_CONNREQUIRED = 0x4 - PR_FASTHZ = 0x5 - PR_INP = 0x40 - PR_INTRLEVEL = 0x8000 - PR_MLS = 0x100 - PR_MLS_1_LABEL = 0x200 - PR_NOEOR = 0x4000 - PR_RIGHTS = 0x10 - PR_SLOWHZ = 0x2 - PR_WANTRCVD = 0x8 - PT_ATTACH = 0x1e - PT_CLEAR = 0x26 - PT_COMMAND_MAX = 0x45 - PT_CONTINUE = 0x7 - PT_DETACH = 0x1f - PT_GET_UKEY = 0x40 - PT_KILL = 0x8 - PT_LDINFO = 0x22 - PT_LDXINFO = 0x27 - PT_MULTI = 0x23 - PT_NEXT = 0x24 - PT_QUERY = 0x28 - PT_READ_BLOCK = 0x11 - PT_READ_D = 0x2 - PT_READ_FPR = 0xc - PT_READ_GPR = 0xb - PT_READ_I = 0x1 - PT_REATT = 0x21 - PT_REGSET = 0x20 - PT_SET = 0x25 - PT_STEP = 0x9 - PT_TRACE_ME = 0x0 - PT_WATCH = 0x29 - PT_WRITE_BLOCK = 0x13 - PT_WRITE_D = 0x5 - PT_WRITE_FPR = 0xf - PT_WRITE_GPR = 0xe - PT_WRITE_I = 0x4 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DOWNSTREAM = 0x100 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_ACTIVE_DGD = 0x1000000 - RTF_BCE = 0x80000 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_BUL = 0x2000 - RTF_CLONE = 0x10000 - RTF_CLONED = 0x20000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FREE_IN_PROG = 0x4000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PERMANENT6 = 0x8000000 - RTF_PINNED = 0x100000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_SMALLMTU = 0x40000 - RTF_STATIC = 0x800 - RTF_STOPSRCH = 0x2000000 - RTF_UNREACHABLE = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_EXPIRE = 0xf - RTM_GET = 0x4 - RTM_GETNEXT = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTLOST = 0x10 - RTM_RTTUNIT = 0xf4240 - RTM_SAMEADDR = 0x12 - RTM_SET = 0x13 - RTM_VERSION = 0x2 - RTM_VERSION_GR = 0x4 - RTM_VERSION_GR_COMPAT = 0x3 - RTM_VERSION_POLICY = 0x5 - RTM_VERSION_POLICY_EXT = 0x6 - RTM_VERSION_POLICY_PRFN = 0x7 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_RIGHTS = 0x1 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIGQUEUE_MAX = 0x20 - SIOCADDIFVIPA = 0x20006942 - SIOCADDMTU = -0x7ffb9690 - SIOCADDMULTI = -0x7fdf96cf - SIOCADDNETID = -0x7fd796a9 - SIOCADDRT = -0x7fc78df6 - SIOCAIFADDR = -0x7fbf96e6 - SIOCATMARK = 0x40047307 - SIOCDARP = -0x7fb396e0 - SIOCDELIFVIPA = 0x20006943 - SIOCDELMTU = -0x7ffb968f - SIOCDELMULTI = -0x7fdf96ce - SIOCDELPMTU = -0x7fd78ff6 - SIOCDELRT = -0x7fc78df5 - SIOCDIFADDR = -0x7fd796e7 - SIOCDNETOPT = -0x3ffe9680 - SIOCDX25XLATE = -0x7fd7969b - SIOCFIFADDR = -0x7fdf966d - SIOCGARP = -0x3fb396da - SIOCGETMTUS = 0x2000696f - SIOCGETSGCNT = -0x3feb8acc - SIOCGETVIFCNT = -0x3feb8acd - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = -0x3fd796df - SIOCGIFADDRS = 0x2000698c - SIOCGIFBAUDRATE = -0x3fd79693 - SIOCGIFBRDADDR = -0x3fd796dd - SIOCGIFCONF = -0x3fef96bb - SIOCGIFCONFGLOB = -0x3fef9670 - SIOCGIFDSTADDR = -0x3fd796de - SIOCGIFFLAGS = -0x3fd796ef - SIOCGIFGIDLIST = 0x20006968 - SIOCGIFHWADDR = -0x3fab966b - SIOCGIFMETRIC = -0x3fd796e9 - SIOCGIFMTU = -0x3fd796aa - SIOCGIFNETMASK = -0x3fd796db - SIOCGIFOPTIONS = -0x3fd796d6 - SIOCGISNO = -0x3fd79695 - SIOCGLOADF = -0x3ffb967e - SIOCGLOWAT = 0x40047303 - SIOCGNETOPT = -0x3ffe96a5 - SIOCGNETOPT1 = -0x3fdf967f - SIOCGNMTUS = 0x2000696e - SIOCGPGRP = 0x40047309 - SIOCGSIZIFCONF = 0x4004696a - SIOCGSRCFILTER = -0x3fe796cb - SIOCGTUNEPHASE = -0x3ffb9676 - SIOCGX25XLATE = -0x3fd7969c - SIOCIFATTACH = -0x7fdf9699 - SIOCIFDETACH = -0x7fdf969a - SIOCIFGETPKEY = -0x7fdf969b - SIOCIF_ATM_DARP = -0x7fdf9683 - SIOCIF_ATM_DUMPARP = -0x7fdf9685 - SIOCIF_ATM_GARP = -0x7fdf9682 - SIOCIF_ATM_IDLE = -0x7fdf9686 - SIOCIF_ATM_SARP = -0x7fdf9681 - SIOCIF_ATM_SNMPARP = -0x7fdf9687 - SIOCIF_ATM_SVC = -0x7fdf9684 - SIOCIF_ATM_UBR = -0x7fdf9688 - SIOCIF_DEVHEALTH = -0x7ffb966c - SIOCIF_IB_ARP_INCOMP = -0x7fdf9677 - SIOCIF_IB_ARP_TIMER = -0x7fdf9678 - SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f - SIOCIF_IB_DEL_ARP = -0x7fdf967f - SIOCIF_IB_DEL_PINFO = -0x3fdf9670 - SIOCIF_IB_DUMP_ARP = -0x7fdf9680 - SIOCIF_IB_GET_ARP = -0x7fdf967e - SIOCIF_IB_GET_INFO = -0x3f879675 - SIOCIF_IB_GET_STATS = -0x3f879672 - SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a - SIOCIF_IB_RESET_STATS = -0x3f879671 - SIOCIF_IB_RESIZE_CQ = -0x7fdf9679 - SIOCIF_IB_SET_ARP = -0x7fdf967d - SIOCIF_IB_SET_PKEY = -0x7fdf967c - SIOCIF_IB_SET_PORT = -0x7fdf967b - SIOCIF_IB_SET_QKEY = -0x7fdf9676 - SIOCIF_IB_SET_QSIZE = -0x7fdf967a - SIOCLISTIFVIPA = 0x20006944 - SIOCSARP = -0x7fb396e2 - SIOCSHIWAT = 0xffffffff80047300 - SIOCSIFADDR = -0x7fd796f4 - SIOCSIFADDRORI = -0x7fdb9673 - SIOCSIFBRDADDR = -0x7fd796ed - SIOCSIFDSTADDR = -0x7fd796f2 - SIOCSIFFLAGS = -0x7fd796f0 - SIOCSIFGIDLIST = 0x20006969 - SIOCSIFMETRIC = -0x7fd796e8 - SIOCSIFMTU = -0x7fd796a8 - SIOCSIFNETDUMP = -0x7fd796e4 - SIOCSIFNETMASK = -0x7fd796ea - SIOCSIFOPTIONS = -0x7fd796d7 - SIOCSIFSUBCHAN = -0x7fd796e5 - SIOCSISNO = -0x7fd79694 - SIOCSLOADF = -0x3ffb967d - SIOCSLOWAT = 0xffffffff80047302 - SIOCSNETOPT = -0x7ffe96a6 - SIOCSPGRP = 0xffffffff80047308 - SIOCSX25XLATE = -0x7fd7969d - SOCK_CONN_DGRAM = 0x6 - SOCK_DGRAM = 0x2 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x400 - SO_ACCEPTCONN = 0x2 - SO_AUDIT = 0x8000 - SO_BROADCAST = 0x20 - SO_CKSUMRECV = 0x800 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_KERNACCEPT = 0x2000 - SO_LINGER = 0x80 - SO_NOMULTIPATH = 0x4000 - SO_NOREUSEADDR = 0x1000 - SO_OOBINLINE = 0x100 - SO_PEERID = 0x1009 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMPNS = 0x100a - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USE_IFBUFS = 0x400 - S_BANDURG = 0x400 - S_EMODFMT = 0x3c000000 - S_ENFMT = 0x400 - S_ERROR = 0x100 - S_HANGUP = 0x200 - S_HIPRI = 0x2 - S_ICRYPTO = 0x80000 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFJOURNAL = 0x10000 - S_IFLNK = 0xa000 - S_IFMPX = 0x2200 - S_IFMT = 0xf000 - S_IFPDIR = 0x4000000 - S_IFPSDIR = 0x8000000 - S_IFPSSDIR = 0xc000000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFSYSEA = 0x30000000 - S_INPUT = 0x1 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_ITCB = 0x1000000 - S_ITP = 0x800000 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXACL = 0x2000000 - S_IXATTR = 0x40000 - S_IXGRP = 0x8 - S_IXINTERFACE = 0x100000 - S_IXMOD = 0x40000000 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - S_MSG = 0x8 - S_OUTPUT = 0x4 - S_RDBAND = 0x20 - S_RDNORM = 0x10 - S_RESERVED1 = 0x20000 - S_RESERVED2 = 0x200000 - S_RESERVED3 = 0x400000 - S_RESERVED4 = 0x80000000 - S_RESFMT1 = 0x10000000 - S_RESFMT10 = 0x34000000 - S_RESFMT11 = 0x38000000 - S_RESFMT12 = 0x3c000000 - S_RESFMT2 = 0x14000000 - S_RESFMT3 = 0x18000000 - S_RESFMT4 = 0x1c000000 - S_RESFMT5 = 0x20000000 - S_RESFMT6 = 0x24000000 - S_RESFMT7 = 0x28000000 - S_RESFMT8 = 0x2c000000 - S_WRBAND = 0x80 - S_WRNORM = 0x40 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800 - TCP_ACLADD = 0x23 - TCP_ACLBIND = 0x26 - TCP_ACLCLEAR = 0x22 - TCP_ACLDEL = 0x24 - TCP_ACLDENY = 0x8 - TCP_ACLFLUSH = 0x21 - TCP_ACLGID = 0x1 - TCP_ACLLS = 0x25 - TCP_ACLSUBNET = 0x4 - TCP_ACLUID = 0x2 - TCP_CWND_DF = 0x16 - TCP_CWND_IF = 0x15 - TCP_DELAY_ACK_FIN = 0x2 - TCP_DELAY_ACK_SYN = 0x1 - TCP_FASTNAME = 0x101080a - TCP_KEEPCNT = 0x13 - TCP_KEEPIDLE = 0x11 - TCP_KEEPINTVL = 0x12 - TCP_LSPRIV = 0x29 - TCP_LUID = 0x20 - TCP_MAXBURST = 0x8 - TCP_MAXDF = 0x64 - TCP_MAXIF = 0x64 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAXWINDOWSCALE = 0xe - TCP_MAX_SACK = 0x4 - TCP_MSS = 0x5b4 - TCP_NODELAY = 0x1 - TCP_NODELAYACK = 0x14 - TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19 - TCP_NOREDUCE_CWND_IN_FRXMT = 0x18 - TCP_NOTENTER_SSTART = 0x17 - TCP_OPT = 0x19 - TCP_RFC1323 = 0x4 - TCP_SETPRIV = 0x27 - TCP_STDURG = 0x10 - TCP_TIMESTAMP_OPTLEN = 0xc - TCP_UNSETPRIV = 0x28 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0xffffffff80047462 - TIOCEXCL = 0x2000740d - TIOCFLUSH = 0xffffffff80047410 - TIOCGETC = 0x40067412 - TIOCGETD = 0x40047400 - TIOCGETP = 0x40067408 - TIOCGLTC = 0x40067474 - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047448 - TIOCGSIZE = 0x40087468 - TIOCGWINSZ = 0x40087468 - TIOCHPCL = 0x20007402 - TIOCLBIC = 0xffffffff8004747e - TIOCLBIS = 0xffffffff8004747f - TIOCLGET = 0x4004747c - TIOCLSET = 0xffffffff8004747d - TIOCMBIC = 0xffffffff8004746b - TIOCMBIS = 0xffffffff8004746c - TIOCMGET = 0x4004746a - TIOCMIWAIT = 0xffffffff80047464 - TIOCMODG = 0x40047403 - TIOCMODS = 0xffffffff80047404 - TIOCMSET = 0xffffffff8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0xffffffff80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0xffffffff80047469 - TIOCSBRK = 0x2000747b - TIOCSDTR = 0x20007479 - TIOCSETC = 0xffffffff80067411 - TIOCSETD = 0xffffffff80047401 - TIOCSETN = 0xffffffff8006740a - TIOCSETP = 0xffffffff80067409 - TIOCSLTC = 0xffffffff80067475 - TIOCSPGRP = 0xffffffff80047476 - TIOCSSIZE = 0xffffffff80087467 - TIOCSTART = 0x2000746e - TIOCSTI = 0xffffffff80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0xffffffff80087467 - TIOCUCNTL = 0xffffffff80047466 - TOSTOP = 0x10000 - VDISCRD = 0xc - VDSUSP = 0xa - VEOF = 0x4 - VEOL = 0x5 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xe - VMIN = 0x4 - VQUIT = 0x1 - VREPRINT = 0xb - VSTART = 0x7 - VSTOP = 0x8 - VSTRT = 0x7 - VSUSP = 0x9 - VT0 = 0x0 - VT1 = 0x8000 - VTDELAY = 0x2000 - VTDLY = 0x8000 - VTIME = 0x5 - VWERSE = 0xd - WPARSTART = 0x1 - WPARSTOP = 0x2 - WPARTTYNAME = "Global" - _FDATAFLUSH = 0x2000000000 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x43) - EADDRNOTAVAIL = Errno(0x44) - EAFNOSUPPORT = Errno(0x42) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x38) - EBADF = Errno(0x9) - EBADMSG = Errno(0x78) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x75) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x25) - ECLONEME = Errno(0x52) - ECONNABORTED = Errno(0x48) - ECONNREFUSED = Errno(0x4f) - ECONNRESET = Errno(0x49) - ECORRUPT = Errno(0x59) - EDEADLK = Errno(0x2d) - EDESTADDREQ = Errno(0x3a) - EDESTADDRREQ = Errno(0x3a) - EDIST = Errno(0x35) - EDOM = Errno(0x21) - EDQUOT = Errno(0x58) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFORMAT = Errno(0x30) - EHOSTDOWN = Errno(0x50) - EHOSTUNREACH = Errno(0x51) - EIDRM = Errno(0x24) - EILSEQ = Errno(0x74) - EINPROGRESS = Errno(0x37) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x4b) - EISDIR = Errno(0x15) - EL2HLT = Errno(0x2c) - EL2NSYNC = Errno(0x26) - EL3HLT = Errno(0x27) - EL3RST = Errno(0x28) - ELNRNG = Errno(0x29) - ELOOP = Errno(0x55) - EMEDIA = Errno(0x6e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x3b) - EMULTIHOP = Errno(0x7d) - ENAMETOOLONG = Errno(0x56) - ENETDOWN = Errno(0x45) - ENETRESET = Errno(0x47) - ENETUNREACH = Errno(0x46) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x70) - ENOBUFS = Errno(0x4a) - ENOCONNECT = Errno(0x32) - ENOCSI = Errno(0x2b) - ENODATA = Errno(0x7a) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x31) - ENOLINK = Errno(0x7e) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x23) - ENOPROTOOPT = Errno(0x3d) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x76) - ENOSTR = Errno(0x7b) - ENOSYS = Errno(0x6d) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x4c) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x11) - ENOTREADY = Errno(0x2e) - ENOTRECOVERABLE = Errno(0x5e) - ENOTRUST = Errno(0x72) - ENOTSOCK = Errno(0x39) - ENOTSUP = Errno(0x7c) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x40) - EOVERFLOW = Errno(0x7f) - EOWNERDEAD = Errno(0x5f) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x41) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x53) - EPROTO = Errno(0x79) - EPROTONOSUPPORT = Errno(0x3e) - EPROTOTYPE = Errno(0x3c) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x5d) - ERESTART = Errno(0x52) - EROFS = Errno(0x1e) - ESAD = Errno(0x71) - ESHUTDOWN = Errno(0x4d) - ESOCKTNOSUPPORT = Errno(0x3f) - ESOFT = Errno(0x6f) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x34) - ESYSERROR = Errno(0x5a) - ETIME = Errno(0x77) - ETIMEDOUT = Errno(0x4e) - ETOOMANYREFS = Errno(0x73) - ETXTBSY = Errno(0x1a) - EUNATCH = Errno(0x2a) - EUSERS = Errno(0x54) - EWOULDBLOCK = Errno(0xb) - EWRPROTECT = Errno(0x2f) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGAIO = Signal(0x17) - SIGALRM = Signal(0xe) - SIGALRM1 = Signal(0x26) - SIGBUS = Signal(0xa) - SIGCAPI = Signal(0x31) - SIGCHLD = Signal(0x14) - SIGCLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGCPUFAIL = Signal(0x3b) - SIGDANGER = Signal(0x21) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGGRANT = Signal(0x3c) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOINT = Signal(0x10) - SIGIOT = Signal(0x6) - SIGKAP = Signal(0x3c) - SIGKILL = Signal(0x9) - SIGLOST = Signal(0x6) - SIGMAX = Signal(0xff) - SIGMAX32 = Signal(0x3f) - SIGMAX64 = Signal(0xff) - SIGMIGRATE = Signal(0x23) - SIGMSG = Signal(0x1b) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x17) - SIGPRE = Signal(0x24) - SIGPROF = Signal(0x20) - SIGPTY = Signal(0x17) - SIGPWR = Signal(0x1d) - SIGQUIT = Signal(0x3) - SIGRECONFIG = Signal(0x3a) - SIGRETRACT = Signal(0x3d) - SIGSAK = Signal(0x3f) - SIGSEGV = Signal(0xb) - SIGSOUND = Signal(0x3e) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGSYSERROR = Signal(0x30) - SIGTALRM = Signal(0x26) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVIRT = Signal(0x25) - SIGVTALRM = Signal(0x22) - SIGWAITING = Signal(0x27) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_darwin_amd64.go b/c/syscall/zerrors_darwin_amd64.go deleted file mode 100644 index abba1845..00000000 --- a/c/syscall/zerrors_darwin_amd64.go +++ /dev/null @@ -1,1279 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && darwin - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1c - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1e - AF_IPX = 0x17 - AF_ISDN = 0x1c - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x26 - AF_NATM = 0x1f - AF_NDRV = 0x1b - AF_NETBIOS = 0x21 - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PPP = 0x22 - AF_PUP = 0x4 - AF_RESERVED_36 = 0x24 - AF_ROUTE = 0x11 - AF_SIP = 0x18 - AF_SNA = 0xb - AF_SYSTEM = 0x20 - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc00c4279 - BIOCGETIF = 0x4020426b - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044278 - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8020426c - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_NULL = 0x0 - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xc - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_MACHPORT = -0x8 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xc - EVFILT_THREADMARKER = 0xc - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xa - EVFILT_VM = -0xc - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG0 = 0x1000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_OOBAND = 0x2000 - EV_POLL = 0x1000 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_ADDFILESIGS = 0x3d - F_ADDSIGS = 0x3b - F_ALLOCATEALL = 0x4 - F_ALLOCATECONTIG = 0x2 - F_CHKCLEAN = 0x29 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x43 - F_FLUSH_DATA = 0x28 - F_FREEZE_FS = 0x35 - F_FULLFSYNC = 0x33 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETLKPID = 0x42 - F_GETNOSIGPIPE = 0x4a - F_GETOWN = 0x5 - F_GETPATH = 0x32 - F_GETPATH_MTMINFO = 0x47 - F_GETPROTECTIONCLASS = 0x3f - F_GLOBAL_NOCACHE = 0x37 - F_LOG2PHYS = 0x31 - F_LOG2PHYS_EXT = 0x41 - F_MARKDEPENDENCY = 0x3c - F_NOCACHE = 0x30 - F_NODIRECT = 0x3e - F_OK = 0x0 - F_PATHPKG_CHECK = 0x34 - F_PEOFPOSMODE = 0x3 - F_PREALLOCATE = 0x2a - F_RDADVISE = 0x2c - F_RDAHEAD = 0x2d - F_RDLCK = 0x1 - F_READBOOTSTRAP = 0x2e - F_SETBACKINGSTORE = 0x46 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETNOSIGPIPE = 0x49 - F_SETOWN = 0x6 - F_SETPROTECTIONCLASS = 0x40 - F_SETSIZE = 0x2b - F_THAW_FS = 0x36 - F_UNLCK = 0x2 - F_VOLPOSMODE = 0x4 - F_WRITEBOOTSTRAP = 0x2f - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_AAL5 = 0x31 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ATM = 0x25 - IFT_BRIDGE = 0xd1 - IFT_CARP = 0xf8 - IFT_CELLULAR = 0xff - IFT_CEPT = 0x13 - IFT_DS3 = 0x1e - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_ETHER = 0x6 - IFT_FAITH = 0x38 - IFT_FDDI = 0xf - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_GIF = 0x37 - IFT_HDH1822 = 0x3 - IFT_HIPPI = 0x2f - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IEEE1394 = 0x90 - IFT_IEEE8023ADLAG = 0x88 - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88026 = 0xa - IFT_L2VLAN = 0x87 - IFT_LAPB = 0x10 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_NSIP = 0x1b - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PDP = 0xff - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PPP = 0x17 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PTPSERIAL = 0x16 - IFT_RS232 = 0x21 - IFT_SDLC = 0x11 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_STARLAN = 0xb - IFT_STF = 0x39 - IFT_T1 = 0x12 - IFT_ULTRA = 0x1d - IFT_V35 = 0x2d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LINKLOCALNETNUM = 0xa9fe0000 - IN_LOOPBACKNET = 0x7f - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0xfe - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEP = 0x21 - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_2292DSTOPTS = 0x17 - IPV6_2292HOPLIMIT = 0x14 - IPV6_2292HOPOPTS = 0x16 - IPV6_2292NEXTHOP = 0x15 - IPV6_2292PKTINFO = 0x13 - IPV6_2292PKTOPTIONS = 0x19 - IPV6_2292RTHDR = 0x18 - IPV6_BINDV6ONLY = 0x1b - IPV6_BOUND_IF = 0x7d - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVTCLASS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x24 - IPV6_UNICAST_HOPS = 0x4 - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BLOCK_SOURCE = 0x48 - IP_BOUND_IF = 0x19 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW_ADD = 0x28 - IP_FW_DEL = 0x29 - IP_FW_FLUSH = 0x2a - IP_FW_GET = 0x2c - IP_FW_RESETLOG = 0x2d - IP_FW_ZERO = 0x2b - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MF = 0x2000 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_IFINDEX = 0x42 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_NAT__XXX = 0x37 - IP_OFFMASK = 0x1fff - IP_OLD_FW_ADD = 0x32 - IP_OLD_FW_DEL = 0x33 - IP_OLD_FW_FLUSH = 0x34 - IP_OLD_FW_GET = 0x36 - IP_OLD_FW_RESETLOG = 0x38 - IP_OLD_FW_ZERO = 0x35 - IP_OPTIONS = 0x1 - IP_PKTINFO = 0x1a - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVPKTINFO = 0x1a - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x18 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_STRIPHDR = 0x17 - IP_TOS = 0x3 - IP_TRAFFIC_MGT_BACKGROUND = 0x41 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_CAN_REUSE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_FREE_REUSABLE = 0x7 - MADV_FREE_REUSE = 0x8 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MADV_ZERO_WIRED_PAGES = 0x6 - MAP_ANON = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_JIT = 0x800 - MAP_NOCACHE = 0x400 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_SHARED = 0x1 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - MS_ASYNC = 0x1 - MS_DEACTIVATE = 0x8 - MS_INVALIDATE = 0x2 - MS_KILLPAGES = 0x4 - MS_SYNC = 0x10 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_DUMP2 = 0x7 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLIST2 = 0x6 - NET_RT_MAXID = 0xa - NET_RT_STAT = 0x4 - NET_RT_TRASH = 0x5 - NOFLSH = 0x80000000 - NOTE_ABSOLUTE = 0x8 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXITSTATUS = 0x4000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_NONE = 0x80 - NOTE_NSECONDS = 0x4 - NOTE_PCTRLMASK = -0x100000 - NOTE_PDATAMASK = 0xfffff - NOTE_REAP = 0x10000000 - NOTE_RENAME = 0x20 - NOTE_RESOURCEEND = 0x2000000 - NOTE_REVOKE = 0x40 - NOTE_SECONDS = 0x1 - NOTE_SIGNAL = 0x8000000 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_USECONDS = 0x2 - NOTE_VM_ERROR = 0x10000000 - NOTE_VM_PRESSURE = 0x80000000 - NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 - NOTE_VM_PRESSURE_TERMINATE = 0x40000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - OFDEL = 0x20000 - OFILL = 0x80 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_ALERT = 0x20000000 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x1000000 - O_CREAT = 0x200 - O_DIRECTORY = 0x100000 - O_DSYNC = 0x400000 - O_EVTONLY = 0x8000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x20000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_POPUP = 0x80000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYMLINK = 0x200000 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PT_ATTACH = 0xa - PT_ATTACHEXC = 0xe - PT_CONTINUE = 0x7 - PT_DENY_ATTACH = 0x1f - PT_DETACH = 0xb - PT_FIRSTMACH = 0x20 - PT_FORCEQUOTA = 0x1e - PT_KILL = 0x8 - PT_READ_D = 0x2 - PT_READ_I = 0x1 - PT_READ_U = 0x3 - PT_SIGEXC = 0xc - PT_STEP = 0x9 - PT_THUPDATE = 0xd - PT_TRACE_ME = 0x0 - PT_WRITE_D = 0x5 - PT_WRITE_I = 0x4 - PT_WRITE_U = 0x6 - RLIMIT_AS = 0x5 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_CLONING = 0x100 - RTF_CONDEMNED = 0x2000000 - RTF_DELCLONE = 0x80 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_IFREF = 0x4000000 - RTF_IFSCOPE = 0x1000000 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_WASCLONED = 0x20000 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_GET2 = 0x14 - RTM_IFINFO = 0xe - RTM_IFINFO2 = 0x12 - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_NEWMADDR2 = 0x13 - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SCM_TIMESTAMP_MONOTONIC = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCALIFADDR = 0x8118691d - SIOCARPIPLL = 0xc0206928 - SIOCATMARK = 0x40047307 - SIOCAUTOADDR = 0xc0206926 - SIOCAUTONETMASK = 0x80206927 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFPHYADDR = 0x80206941 - SIOCDLIFADDR = 0x8118691f - SIOCGDRVSPEC = 0xc028697b - SIOCGETSGCNT = 0xc014721c - SIOCGETVIFCNT = 0xc014721b - SIOCGETVLAN = 0xc020697f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFALTMTU = 0xc0206948 - SIOCGIFASYNCMAP = 0xc020697c - SIOCGIFBOND = 0xc0206947 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020695b - SIOCGIFCONF = 0xc00c6924 - SIOCGIFDEVMTU = 0xc0206944 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFKPI = 0xc0206987 - SIOCGIFMAC = 0xc0206982 - SIOCGIFMEDIA = 0xc02c6938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206940 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc020693f - SIOCGIFSTATUS = 0xc331693d - SIOCGIFVLAN = 0xc020697f - SIOCGIFWAKEFLAGS = 0xc0206988 - SIOCGLIFADDR = 0xc118691e - SIOCGLIFPHYADDR = 0xc1186943 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCIFCREATE = 0xc0206978 - SIOCIFCREATE2 = 0xc020697a - SIOCIFDESTROY = 0x80206979 - SIOCRSLVMULTI = 0xc010693b - SIOCSDRVSPEC = 0x8028697b - SIOCSETVLAN = 0x8020697e - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFALTMTU = 0x80206945 - SIOCSIFASYNCMAP = 0x8020697d - SIOCSIFBOND = 0x80206946 - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020695a - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFKPI = 0x80206986 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206983 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x8040693e - SIOCSIFPHYS = 0x80206936 - SIOCSIFVLAN = 0x8020697e - SIOCSLIFPHYADDR = 0x81186942 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1010 - SO_LINGER = 0x80 - SO_LINGER_SEC = 0x1080 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_RESTRICTIONS = 0x1081 - SO_RESTRICT_DENYIN = 0x1 - SO_RESTRICT_DENYOUT = 0x2 - SO_RESTRICT_DENYSET = 0x80000000 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TIMESTAMP_MONOTONIC = 0x800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x40 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFWHT = 0xe000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISTXT = 0x200 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CONNECTIONTIMEOUT = 0x20 - TCP_KEEPALIVE = 0x10 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x3 - TCP_MAX_WINSHIFT = 0xe - TCP_MINMSS = 0xd8 - TCP_MINMSSOVERLOAD = 0x3e8 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_RXT_CONNDROPTIME = 0x80 - TCP_RXT_FINDROP = 0x100 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x40107458 - TIOCDRAIN = 0x2000745e - TIOCDSIMICROCODE = 0x20007455 - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x40487413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGWINSZ = 0x40087468 - TIOCIXOFF = 0x20007480 - TIOCIXON = 0x20007481 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMODG = 0x40047403 - TIOCMODS = 0x80047404 - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTYGNAME = 0x40807453 - TIOCPTYGRANT = 0x20007454 - TIOCPTYUNLK = 0x20007452 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCONS = 0x20007463 - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x80487414 - TIOCSETAF = 0x80487416 - TIOCSETAW = 0x80487415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2000745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VT0 = 0x0 - VT1 = 0x10000 - VTDLY = 0x10000 - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x10 - WCOREFLAG = 0x80 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOWAIT = 0x20 - WORDSIZE = 0x40 - WSTOPPED = 0x8 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADARCH = Errno(0x56) - EBADEXEC = Errno(0x55) - EBADF = Errno(0x9) - EBADMACHO = Errno(0x58) - EBADMSG = Errno(0x5e) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x59) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDEVERR = Errno(0x53) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x5a) - EILSEQ = Errno(0x5c) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x69) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5f) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x5d) - ENOBUFS = Errno(0x37) - ENODATA = Errno(0x60) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x61) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5b) - ENOPOLICY = Errno(0x67) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x62) - ENOSTR = Errno(0x63) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x68) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x66) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x69) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x64) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - EPWROFF = Errno(0x52) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHLIBVERS = Errno(0x57) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIME = Errno(0x65) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_darwin_arm64.go b/c/syscall/zerrors_darwin_arm64.go deleted file mode 100644 index fc2982a7..00000000 --- a/c/syscall/zerrors_darwin_arm64.go +++ /dev/null @@ -1,1291 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build arm64 && darwin - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1c - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1e - AF_IPX = 0x17 - AF_ISDN = 0x1c - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x28 - AF_NATM = 0x1f - AF_NDRV = 0x1b - AF_NETBIOS = 0x21 - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PPP = 0x22 - AF_PUP = 0x4 - AF_RESERVED_36 = 0x24 - AF_ROUTE = 0x11 - AF_SIP = 0x18 - AF_SNA = 0xb - AF_SYSTEM = 0x20 - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_UTUN = 0x26 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc00c4279 - BIOCGETIF = 0x4020426b - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044278 - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8020426c - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_NULL = 0x0 - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xc - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_MACHPORT = -0x8 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xe - EVFILT_THREADMARKER = 0xe - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xa - EVFILT_VM = -0xc - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG0 = 0x1000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_OOBAND = 0x2000 - EV_POLL = 0x1000 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_ADDFILESIGS = 0x3d - F_ADDSIGS = 0x3b - F_ALLOCATEALL = 0x4 - F_ALLOCATECONTIG = 0x2 - F_CHKCLEAN = 0x29 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x43 - F_FINDSIGS = 0x4e - F_FLUSH_DATA = 0x28 - F_FREEZE_FS = 0x35 - F_FULLFSYNC = 0x33 - F_GETCODEDIR = 0x48 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETLKPID = 0x42 - F_GETNOSIGPIPE = 0x4a - F_GETOWN = 0x5 - F_GETPATH = 0x32 - F_GETPATH_MTMINFO = 0x47 - F_GETPROTECTIONCLASS = 0x3f - F_GETPROTECTIONLEVEL = 0x4d - F_GLOBAL_NOCACHE = 0x37 - F_LOG2PHYS = 0x31 - F_LOG2PHYS_EXT = 0x41 - F_NOCACHE = 0x30 - F_NODIRECT = 0x3e - F_OK = 0x0 - F_PATHPKG_CHECK = 0x34 - F_PEOFPOSMODE = 0x3 - F_PREALLOCATE = 0x2a - F_RDADVISE = 0x2c - F_RDAHEAD = 0x2d - F_RDLCK = 0x1 - F_SETBACKINGSTORE = 0x46 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETLKWTIMEOUT = 0xa - F_SETNOSIGPIPE = 0x49 - F_SETOWN = 0x6 - F_SETPROTECTIONCLASS = 0x40 - F_SETSIZE = 0x2b - F_SINGLE_WRITER = 0x4c - F_THAW_FS = 0x36 - F_TRANSCODEKEY = 0x4b - F_UNLCK = 0x2 - F_VOLPOSMODE = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_AAL5 = 0x31 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ATM = 0x25 - IFT_BRIDGE = 0xd1 - IFT_CARP = 0xf8 - IFT_CELLULAR = 0xff - IFT_CEPT = 0x13 - IFT_DS3 = 0x1e - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_ETHER = 0x6 - IFT_FAITH = 0x38 - IFT_FDDI = 0xf - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_GIF = 0x37 - IFT_HDH1822 = 0x3 - IFT_HIPPI = 0x2f - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IEEE1394 = 0x90 - IFT_IEEE8023ADLAG = 0x88 - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88026 = 0xa - IFT_L2VLAN = 0x87 - IFT_LAPB = 0x10 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_NSIP = 0x1b - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PDP = 0xff - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PPP = 0x17 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PTPSERIAL = 0x16 - IFT_RS232 = 0x21 - IFT_SDLC = 0x11 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_STARLAN = 0xb - IFT_STF = 0x39 - IFT_T1 = 0x12 - IFT_ULTRA = 0x1d - IFT_V35 = 0x2d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LINKLOCALNETNUM = 0xa9fe0000 - IN_LOOPBACKNET = 0x7f - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0xfe - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEP = 0x21 - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_2292DSTOPTS = 0x17 - IPV6_2292HOPLIMIT = 0x14 - IPV6_2292HOPOPTS = 0x16 - IPV6_2292NEXTHOP = 0x15 - IPV6_2292PKTINFO = 0x13 - IPV6_2292PKTOPTIONS = 0x19 - IPV6_2292RTHDR = 0x18 - IPV6_BINDV6ONLY = 0x1b - IPV6_BOUND_IF = 0x7d - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVTCLASS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x24 - IPV6_UNICAST_HOPS = 0x4 - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BLOCK_SOURCE = 0x48 - IP_BOUND_IF = 0x19 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW_ADD = 0x28 - IP_FW_DEL = 0x29 - IP_FW_FLUSH = 0x2a - IP_FW_GET = 0x2c - IP_FW_RESETLOG = 0x2d - IP_FW_ZERO = 0x2b - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MF = 0x2000 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_IFINDEX = 0x42 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_NAT__XXX = 0x37 - IP_OFFMASK = 0x1fff - IP_OLD_FW_ADD = 0x32 - IP_OLD_FW_DEL = 0x33 - IP_OLD_FW_FLUSH = 0x34 - IP_OLD_FW_GET = 0x36 - IP_OLD_FW_RESETLOG = 0x38 - IP_OLD_FW_ZERO = 0x35 - IP_OPTIONS = 0x1 - IP_PKTINFO = 0x1a - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVPKTINFO = 0x1a - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x18 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_STRIPHDR = 0x17 - IP_TOS = 0x3 - IP_TRAFFIC_MGT_BACKGROUND = 0x41 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_CAN_REUSE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_FREE_REUSABLE = 0x7 - MADV_FREE_REUSE = 0x8 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MADV_ZERO_WIRED_PAGES = 0x6 - MAP_ANON = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_JIT = 0x800 - MAP_NOCACHE = 0x400 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_SHARED = 0x1 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - MS_ASYNC = 0x1 - MS_DEACTIVATE = 0x8 - MS_INVALIDATE = 0x2 - MS_KILLPAGES = 0x4 - MS_SYNC = 0x10 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_DUMP2 = 0x7 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLIST2 = 0x6 - NET_RT_MAXID = 0xa - NET_RT_STAT = 0x4 - NET_RT_TRASH = 0x5 - NOFLSH = 0x80000000 - NOTE_ABSOLUTE = 0x8 - NOTE_ATTRIB = 0x8 - NOTE_BACKGROUND = 0x40 - NOTE_CHILD = 0x4 - NOTE_CRITICAL = 0x20 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXITSTATUS = 0x4000000 - NOTE_EXIT_CSERROR = 0x40000 - NOTE_EXIT_DECRYPTFAIL = 0x10000 - NOTE_EXIT_DETAIL = 0x2000000 - NOTE_EXIT_DETAIL_MASK = 0x70000 - NOTE_EXIT_MEMORY = 0x20000 - NOTE_EXIT_REPARENTED = 0x80000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LEEWAY = 0x10 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_NONE = 0x80 - NOTE_NSECONDS = 0x4 - NOTE_PCTRLMASK = -0x100000 - NOTE_PDATAMASK = 0xfffff - NOTE_REAP = 0x10000000 - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_SECONDS = 0x1 - NOTE_SIGNAL = 0x8000000 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_USECONDS = 0x2 - NOTE_VM_ERROR = 0x10000000 - NOTE_VM_PRESSURE = 0x80000000 - NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 - NOTE_VM_PRESSURE_TERMINATE = 0x40000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - OFDEL = 0x20000 - OFILL = 0x80 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_ALERT = 0x20000000 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x1000000 - O_CREAT = 0x200 - O_DIRECTORY = 0x100000 - O_DP_GETRAWENCRYPTED = 0x1 - O_DSYNC = 0x400000 - O_EVTONLY = 0x8000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x20000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_POPUP = 0x80000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYMLINK = 0x200000 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PT_ATTACH = 0xa - PT_ATTACHEXC = 0xe - PT_CONTINUE = 0x7 - PT_DENY_ATTACH = 0x1f - PT_DETACH = 0xb - PT_FIRSTMACH = 0x20 - PT_FORCEQUOTA = 0x1e - PT_KILL = 0x8 - PT_READ_D = 0x2 - PT_READ_I = 0x1 - PT_READ_U = 0x3 - PT_SIGEXC = 0xc - PT_STEP = 0x9 - PT_THUPDATE = 0xd - PT_TRACE_ME = 0x0 - PT_WRITE_D = 0x5 - PT_WRITE_I = 0x4 - PT_WRITE_U = 0x6 - RLIMIT_AS = 0x5 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_CPU_USAGE_MONITOR = 0x2 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_CLONING = 0x100 - RTF_CONDEMNED = 0x2000000 - RTF_DELCLONE = 0x80 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_IFREF = 0x4000000 - RTF_IFSCOPE = 0x1000000 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_PROXY = 0x8000000 - RTF_REJECT = 0x8 - RTF_ROUTER = 0x10000000 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_WASCLONED = 0x20000 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_GET2 = 0x14 - RTM_IFINFO = 0xe - RTM_IFINFO2 = 0x12 - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_NEWMADDR2 = 0x13 - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SCM_TIMESTAMP_MONOTONIC = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCARPIPLL = 0xc0206928 - SIOCATMARK = 0x40047307 - SIOCAUTOADDR = 0xc0206926 - SIOCAUTONETMASK = 0x80206927 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFPHYADDR = 0x80206941 - SIOCGDRVSPEC = 0xc028697b - SIOCGETVLAN = 0xc020697f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFALTMTU = 0xc0206948 - SIOCGIFASYNCMAP = 0xc020697c - SIOCGIFBOND = 0xc0206947 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020695b - SIOCGIFCONF = 0xc00c6924 - SIOCGIFDEVMTU = 0xc0206944 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFKPI = 0xc0206987 - SIOCGIFMAC = 0xc0206982 - SIOCGIFMEDIA = 0xc02c6938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206940 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc020693f - SIOCGIFSTATUS = 0xc331693d - SIOCGIFVLAN = 0xc020697f - SIOCGIFWAKEFLAGS = 0xc0206988 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCIFCREATE = 0xc0206978 - SIOCIFCREATE2 = 0xc020697a - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106981 - SIOCRSLVMULTI = 0xc010693b - SIOCSDRVSPEC = 0x8028697b - SIOCSETVLAN = 0x8020697e - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFALTMTU = 0x80206945 - SIOCSIFASYNCMAP = 0x8020697d - SIOCSIFBOND = 0x80206946 - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020695a - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFKPI = 0x80206986 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206983 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x8040693e - SIOCSIFPHYS = 0x80206936 - SIOCSIFVLAN = 0x8020697e - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1010 - SO_LINGER = 0x80 - SO_LINGER_SEC = 0x1080 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TIMESTAMP_MONOTONIC = 0x800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x40 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFWHT = 0xe000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISTXT = 0x200 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CONNECTIONTIMEOUT = 0x20 - TCP_ENABLE_ECN = 0x104 - TCP_KEEPALIVE = 0x10 - TCP_KEEPCNT = 0x102 - TCP_KEEPINTVL = 0x101 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MINMSS = 0xd8 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_NOTSENT_LOWAT = 0x201 - TCP_RXT_CONNDROPTIME = 0x80 - TCP_RXT_FINDROP = 0x100 - TCP_SENDMOREACKS = 0x103 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x40107458 - TIOCDRAIN = 0x2000745e - TIOCDSIMICROCODE = 0x20007455 - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x40487413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGWINSZ = 0x40087468 - TIOCIXOFF = 0x20007480 - TIOCIXON = 0x20007481 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMODG = 0x40047403 - TIOCMODS = 0x80047404 - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTYGNAME = 0x40807453 - TIOCPTYGRANT = 0x20007454 - TIOCPTYUNLK = 0x20007452 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCONS = 0x20007463 - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x80487414 - TIOCSETAF = 0x80487416 - TIOCSETAW = 0x80487415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2000745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VT0 = 0x0 - VT1 = 0x10000 - VTDLY = 0x10000 - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x10 - WCOREFLAG = 0x80 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOWAIT = 0x20 - WORDSIZE = 0x40 - WSTOPPED = 0x8 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADARCH = Errno(0x56) - EBADEXEC = Errno(0x55) - EBADF = Errno(0x9) - EBADMACHO = Errno(0x58) - EBADMSG = Errno(0x5e) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x59) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDEVERR = Errno(0x53) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x5a) - EILSEQ = Errno(0x5c) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x6a) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5f) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x5d) - ENOBUFS = Errno(0x37) - ENODATA = Errno(0x60) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x61) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5b) - ENOPOLICY = Errno(0x67) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x62) - ENOSTR = Errno(0x63) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x68) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x66) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x69) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x64) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - EPWROFF = Errno(0x52) - EQFULL = Errno(0x6a) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHLIBVERS = Errno(0x57) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIME = Errno(0x65) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_dragonfly_amd64.go b/c/syscall/zerrors_dragonfly_amd64.go deleted file mode 100644 index 3e8ba9fb..00000000 --- a/c/syscall/zerrors_dragonfly_amd64.go +++ /dev/null @@ -1,1392 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && dragonfly - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x21 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x23 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x24 - AF_MPLS = 0x22 - AF_NATM = 0x1d - AF_NETGRAPH = 0x20 - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SIP = 0x18 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0104279 - BIOCGETIF = 0x4020426b - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044278 - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8010427b - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x8 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DEFAULTBUFSIZE = 0x1000 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MAX_CLONES = 0x80 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DOCSIS = 0x8f - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_REDBACK_SMARTEDGE = 0x20 - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DBF = 0xf - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_EXCEPT = -0x8 - EVFILT_MARKER = 0xf - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 - EVFILT_TIMER = -0x7 - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_NODATA = 0x1000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTEXIT_LWP = 0x10000 - EXTEXIT_PROC = 0x0 - EXTEXIT_SETINT = 0x1 - EXTEXIT_SIMPLE = 0x0 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETOWN = 0x5 - F_OK = 0x0 - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x118e72 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NPOLLING = 0x100000 - IFF_OACTIVE = 0x400 - IFF_OACTIVE_COMPAT = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_POLLING = 0x10000 - IFF_POLLING_COMPAT = 0x10000 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xf3 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0xfe - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEP = 0x21 - IPPROTO_SKIP = 0x39 - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_UNKNOWN = 0x102 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PKTOPTIONS = 0x34 - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_RESETLOG = 0x37 - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CONTROL_END = 0xb - MADV_CONTROL_START = 0xa - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_INVAL = 0xa - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SETMAP = 0xb - MADV_WILLNEED = 0x3 - MAP_ANON = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_NOCORE = 0x20000 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_SIZEALIGN = 0x40000 - MAP_STACK = 0x400 - MAP_TRYFIXED = 0x10000 - MAP_VPAGETABLE = 0x2000 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x1000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FBLOCKING = 0x10000 - MSG_FMASK = 0xffff0000 - MSG_FNONBLOCKING = 0x20000 - MSG_NOSIGNAL = 0x400 - MSG_NOTIFICATION = 0x200 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_SYNC = 0x800 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x4 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_OOB = 0x2 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x20000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x8000000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FAPPEND = 0x100000 - O_FASYNCWRITE = 0x800000 - O_FBLOCKING = 0x40000 - O_FBUFFERED = 0x2000000 - O_FMASK = 0x7fc0000 - O_FNONBLOCKING = 0x80000 - O_FOFFSET = 0x200000 - O_FSYNC = 0x80 - O_FSYNCWRITE = 0x400000 - O_FUNBUFFERED = 0x1000000 - O_MAPONREAD = 0x4000000 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0xb - RTAX_MPLS1 = 0x8 - RTAX_MPLS2 = 0x9 - RTAX_MPLS3 = 0xa - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_MPLS1 = 0x100 - RTA_MPLS2 = 0x200 - RTA_MPLS3 = 0x400 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MPLSOPS = 0x1000000 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_WASCLONED = 0x20000 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x6 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_IWCAPSEGS = 0x400 - RTV_IWMAXSEGS = 0x200 - RTV_MSL = 0x100 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8040720a - SIOCAIFADDR = 0x8040691a - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8040720b - SIOCDIFADDR = 0x80206919 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc028697b - SIOCGETSGCNT = 0xc0207210 - SIOCGETVIFCNT = 0xc028720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0106924 - SIOCGIFDATA = 0xc0206926 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc028698a - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMEDIA = 0xc0306938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPOLLCPU = 0xc020697e - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGIFTSOLEN = 0xc0206980 - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSDRVSPEC = 0x8028697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFPOLLCPU = 0x8020697d - SIOCSIFTSOLEN = 0x8020697f - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NOSIGPIPE = 0x800 - SO_OOBINLINE = 0x100 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDSPACE = 0x100a - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_FASTKEEP = 0x80 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x20 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MINMSS = 0x100 - TCP_MIN_WINSHIFT = 0x5 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_SIGNATURE_ENABLE = 0x10 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x40107458 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047463 - TIOCGSIZE = 0x40087468 - TIOCGWINSZ = 0x40087468 - TIOCISPTMASTER = 0x20007455 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMODG = 0x40047403 - TIOCMODS = 0x80047404 - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2000745f - TIOCSPGRP = 0x80047476 - TIOCSSIZE = 0x80087467 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VCHECKPT = 0x13 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EASYNC = Errno(0x63) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x59) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x55) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDOOFUS = Errno(0x58) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x56) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x63) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5a) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x57) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5b) - ENOMEDIUM = Errno(0x5d) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5c) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUNUSED94 = Errno(0x5e) - EUNUSED95 = Errno(0x5f) - EUNUSED96 = Errno(0x60) - EUNUSED97 = Errno(0x61) - EUNUSED98 = Errno(0x62) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCKPT = Signal(0x21) - SIGCKPTEXIT = Signal(0x22) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_freebsd_386.go b/c/syscall/zerrors_freebsd_386.go deleted file mode 100644 index b4dcbdc7..00000000 --- a/c/syscall/zerrors_freebsd_386.go +++ /dev/null @@ -1,1580 +0,0 @@ -// mkerrors.sh -m32 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m32 _const.go - -//go:build 386 && freebsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0084279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4004427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4008426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x400c4280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80084267 - BIOCSETFNR = 0x80084282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8008427b - BIOCSETZBUF = 0x800c4281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8008426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8030720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8030720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80246989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc01c697b - SIOCGETSGCNT = 0xc0147210 - SIOCGETVIFCNT = 0xc014720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0086924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc024698a - SIOCGIFGROUP = 0xc0246988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0286938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCSDRVSPEC = 0x801c697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40087459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x59) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x55) - ECAPMODE = Errno(0x5e) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDOOFUS = Errno(0x58) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x56) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5a) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x57) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCAPABLE = Errno(0x5d) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5f) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x60) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5c) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGLIBRT = Signal(0x21) - SIGLWP = Signal(0x20) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_freebsd_amd64.go b/c/syscall/zerrors_freebsd_amd64.go deleted file mode 100644 index 19765f64..00000000 --- a/c/syscall/zerrors_freebsd_amd64.go +++ /dev/null @@ -1,1581 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && freebsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0104279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4008427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x40184280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80104267 - BIOCSETFNR = 0x80104282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8010427b - BIOCSETZBUF = 0x80184281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x8 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_32BIT = 0x80000 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8040720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80286987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8040720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80286989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc028697b - SIOCGETSGCNT = 0xc0207210 - SIOCGETVIFCNT = 0xc028720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0106924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc028698a - SIOCGIFGROUP = 0xc0286988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0306938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSDRVSPEC = 0x8028697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x59) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x55) - ECAPMODE = Errno(0x5e) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDOOFUS = Errno(0x58) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x56) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5a) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x57) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCAPABLE = Errno(0x5d) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5f) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x60) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5c) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGLIBRT = Signal(0x21) - SIGLWP = Signal(0x20) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_freebsd_arm.go b/c/syscall/zerrors_freebsd_arm.go deleted file mode 100644 index cc3f67a0..00000000 --- a/c/syscall/zerrors_freebsd_arm.go +++ /dev/null @@ -1,1580 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -//go:build arm && freebsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0084279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4004427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x400c4280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80084267 - BIOCSETFNR = 0x80084282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8008427b - BIOCSETZBUF = 0x800c4281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8030720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8030720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80246989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc01c697b - SIOCGETSGCNT = 0xc0147210 - SIOCGETVIFCNT = 0xc014720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0086924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc024698a - SIOCGIFGROUP = 0xc0246988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0286938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCSDRVSPEC = 0x801c697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x59) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x55) - ECAPMODE = Errno(0x5e) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDOOFUS = Errno(0x58) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x56) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5a) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x57) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCAPABLE = Errno(0x5d) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5f) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x60) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5c) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGLIBRT = Signal(0x21) - SIGLWP = Signal(0x20) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_freebsd_arm64.go b/c/syscall/zerrors_freebsd_arm64.go deleted file mode 100644 index 0aac0ef6..00000000 --- a/c/syscall/zerrors_freebsd_arm64.go +++ /dev/null @@ -1,1581 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -//go:build freebsd && arm64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -m64 _const.go - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0104279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4008427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x40184280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80104267 - BIOCSETFNR = 0x80104282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8010427b - BIOCSETZBUF = 0x80184281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x8 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_32BIT = 0x80000 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8040720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80286987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8040720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80286989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc028697b - SIOCGETSGCNT = 0xc0207210 - SIOCGETVIFCNT = 0xc028720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0106924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc028698a - SIOCGIFGROUP = 0xc0286988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0306938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSDRVSPEC = 0x8028697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x59) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x55) - ECAPMODE = Errno(0x5e) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDOOFUS = Errno(0x58) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x56) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5a) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x57) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCAPABLE = Errno(0x5d) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5f) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x60) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5c) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGLIBRT = Signal(0x21) - SIGLWP = Signal(0x20) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_freebsd_riscv64.go b/c/syscall/zerrors_freebsd_riscv64.go deleted file mode 100644 index 38ce3028..00000000 --- a/c/syscall/zerrors_freebsd_riscv64.go +++ /dev/null @@ -1,1581 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -//go:build freebsd && riscv64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -m64 _const.go - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0104279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4008427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x40184280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80104267 - BIOCSETFNR = 0x80104282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8010427b - BIOCSETZBUF = 0x80184281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8010426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x8 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_32BIT = 0x80000 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8040720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80286987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8040720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80286989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc028697b - SIOCGETSGCNT = 0xc0207210 - SIOCGETVIFCNT = 0xc028720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0106924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc028698a - SIOCGIFGROUP = 0xc0286988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0306938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSDRVSPEC = 0x8028697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40107459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x59) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x55) - ECAPMODE = Errno(0x5e) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDOOFUS = Errno(0x58) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x56) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5a) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x57) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCAPABLE = Errno(0x5d) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5f) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x2d) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EOWNERDEAD = Errno(0x60) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5c) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGLIBRT = Signal(0x21) - SIGLWP = Signal(0x20) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_386.go b/c/syscall/zerrors_linux_386.go deleted file mode 100644 index ae0a2a8a..00000000 --- a/c/syscall/zerrors_linux_386.go +++ /dev/null @@ -1,1355 +0,0 @@ -// mkerrors.sh -m32 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m32 _const.go - -//go:build 386 && linux - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x27 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_PHY = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - EPOLLERR = 0x8 - EPOLLET = -0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - EPOLL_NONBLOCK = 0x800 - ETH_P_1588 = 0x88f7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_AARP = 0x80f3 - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xc - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0xd - F_SETLK64 = 0xd - F_SETLKW = 0xe - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - ICMPV6_FILTER = 0x1 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_ALLMULTI = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DYNAMIC = 0x8000 - IFF_LOOPBACK = 0x8 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFNAMSIZ = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_XFRM_POLICY = 0x11 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DOFORK = 0xb - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_32BIT = 0x40 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_ROUTE = 0x0 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x8000 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_BROADCAST = 0x1 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FASTROUTE = 0x6 - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MULTICAST = 0x2 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_NAME = 0xf - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETFPXREGS = 0x12 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_KILL = 0x8 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_MASK = 0x7f - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SETFPREGS = 0xf - PTRACE_SETFPXREGS = 0x13 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SINGLEBLOCK = 0x21 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSEMU = 0x1f - PTRACE_SYSEMU_SINGLESTEP = 0x20 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xe - RTAX_MTU = 0x2 - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x10 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x4f - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x10 - RTM_NR_MSGTYPES = 0x40 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_MARK = 0x24 - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEERCRED = 0x11 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_REUSEADDR = 0x2 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_QUICKACK = 0xc - TCP_SYNCNT = 0x7 - TCP_WINDOW_CLAMP = 0xa - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPTN = 0x80045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TUNATTACHFILTER = 0x400854d5 - TUNDETACHFILTER = 0x400854d6 - TUNGETFEATURES = 0x800454cf - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETHDRSZ = 0x800454d7 - TUNSETDEBUG = 0x400454c9 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETSNDBUF = 0x400454d4 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETHDRSZ = 0x400454d8 - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_amd64.go b/c/syscall/zerrors_linux_amd64.go deleted file mode 100644 index 4c6950f6..00000000 --- a/c/syscall/zerrors_linux_amd64.go +++ /dev/null @@ -1,1356 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && linux - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x27 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_PHY = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - EPOLLERR = 0x8 - EPOLLET = -0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - EPOLL_NONBLOCK = 0x800 - ETH_P_1588 = 0x88f7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_AARP = 0x80f3 - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - ICMPV6_FILTER = 0x1 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_ALLMULTI = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DYNAMIC = 0x8000 - IFF_LOOPBACK = 0x8 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFNAMSIZ = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_XFRM_POLICY = 0x11 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DOFORK = 0xb - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_32BIT = 0x40 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_ROUTE = 0x0 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_BROADCAST = 0x1 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FASTROUTE = 0x6 - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MULTICAST = 0x2 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_NAME = 0xf - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ARCH_PRCTL = 0x1e - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETFPXREGS = 0x12 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_KILL = 0x8 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_MASK = 0x7f - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SETFPREGS = 0xf - PTRACE_SETFPXREGS = 0x13 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SINGLEBLOCK = 0x21 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSEMU = 0x1f - PTRACE_SYSEMU_SINGLESTEP = 0x20 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xe - RTAX_MTU = 0x2 - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x10 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x4f - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x10 - RTM_NR_MSGTYPES = 0x40 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_MARK = 0x24 - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEERCRED = 0x11 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_REUSEADDR = 0x2 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_QUICKACK = 0xc - TCP_SYNCNT = 0x7 - TCP_WINDOW_CLAMP = 0xa - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPTN = 0x80045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETFEATURES = 0x800454cf - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETHDRSZ = 0x800454d7 - TUNSETDEBUG = 0x400454c9 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETSNDBUF = 0x400454d4 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETHDRSZ = 0x400454d8 - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_arm.go b/c/syscall/zerrors_linux_arm.go deleted file mode 100644 index 3e4e47cf..00000000 --- a/c/syscall/zerrors_linux_arm.go +++ /dev/null @@ -1,1368 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -//go:build arm && linux - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x27 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_PHY = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ELF_NGREG = 0x12 - ELF_PRARGSZ = 0x50 - EPOLLERR = 0x8 - EPOLLET = -0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - EPOLL_NONBLOCK = 0x800 - ETH_P_1588 = 0x88f7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_AARP = 0x80f3 - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xc - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0xd - F_SETLK64 = 0xd - F_SETLKW = 0xe - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - ICMPV6_FILTER = 0x1 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_ALLMULTI = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DYNAMIC = 0x8000 - IFF_LOOPBACK = 0x8 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFNAMSIZ = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_XFRM_POLICY = 0x11 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DOFORK = 0xb - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x1000 - O_LARGEFILE = 0x20000 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x1000 - O_SYNC = 0x1000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_BROADCAST = 0x1 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FASTROUTE = 0x6 - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MULTICAST = 0x2 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CLEAR_SECCOMP_FILTER = 0x25 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECCOMP_FILTER = 0x23 - PR_GET_SECUREBITS = 0x1b - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SECCOMP_FILTER_EVENT = 0x1 - PR_SECCOMP_FILTER_SYSCALL = 0x0 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_NAME = 0xf - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_SECCOMP = 0x16 - PR_SET_SECCOMP_FILTER = 0x24 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETCRUNCHREGS = 0x19 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETHBPREGS = 0x1d - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETVFPREGS = 0x1b - PTRACE_GETWMMXREGS = 0x12 - PTRACE_GET_THREAD_AREA = 0x16 - PTRACE_KILL = 0x8 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_MASK = 0x7f - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SETCRUNCHREGS = 0x1a - PTRACE_SETFPREGS = 0xf - PTRACE_SETHBPREGS = 0x1e - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETVFPREGS = 0x1c - PTRACE_SETWMMXREGS = 0x13 - PTRACE_SET_SYSCALL = 0x17 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - PT_DATA_ADDR = 0x10004 - PT_TEXT_ADDR = 0x10000 - PT_TEXT_END_ADDR = 0x10008 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xe - RTAX_MTU = 0x2 - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x10 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x4f - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x10 - RTM_NR_MSGTYPES = 0x40 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_MARK = 0x24 - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEERCRED = 0x11 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_REUSEADDR = 0x2 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_QUICKACK = 0xc - TCP_SYNCNT = 0x7 - TCP_WINDOW_CLAMP = 0xa - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPTN = 0x80045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TUNATTACHFILTER = 0x400854d5 - TUNDETACHFILTER = 0x400854d6 - TUNGETFEATURES = 0x800454cf - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETHDRSZ = 0x800454d7 - TUNSETDEBUG = 0x400454c9 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETSNDBUF = 0x400454d4 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETHDRSZ = 0x400454d8 - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_arm64.go b/c/syscall/zerrors_linux_arm64.go deleted file mode 100644 index dda2f7c8..00000000 --- a/c/syscall/zerrors_linux_arm64.go +++ /dev/null @@ -1,1632 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -//go:build arm64 && linux - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x29 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x1000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_802_1Q_VLAN = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BONDING = 0x20 - IFF_BRIDGE_PORT = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DISABLE_NETPOLL = 0x1000 - IFF_DONT_BRIDGE = 0x800 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_EBRIDGE = 0x2 - IFF_ECHO = 0x40000 - IFF_ISATAP = 0x80 - IFF_LIVE_ADDR_CHANGE = 0x100000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MACVLAN = 0x200000 - IFF_MACVLAN_PORT = 0x2000 - IFF_MASTER = 0x400 - IFF_MASTER_8023AD = 0x8 - IFF_MASTER_ALB = 0x10 - IFF_MASTER_ARPMON = 0x100 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_OVS_DATAPATH = 0x8000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_SLAVE_INACTIVE = 0x4 - IFF_SLAVE_NEEDARP = 0x40 - IFF_SUPP_NOFCS = 0x80000 - IFF_TAP = 0x2 - IFF_TEAM_PORT = 0x40000 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_TX_SKB_SHARING = 0x10000 - IFF_UNICAST_FLT = 0x20000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFF_WAN_HDLC = 0x200 - IFF_XMIT_DST_RELEASE = 0x400 - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x540b - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x2 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x100 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETHDRSZ = 0x800454d7 - TUNSETDEBUG = 0x400454c9 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETHDRSZ = 0x400454d8 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x6 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_loong64.go b/c/syscall/zerrors_linux_loong64.go deleted file mode 100644 index 37fa6e1a..00000000 --- a/c/syscall/zerrors_linux_loong64.go +++ /dev/null @@ -1,1931 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2e - AF_MCTP = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_MCTP = 0x122 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CLONE_ARGS_SIZE_VER0 = 0x40 - CLONE_ARGS_SIZE_VER1 = 0x50 - CLONE_ARGS_SIZE_VER2 = 0x58 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CFM = 0x8902 - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MCTP = 0xfa - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MRP = 0x88e3 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_REALTEK = 0x8899 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x1000 - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERNET = 0x8f - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MPTCP = 0x106 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVERR_RFC4884 = 0x1f - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVERR_RFC4884 = 0x1a - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_COLD = 0x14 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_PAGEOUT = 0x15 - MADV_POPULATE_READ = 0x16 - MADV_POPULATE_WRITE = 0x17 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOSYMFOLLOW = 0x100 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_IO_FLUSHER = 0x3a - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_TAGGED_ADDR_CTRL = 0x38 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_MTE_TAG_MASK = 0x7fff8 - PR_MTE_TAG_SHIFT = 0x3 - PR_MTE_TCF_ASYNC = 0x4 - PR_MTE_TCF_MASK = 0x6 - PR_MTE_TCF_NONE = 0x0 - PR_MTE_TCF_SHIFT = 0x1 - PR_MTE_TCF_SYNC = 0x2 - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_GET_ENABLED_KEYS = 0x3d - PR_PAC_RESET_KEYS = 0x36 - PR_PAC_SET_ENABLED_KEYS = 0x3c - PR_SCHED_CORE = 0x3e - PR_SCHED_CORE_CREATE = 0x1 - PR_SCHED_CORE_GET = 0x0 - PR_SCHED_CORE_MAX = 0x4 - PR_SCHED_CORE_SCOPE_PROCESS_GROUP = 0x2 - PR_SCHED_CORE_SCOPE_THREAD = 0x0 - PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1 - PR_SCHED_CORE_SHARE_FROM = 0x3 - PR_SCHED_CORE_SHARE_TO = 0x2 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_IO_FLUSHER = 0x39 - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_SYSCALL_USER_DISPATCH = 0x3b - PR_SET_TAGGED_ADDR_CTRL = 0x37 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SET_VMA = 0x53564d41 - PR_SET_VMA_ANON_NAME = 0x0 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_L1D_FLUSH = 0x2 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_SYS_DISPATCH_OFF = 0x0 - PR_SYS_DISPATCH_ON = 0x1 - PR_TAGGED_ADDR_ENABLE = 0x1 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_SYSEMU = 0x1f - PTRACE_SYSEMU_SINGLESTEP = 0x20 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELLINKPROP = 0x6d - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNEXTHOPBUCKET = 0x75 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_DELVLAN = 0x71 - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_OFFLOAD = 0x4000 - RTM_F_OFFLOAD_FAILED = 0x20000000 - RTM_F_PREFIX = 0x800 - RTM_F_TRAP = 0x8000 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETLINKPROP = 0x6e - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNEXTHOPBUCKET = 0x76 - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_GETVLAN = 0x72 - RTM_MAX = 0x77 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWLINKPROP = 0x6c - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNEXTHOPBUCKET = 0x74 - RTM_NEWNSID = 0x58 - RTM_NEWNVLAN = 0x70 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x1a - RTM_NR_MSGTYPES = 0x68 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x59 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_TRAP = 0x40 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KEEPALIVED = 0x12 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OPENR = 0x63 - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_OLD = 0x8906 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_BUF_LOCK_MASK = 0x3 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RCVBUF_LOCK = 0x2 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_SNDBUF_LOCK = 0x1 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_BLUETOOTH = 0x112 - SOL_CAIF = 0x116 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x1000 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUF_LOCK = 0x48 - SO_BUSY_POLL = 0x2e - SO_BUSY_POLL_BUDGET = 0x46 - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NETNS_COOKIE = 0x47 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PREFER_BUSY_POLL = 0x45 - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_RESERVE_MEM = 0x49 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x540b - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_TX_DELAY = 0x25 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x100 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x6 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_mips.go b/c/syscall/zerrors_linux_mips.go deleted file mode 100644 index 6f8d70a8..00000000 --- a/c/syscall/zerrors_linux_mips.go +++ /dev/null @@ -1,1639 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x29 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x2000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x21 - F_GETLK64 = 0x21 - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x22 - F_SETLK64 = 0x22 - F_SETLKW = 0x23 - F_SETLKW64 = 0x23 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x2000 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x5 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x40047309 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x1008 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x5407 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x5410 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x8000 - TUNATTACHFILTER = 0x800854d5 - TUNDETACHFILTER = 0x800854d6 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x400854db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETHDRSZ = 0x400454d7 - TUNSETDEBUG = 0x800454c9 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETHDRSZ = 0x800454d8 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x4 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x7d) - EADDRNOTAVAIL = Errno(0x7e) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x7c) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x95) - EBADE = Errno(0x32) - EBADF = Errno(0x9) - EBADFD = Errno(0x51) - EBADMSG = Errno(0x4d) - EBADR = Errno(0x33) - EBADRQC = Errno(0x36) - EBADSLT = Errno(0x37) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x9e) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x25) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x82) - ECONNREFUSED = Errno(0x92) - ECONNRESET = Errno(0x83) - EDEADLK = Errno(0x2d) - EDEADLOCK = Errno(0x38) - EDESTADDRREQ = Errno(0x60) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x46d) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x93) - EHOSTUNREACH = Errno(0x94) - EHWPOISON = Errno(0xa8) - EIDRM = Errno(0x24) - EILSEQ = Errno(0x58) - EINIT = Errno(0x8d) - EINPROGRESS = Errno(0x96) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x85) - EISDIR = Errno(0x15) - EISNAM = Errno(0x8b) - EKEYEXPIRED = Errno(0xa2) - EKEYREJECTED = Errno(0xa4) - EKEYREVOKED = Errno(0xa3) - EL2HLT = Errno(0x2c) - EL2NSYNC = Errno(0x26) - EL3HLT = Errno(0x27) - EL3RST = Errno(0x28) - ELIBACC = Errno(0x53) - ELIBBAD = Errno(0x54) - ELIBEXEC = Errno(0x57) - ELIBMAX = Errno(0x56) - ELIBSCN = Errno(0x55) - ELNRNG = Errno(0x29) - ELOOP = Errno(0x5a) - EMEDIUMTYPE = Errno(0xa0) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x61) - EMULTIHOP = Errno(0x4a) - ENAMETOOLONG = Errno(0x4e) - ENAVAIL = Errno(0x8a) - ENETDOWN = Errno(0x7f) - ENETRESET = Errno(0x81) - ENETUNREACH = Errno(0x80) - ENFILE = Errno(0x17) - ENOANO = Errno(0x35) - ENOBUFS = Errno(0x84) - ENOCSI = Errno(0x2b) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0xa1) - ENOLCK = Errno(0x2e) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x9f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x23) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x63) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x59) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x86) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x5d) - ENOTNAM = Errno(0x89) - ENOTRECOVERABLE = Errno(0xa6) - ENOTSOCK = Errno(0x5f) - ENOTSUP = Errno(0x7a) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x50) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x7a) - EOVERFLOW = Errno(0x4f) - EOWNERDEAD = Errno(0xa5) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x7b) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x78) - EPROTOTYPE = Errno(0x62) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x52) - EREMDEV = Errno(0x8e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x8c) - ERESTART = Errno(0x5b) - ERFKILL = Errno(0xa7) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x8f) - ESOCKTNOSUPPORT = Errno(0x79) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x97) - ESTRPIPE = Errno(0x5c) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x91) - ETOOMANYREFS = Errno(0x90) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x87) - EUNATCH = Errno(0x2a) - EUSERS = Errno(0x5e) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x34) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x12) - SIGCLD = Signal(0x12) - SIGCONT = Signal(0x19) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x16) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x16) - SIGPROF = Signal(0x1d) - SIGPWR = Signal(0x13) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x17) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x18) - SIGTTIN = Signal(0x1a) - SIGTTOU = Signal(0x1b) - SIGURG = Signal(0x15) - SIGUSR1 = Signal(0x10) - SIGUSR2 = Signal(0x11) - SIGVTALRM = Signal(0x1c) - SIGWINCH = Signal(0x14) - SIGXCPU = Signal(0x1e) - SIGXFSZ = Signal(0x1f) -) diff --git a/c/syscall/zerrors_linux_mips64.go b/c/syscall/zerrors_linux_mips64.go deleted file mode 100644 index 002d4dd8..00000000 --- a/c/syscall/zerrors_linux_mips64.go +++ /dev/null @@ -1,1622 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x28 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - EPOLL_NONBLOCK = 0x80 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x2000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xe - F_GETLK64 = 0xe - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_802_1Q_VLAN = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BONDING = 0x20 - IFF_BRIDGE_PORT = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DISABLE_NETPOLL = 0x1000 - IFF_DONT_BRIDGE = 0x800 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_EBRIDGE = 0x2 - IFF_ECHO = 0x40000 - IFF_ISATAP = 0x80 - IFF_LIVE_ADDR_CHANGE = 0x100000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MACVLAN_PORT = 0x2000 - IFF_MASTER = 0x400 - IFF_MASTER_8023AD = 0x8 - IFF_MASTER_ALB = 0x10 - IFF_MASTER_ARPMON = 0x100 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_OVS_DATAPATH = 0x8000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_SLAVE_INACTIVE = 0x4 - IFF_SLAVE_NEEDARP = 0x40 - IFF_SUPP_NOFCS = 0x80000 - IFF_TAP = 0x2 - IFF_TEAM_PORT = 0x40000 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_TX_SKB_SHARING = 0x10000 - IFF_UNICAST_FLT = 0x20000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFF_WAN_HDLC = 0x200 - IFF_XMIT_DST_RELEASE = 0x400 - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x0 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x5 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x40047309 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x1008 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x5407 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_QUICKACK = 0xc - TCP_SYNCNT = 0x7 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x5410 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x8000 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETHDRSZ = 0x400454d7 - TUNSETDEBUG = 0x800454c9 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETHDRSZ = 0x800454d8 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x4 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x7d) - EADDRNOTAVAIL = Errno(0x7e) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x7c) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x95) - EBADE = Errno(0x32) - EBADF = Errno(0x9) - EBADFD = Errno(0x51) - EBADMSG = Errno(0x4d) - EBADR = Errno(0x33) - EBADRQC = Errno(0x36) - EBADSLT = Errno(0x37) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x9e) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x25) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x82) - ECONNREFUSED = Errno(0x92) - ECONNRESET = Errno(0x83) - EDEADLK = Errno(0x2d) - EDEADLOCK = Errno(0x38) - EDESTADDRREQ = Errno(0x60) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x46d) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x93) - EHOSTUNREACH = Errno(0x94) - EHWPOISON = Errno(0xa8) - EIDRM = Errno(0x24) - EILSEQ = Errno(0x58) - EINIT = Errno(0x8d) - EINPROGRESS = Errno(0x96) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x85) - EISDIR = Errno(0x15) - EISNAM = Errno(0x8b) - EKEYEXPIRED = Errno(0xa2) - EKEYREJECTED = Errno(0xa4) - EKEYREVOKED = Errno(0xa3) - EL2HLT = Errno(0x2c) - EL2NSYNC = Errno(0x26) - EL3HLT = Errno(0x27) - EL3RST = Errno(0x28) - ELIBACC = Errno(0x53) - ELIBBAD = Errno(0x54) - ELIBEXEC = Errno(0x57) - ELIBMAX = Errno(0x56) - ELIBSCN = Errno(0x55) - ELNRNG = Errno(0x29) - ELOOP = Errno(0x5a) - EMEDIUMTYPE = Errno(0xa0) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x61) - EMULTIHOP = Errno(0x4a) - ENAMETOOLONG = Errno(0x4e) - ENAVAIL = Errno(0x8a) - ENETDOWN = Errno(0x7f) - ENETRESET = Errno(0x81) - ENETUNREACH = Errno(0x80) - ENFILE = Errno(0x17) - ENOANO = Errno(0x35) - ENOBUFS = Errno(0x84) - ENOCSI = Errno(0x2b) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0xa1) - ENOLCK = Errno(0x2e) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x9f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x23) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x63) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x59) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x86) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x5d) - ENOTNAM = Errno(0x89) - ENOTRECOVERABLE = Errno(0xa6) - ENOTSOCK = Errno(0x5f) - ENOTSUP = Errno(0x7a) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x50) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x7a) - EOVERFLOW = Errno(0x4f) - EOWNERDEAD = Errno(0xa5) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x7b) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x78) - EPROTOTYPE = Errno(0x62) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x52) - EREMDEV = Errno(0x8e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x8c) - ERESTART = Errno(0x5b) - ERFKILL = Errno(0xa7) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x8f) - ESOCKTNOSUPPORT = Errno(0x79) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x97) - ESTRPIPE = Errno(0x5c) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x91) - ETOOMANYREFS = Errno(0x90) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x87) - EUNATCH = Errno(0x2a) - EUSERS = Errno(0x5e) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x34) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x12) - SIGCLD = Signal(0x12) - SIGCONT = Signal(0x19) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x16) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x16) - SIGPROF = Signal(0x1d) - SIGPWR = Signal(0x13) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x17) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x18) - SIGTTIN = Signal(0x1a) - SIGTTOU = Signal(0x1b) - SIGURG = Signal(0x15) - SIGUSR1 = Signal(0x10) - SIGUSR2 = Signal(0x11) - SIGVTALRM = Signal(0x1c) - SIGWINCH = Signal(0x14) - SIGXCPU = Signal(0x1e) - SIGXFSZ = Signal(0x1f) -) diff --git a/c/syscall/zerrors_linux_mips64le.go b/c/syscall/zerrors_linux_mips64le.go deleted file mode 100644 index 002d4dd8..00000000 --- a/c/syscall/zerrors_linux_mips64le.go +++ /dev/null @@ -1,1622 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x28 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - EPOLL_NONBLOCK = 0x80 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x2000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xe - F_GETLK64 = 0xe - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_802_1Q_VLAN = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BONDING = 0x20 - IFF_BRIDGE_PORT = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DISABLE_NETPOLL = 0x1000 - IFF_DONT_BRIDGE = 0x800 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_EBRIDGE = 0x2 - IFF_ECHO = 0x40000 - IFF_ISATAP = 0x80 - IFF_LIVE_ADDR_CHANGE = 0x100000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MACVLAN_PORT = 0x2000 - IFF_MASTER = 0x400 - IFF_MASTER_8023AD = 0x8 - IFF_MASTER_ALB = 0x10 - IFF_MASTER_ARPMON = 0x100 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_OVS_DATAPATH = 0x8000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_SLAVE_INACTIVE = 0x4 - IFF_SLAVE_NEEDARP = 0x40 - IFF_SUPP_NOFCS = 0x80000 - IFF_TAP = 0x2 - IFF_TEAM_PORT = 0x40000 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_TX_SKB_SHARING = 0x10000 - IFF_UNICAST_FLT = 0x20000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFF_WAN_HDLC = 0x200 - IFF_XMIT_DST_RELEASE = 0x400 - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x0 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x5 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x40047309 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x1008 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x5407 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_QUICKACK = 0xc - TCP_SYNCNT = 0x7 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x5410 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x8000 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETHDRSZ = 0x400454d7 - TUNSETDEBUG = 0x800454c9 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETHDRSZ = 0x800454d8 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x4 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x7d) - EADDRNOTAVAIL = Errno(0x7e) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x7c) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x95) - EBADE = Errno(0x32) - EBADF = Errno(0x9) - EBADFD = Errno(0x51) - EBADMSG = Errno(0x4d) - EBADR = Errno(0x33) - EBADRQC = Errno(0x36) - EBADSLT = Errno(0x37) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x9e) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x25) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x82) - ECONNREFUSED = Errno(0x92) - ECONNRESET = Errno(0x83) - EDEADLK = Errno(0x2d) - EDEADLOCK = Errno(0x38) - EDESTADDRREQ = Errno(0x60) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x46d) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x93) - EHOSTUNREACH = Errno(0x94) - EHWPOISON = Errno(0xa8) - EIDRM = Errno(0x24) - EILSEQ = Errno(0x58) - EINIT = Errno(0x8d) - EINPROGRESS = Errno(0x96) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x85) - EISDIR = Errno(0x15) - EISNAM = Errno(0x8b) - EKEYEXPIRED = Errno(0xa2) - EKEYREJECTED = Errno(0xa4) - EKEYREVOKED = Errno(0xa3) - EL2HLT = Errno(0x2c) - EL2NSYNC = Errno(0x26) - EL3HLT = Errno(0x27) - EL3RST = Errno(0x28) - ELIBACC = Errno(0x53) - ELIBBAD = Errno(0x54) - ELIBEXEC = Errno(0x57) - ELIBMAX = Errno(0x56) - ELIBSCN = Errno(0x55) - ELNRNG = Errno(0x29) - ELOOP = Errno(0x5a) - EMEDIUMTYPE = Errno(0xa0) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x61) - EMULTIHOP = Errno(0x4a) - ENAMETOOLONG = Errno(0x4e) - ENAVAIL = Errno(0x8a) - ENETDOWN = Errno(0x7f) - ENETRESET = Errno(0x81) - ENETUNREACH = Errno(0x80) - ENFILE = Errno(0x17) - ENOANO = Errno(0x35) - ENOBUFS = Errno(0x84) - ENOCSI = Errno(0x2b) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0xa1) - ENOLCK = Errno(0x2e) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x9f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x23) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x63) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x59) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x86) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x5d) - ENOTNAM = Errno(0x89) - ENOTRECOVERABLE = Errno(0xa6) - ENOTSOCK = Errno(0x5f) - ENOTSUP = Errno(0x7a) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x50) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x7a) - EOVERFLOW = Errno(0x4f) - EOWNERDEAD = Errno(0xa5) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x7b) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x78) - EPROTOTYPE = Errno(0x62) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x52) - EREMDEV = Errno(0x8e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x8c) - ERESTART = Errno(0x5b) - ERFKILL = Errno(0xa7) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x8f) - ESOCKTNOSUPPORT = Errno(0x79) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x97) - ESTRPIPE = Errno(0x5c) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x91) - ETOOMANYREFS = Errno(0x90) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x87) - EUNATCH = Errno(0x2a) - EUSERS = Errno(0x5e) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x34) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x12) - SIGCLD = Signal(0x12) - SIGCONT = Signal(0x19) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x16) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x16) - SIGPROF = Signal(0x1d) - SIGPWR = Signal(0x13) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x17) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x18) - SIGTTIN = Signal(0x1a) - SIGTTOU = Signal(0x1b) - SIGURG = Signal(0x15) - SIGUSR1 = Signal(0x10) - SIGUSR2 = Signal(0x11) - SIGVTALRM = Signal(0x1c) - SIGWINCH = Signal(0x14) - SIGXCPU = Signal(0x1e) - SIGXFSZ = Signal(0x1f) -) diff --git a/c/syscall/zerrors_linux_mipsle.go b/c/syscall/zerrors_linux_mipsle.go deleted file mode 100644 index 6f8d70a8..00000000 --- a/c/syscall/zerrors_linux_mipsle.go +++ /dev/null @@ -1,1639 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x29 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x2000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x21 - F_GETLK64 = 0x21 - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x22 - F_SETLK64 = 0x22 - F_SETLKW = 0x23 - F_SETLKW64 = 0x23 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x2000 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x5 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x40047309 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x1008 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x5407 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x5410 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x8000 - TUNATTACHFILTER = 0x800854d5 - TUNDETACHFILTER = 0x800854d6 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x400854db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETHDRSZ = 0x400454d7 - TUNSETDEBUG = 0x800454c9 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETHDRSZ = 0x800454d8 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x4 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x7d) - EADDRNOTAVAIL = Errno(0x7e) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x7c) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x95) - EBADE = Errno(0x32) - EBADF = Errno(0x9) - EBADFD = Errno(0x51) - EBADMSG = Errno(0x4d) - EBADR = Errno(0x33) - EBADRQC = Errno(0x36) - EBADSLT = Errno(0x37) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x9e) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x25) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x82) - ECONNREFUSED = Errno(0x92) - ECONNRESET = Errno(0x83) - EDEADLK = Errno(0x2d) - EDEADLOCK = Errno(0x38) - EDESTADDRREQ = Errno(0x60) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x46d) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x93) - EHOSTUNREACH = Errno(0x94) - EHWPOISON = Errno(0xa8) - EIDRM = Errno(0x24) - EILSEQ = Errno(0x58) - EINIT = Errno(0x8d) - EINPROGRESS = Errno(0x96) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x85) - EISDIR = Errno(0x15) - EISNAM = Errno(0x8b) - EKEYEXPIRED = Errno(0xa2) - EKEYREJECTED = Errno(0xa4) - EKEYREVOKED = Errno(0xa3) - EL2HLT = Errno(0x2c) - EL2NSYNC = Errno(0x26) - EL3HLT = Errno(0x27) - EL3RST = Errno(0x28) - ELIBACC = Errno(0x53) - ELIBBAD = Errno(0x54) - ELIBEXEC = Errno(0x57) - ELIBMAX = Errno(0x56) - ELIBSCN = Errno(0x55) - ELNRNG = Errno(0x29) - ELOOP = Errno(0x5a) - EMEDIUMTYPE = Errno(0xa0) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x61) - EMULTIHOP = Errno(0x4a) - ENAMETOOLONG = Errno(0x4e) - ENAVAIL = Errno(0x8a) - ENETDOWN = Errno(0x7f) - ENETRESET = Errno(0x81) - ENETUNREACH = Errno(0x80) - ENFILE = Errno(0x17) - ENOANO = Errno(0x35) - ENOBUFS = Errno(0x84) - ENOCSI = Errno(0x2b) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0xa1) - ENOLCK = Errno(0x2e) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x9f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x23) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x63) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x59) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x86) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x5d) - ENOTNAM = Errno(0x89) - ENOTRECOVERABLE = Errno(0xa6) - ENOTSOCK = Errno(0x5f) - ENOTSUP = Errno(0x7a) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x50) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x7a) - EOVERFLOW = Errno(0x4f) - EOWNERDEAD = Errno(0xa5) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x7b) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x78) - EPROTOTYPE = Errno(0x62) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x52) - EREMDEV = Errno(0x8e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x8c) - ERESTART = Errno(0x5b) - ERFKILL = Errno(0xa7) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x8f) - ESOCKTNOSUPPORT = Errno(0x79) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x97) - ESTRPIPE = Errno(0x5c) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x91) - ETOOMANYREFS = Errno(0x90) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x87) - EUNATCH = Errno(0x2a) - EUSERS = Errno(0x5e) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x34) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x12) - SIGCLD = Signal(0x12) - SIGCONT = Signal(0x19) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x16) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x16) - SIGPROF = Signal(0x1d) - SIGPWR = Signal(0x13) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x17) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x18) - SIGTTIN = Signal(0x1a) - SIGTTOU = Signal(0x1b) - SIGURG = Signal(0x15) - SIGUSR1 = Signal(0x10) - SIGUSR2 = Signal(0x11) - SIGVTALRM = Signal(0x1c) - SIGWINCH = Signal(0x14) - SIGXCPU = Signal(0x1e) - SIGXFSZ = Signal(0x1f) -) diff --git a/c/syscall/zerrors_linux_ppc64.go b/c/syscall/zerrors_linux_ppc64.go deleted file mode 100644 index 1fe5088d..00000000 --- a/c/syscall/zerrors_linux_ppc64.go +++ /dev/null @@ -1,1687 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build ppc64 && linux - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x28 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x17 - B110 = 0x3 - B115200 = 0x11 - B1152000 = 0x18 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x19 - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x1a - B230400 = 0x12 - B2400 = 0xb - B2500000 = 0x1b - B300 = 0x7 - B3000000 = 0x1c - B3500000 = 0x1d - B38400 = 0xf - B4000000 = 0x1e - B460800 = 0x13 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x14 - B57600 = 0x10 - B576000 = 0x15 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x16 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIGNAL = 0xff - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - EPOLL_NONBLOCK = 0x800 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0xd - F_SETLKW = 0x7 - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x4000 - ICANON = 0x100 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x400 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_802_1Q_VLAN = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BONDING = 0x20 - IFF_BRIDGE_PORT = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DISABLE_NETPOLL = 0x1000 - IFF_DONT_BRIDGE = 0x800 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_EBRIDGE = 0x2 - IFF_ECHO = 0x40000 - IFF_ISATAP = 0x80 - IFF_LIVE_ADDR_CHANGE = 0x100000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MACVLAN = 0x200000 - IFF_MACVLAN_PORT = 0x2000 - IFF_MASTER = 0x400 - IFF_MASTER_8023AD = 0x8 - IFF_MASTER_ALB = 0x10 - IFF_MASTER_ARPMON = 0x100 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_OVS_DATAPATH = 0x8000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_SLAVE_INACTIVE = 0x4 - IFF_SLAVE_NEEDARP = 0x40 - IFF_SUPP_NOFCS = 0x80000 - IFF_TAP = 0x2 - IFF_TEAM_PORT = 0x40000 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_TX_SKB_SHARING = 0x10000 - IFF_UNICAST_FLT = 0x20000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFF_WAN_HDLC = 0x200 - IFF_XMIT_DST_RELEASE = 0x400 - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x80 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_LOCKED = 0x80 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x40 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x2000 - MCL_FUTURE = 0x4000 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80000000 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x2 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x20000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x1000 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_SAO = 0x10 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETEVRREGS = 0x14 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGS64 = 0x16 - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GETVRREGS = 0x12 - PTRACE_GETVSRREGS = 0x1b - PTRACE_GET_DEBUGREG = 0x19 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETEVRREGS = 0x15 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGS64 = 0x17 - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SETVRREGS = 0x13 - PTRACE_SETVSRREGS = 0x1c - PTRACE_SET_DEBUGREG = 0x1a - PTRACE_SINGLEBLOCK = 0x100 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - PT_CCR = 0x26 - PT_CTR = 0x23 - PT_DAR = 0x29 - PT_DSCR = 0x2c - PT_DSISR = 0x2a - PT_FPR0 = 0x30 - PT_FPSCR = 0x50 - PT_LNK = 0x24 - PT_MSR = 0x21 - PT_NIP = 0x20 - PT_ORIG_R3 = 0x22 - PT_R0 = 0x0 - PT_R1 = 0x1 - PT_R10 = 0xa - PT_R11 = 0xb - PT_R12 = 0xc - PT_R13 = 0xd - PT_R14 = 0xe - PT_R15 = 0xf - PT_R16 = 0x10 - PT_R17 = 0x11 - PT_R18 = 0x12 - PT_R19 = 0x13 - PT_R2 = 0x2 - PT_R20 = 0x14 - PT_R21 = 0x15 - PT_R22 = 0x16 - PT_R23 = 0x17 - PT_R24 = 0x18 - PT_R25 = 0x19 - PT_R26 = 0x1a - PT_R27 = 0x1b - PT_R28 = 0x1c - PT_R29 = 0x1d - PT_R3 = 0x3 - PT_R30 = 0x1e - PT_R31 = 0x1f - PT_R4 = 0x4 - PT_R5 = 0x5 - PT_R6 = 0x6 - PT_R7 = 0x7 - PT_R8 = 0x8 - PT_R9 = 0x9 - PT_REGS_COUNT = 0x2c - PT_RESULT = 0x2b - PT_SOFTE = 0x27 - PT_TRAP = 0x28 - PT_VR0 = 0x52 - PT_VRSAVE = 0x94 - PT_VSCR = 0x93 - PT_VSR0 = 0x96 - PT_VSR31 = 0xd4 - PT_XER = 0x25 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x14 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x15 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x10 - SO_RCVTIMEO = 0x12 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x11 - SO_SNDTIMEO = 0x13 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x2000741f - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_QUICKACK = 0xc - TCP_SYNCNT = 0x7 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x2 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x40045432 - TIOCGETC = 0x40067412 - TIOCGETD = 0x5424 - TIOCGETP = 0x40067408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGLTC = 0x40067474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x4004667f - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_LOOP = 0x8000 - TIOCM_OUT1 = 0x2000 - TIOCM_OUT2 = 0x4000 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETC = 0x80067411 - TIOCSETD = 0x5423 - TIOCSETN = 0x8006740a - TIOCSETP = 0x80067409 - TIOCSIG = 0x80045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSLTC = 0x80067475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTART = 0x2000746e - TIOCSTI = 0x5412 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x400000 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETHDRSZ = 0x400454d7 - TUNSETDEBUG = 0x800454c9 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETHDRSZ = 0x800454d8 - VDISCARD = 0x10 - VEOF = 0x4 - VEOL = 0x6 - VEOL2 = 0x8 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x5 - VQUIT = 0x1 - VREPRINT = 0xb - VSTART = 0xd - VSTOP = 0xe - VSUSP = 0xc - VSWTC = 0x9 - VT0 = 0x0 - VT1 = 0x10000 - VTDLY = 0x10000 - VTIME = 0x7 - VWERASE = 0xa - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x3a) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_ppc64le.go b/c/syscall/zerrors_linux_ppc64le.go deleted file mode 100644 index 4e3f7aa7..00000000 --- a/c/syscall/zerrors_linux_ppc64le.go +++ /dev/null @@ -1,1711 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build ppc64le && linux - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x29 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x17 - B110 = 0x3 - B115200 = 0x11 - B1152000 = 0x18 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x19 - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x1a - B230400 = 0x12 - B2400 = 0xb - B2500000 = 0x1b - B300 = 0x7 - B3000000 = 0x1c - B3500000 = 0x1d - B38400 = 0xf - B4000000 = 0x1e - B460800 = 0x13 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x14 - B57600 = 0x10 - B576000 = 0x15 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x16 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIGNAL = 0xff - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0xd - F_SETLKW = 0x7 - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x4000 - ICANON = 0x100 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x400 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_NODAD = 0x2 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x7 - IFF_802_1Q_VLAN = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BONDING = 0x20 - IFF_BRIDGE_PORT = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DISABLE_NETPOLL = 0x1000 - IFF_DONT_BRIDGE = 0x800 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_EBRIDGE = 0x2 - IFF_ECHO = 0x40000 - IFF_ISATAP = 0x80 - IFF_LIVE_ADDR_CHANGE = 0x100000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MACVLAN = 0x200000 - IFF_MACVLAN_PORT = 0x2000 - IFF_MASTER = 0x400 - IFF_MASTER_8023AD = 0x8 - IFF_MASTER_ALB = 0x10 - IFF_MASTER_ARPMON = 0x100 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_OVS_DATAPATH = 0x8000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_SLAVE_INACTIVE = 0x4 - IFF_SLAVE_NEEDARP = 0x40 - IFF_SUPP_NOFCS = 0x80000 - IFF_TAP = 0x2 - IFF_TEAM_PORT = 0x40000 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_TX_SKB_SHARING = 0x10000 - IFF_UNICAST_FLT = 0x20000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFF_WAN_HDLC = 0x200 - IFF_XMIT_DST_RELEASE = 0x400 - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x80 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x80 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x40 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x2000 - MCL_FUTURE = 0x4000 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80000000 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x2 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x20000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x1000 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_SAO = 0x10 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETEVRREGS = 0x14 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGS64 = 0x16 - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GETVRREGS = 0x12 - PTRACE_GETVSRREGS = 0x1b - PTRACE_GET_DEBUGREG = 0x19 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETEVRREGS = 0x15 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGS64 = 0x17 - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SETVRREGS = 0x13 - PTRACE_SETVSRREGS = 0x1c - PTRACE_SET_DEBUGREG = 0x1a - PTRACE_SINGLEBLOCK = 0x100 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - PT_CCR = 0x26 - PT_CTR = 0x23 - PT_DAR = 0x29 - PT_DSCR = 0x2c - PT_DSISR = 0x2a - PT_FPR0 = 0x30 - PT_FPSCR = 0x50 - PT_LNK = 0x24 - PT_MSR = 0x21 - PT_NIP = 0x20 - PT_ORIG_R3 = 0x22 - PT_R0 = 0x0 - PT_R1 = 0x1 - PT_R10 = 0xa - PT_R11 = 0xb - PT_R12 = 0xc - PT_R13 = 0xd - PT_R14 = 0xe - PT_R15 = 0xf - PT_R16 = 0x10 - PT_R17 = 0x11 - PT_R18 = 0x12 - PT_R19 = 0x13 - PT_R2 = 0x2 - PT_R20 = 0x14 - PT_R21 = 0x15 - PT_R22 = 0x16 - PT_R23 = 0x17 - PT_R24 = 0x18 - PT_R25 = 0x19 - PT_R26 = 0x1a - PT_R27 = 0x1b - PT_R28 = 0x1c - PT_R29 = 0x1d - PT_R3 = 0x3 - PT_R30 = 0x1e - PT_R31 = 0x1f - PT_R4 = 0x4 - PT_R5 = 0x5 - PT_R6 = 0x6 - PT_R7 = 0x7 - PT_R8 = 0x8 - PT_R9 = 0x9 - PT_REGS_COUNT = 0x2c - PT_RESULT = 0x2b - PT_SOFTE = 0x27 - PT_TRAP = 0x28 - PT_VR0 = 0x52 - PT_VRSAVE = 0x94 - PT_VSCR = 0x93 - PT_VSR0 = 0x96 - PT_VSR31 = 0xd4 - PT_XER = 0x25 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0xf - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x11 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x57 - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x12 - RTM_NR_MSGTYPES = 0x48 - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x14 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x15 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x10 - SO_RCVTIMEO = 0x12 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x11 - SO_SNDTIMEO = 0x13 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x2000741f - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x2 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x40045432 - TIOCGETC = 0x40067412 - TIOCGETD = 0x5424 - TIOCGETP = 0x40067408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGLTC = 0x40067474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x4004667f - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_LOOP = 0x8000 - TIOCM_OUT1 = 0x2000 - TIOCM_OUT2 = 0x4000 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETC = 0x80067411 - TIOCSETD = 0x5423 - TIOCSETN = 0x8006740a - TIOCSETP = 0x80067409 - TIOCSIG = 0x80045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSLTC = 0x80067475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTART = 0x2000746e - TIOCSTI = 0x5412 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x400000 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETHDRSZ = 0x400454d7 - TUNSETDEBUG = 0x800454c9 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETHDRSZ = 0x800454d8 - VDISCARD = 0x10 - VEOF = 0x4 - VEOL = 0x6 - VEOL2 = 0x8 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x5 - VQUIT = 0x1 - VREPRINT = 0xb - VSTART = 0xd - VSTOP = 0xe - VSUSP = 0xc - VSWTC = 0x9 - VT0 = 0x0 - VT1 = 0x10000 - VTDLY = 0x10000 - VTIME = 0x7 - VWERASE = 0xa - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x3a) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_riscv64.go b/c/syscall/zerrors_linux_riscv64.go deleted file mode 100644 index b9892a46..00000000 --- a/c/syscall/zerrors_linux_riscv64.go +++ /dev/null @@ -1,1686 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x1000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x1000ff - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TRACEME = 0x0 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x14 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x13 - RTM_NR_MSGTYPES = 0x4c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_F_DEAD = 0x1 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_BLUETOOTH = 0x112 - SOL_CAIF = 0x116 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x540b - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CC_INFO = 0x1a - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x2 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x100 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETDEBUG = 0x400454c9 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x6 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_linux_s390x.go b/c/syscall/zerrors_linux_s390x.go deleted file mode 100644 index eceb9683..00000000 --- a/c/syscall/zerrors_linux_s390x.go +++ /dev/null @@ -1,1747 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -package syscall - -const ( - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x29 - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_X25 = 0x10f - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_OR = 0x40 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XOR = 0xa0 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x1000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HUPCL = 0x400 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_CHECKSUM = 0x7 - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_UNICAST_HOPS = 0x10 - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BLOCK_SOURCE = 0x26 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISTRIP = 0x20 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - NAME_MAX = 0xff - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = -0x1 - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_DISABLE_TE = 0x5010 - PTRACE_ENABLE_TE = 0x5009 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_LAST_BREAK = 0x5006 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_AREA = 0x5003 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_AREA = 0x5002 - PTRACE_PEEKUSR = 0x3 - PTRACE_PEEKUSR_AREA = 0x5000 - PTRACE_PEEK_SYSTEM_CALL = 0x5007 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_AREA = 0x5005 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_AREA = 0x5004 - PTRACE_POKEUSR = 0x6 - PTRACE_POKEUSR_AREA = 0x5001 - PTRACE_POKE_SYSTEM_CALL = 0x5008 - PTRACE_PROT = 0x15 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLEBLOCK = 0xc - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_TE_ABORT_RAND = 0x5011 - PTRACE_TRACEME = 0x0 - PT_ACR0 = 0x90 - PT_ACR1 = 0x94 - PT_ACR10 = 0xb8 - PT_ACR11 = 0xbc - PT_ACR12 = 0xc0 - PT_ACR13 = 0xc4 - PT_ACR14 = 0xc8 - PT_ACR15 = 0xcc - PT_ACR2 = 0x98 - PT_ACR3 = 0x9c - PT_ACR4 = 0xa0 - PT_ACR5 = 0xa4 - PT_ACR6 = 0xa8 - PT_ACR7 = 0xac - PT_ACR8 = 0xb0 - PT_ACR9 = 0xb4 - PT_CR_10 = 0x168 - PT_CR_11 = 0x170 - PT_CR_9 = 0x160 - PT_ENDREGS = 0x1af - PT_FPC = 0xd8 - PT_FPR0 = 0xe0 - PT_FPR1 = 0xe8 - PT_FPR10 = 0x130 - PT_FPR11 = 0x138 - PT_FPR12 = 0x140 - PT_FPR13 = 0x148 - PT_FPR14 = 0x150 - PT_FPR15 = 0x158 - PT_FPR2 = 0xf0 - PT_FPR3 = 0xf8 - PT_FPR4 = 0x100 - PT_FPR5 = 0x108 - PT_FPR6 = 0x110 - PT_FPR7 = 0x118 - PT_FPR8 = 0x120 - PT_FPR9 = 0x128 - PT_GPR0 = 0x10 - PT_GPR1 = 0x18 - PT_GPR10 = 0x60 - PT_GPR11 = 0x68 - PT_GPR12 = 0x70 - PT_GPR13 = 0x78 - PT_GPR14 = 0x80 - PT_GPR15 = 0x88 - PT_GPR2 = 0x20 - PT_GPR3 = 0x28 - PT_GPR4 = 0x30 - PT_GPR5 = 0x38 - PT_GPR6 = 0x40 - PT_GPR7 = 0x48 - PT_GPR8 = 0x50 - PT_GPR9 = 0x58 - PT_IEEE_IP = 0x1a8 - PT_LASTOFF = 0x1a8 - PT_ORIGGPR2 = 0xd0 - PT_PSWADDR = 0x8 - PT_PSWMASK = 0x0 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x7 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x16 - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x13 - RTM_NR_MSGTYPES = 0x4c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x11 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_GATED = 0x8 - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCGARP = 0x8954 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGPGRP = 0x8904 - SIOCGRARP = 0x8961 - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ATM = 0x108 - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_PACKET = 0x107 - SOL_RAW = 0xff - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_X25 = 0x106 - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCFLSH = 0x540b - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_INFO = 0xb - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCSAFLUSH = 0x2 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x100 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETDEBUG = 0x400454c9 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x6 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WEXITED = 0x4 - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x62) - EADDRNOTAVAIL = Errno(0x63) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x61) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x72) - EBADE = Errno(0x34) - EBADF = Errno(0x9) - EBADFD = Errno(0x4d) - EBADMSG = Errno(0x4a) - EBADR = Errno(0x35) - EBADRQC = Errno(0x38) - EBADSLT = Errno(0x39) - EBFONT = Errno(0x3b) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x7d) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x2c) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x67) - ECONNREFUSED = Errno(0x6f) - ECONNRESET = Errno(0x68) - EDEADLK = Errno(0x23) - EDEADLOCK = Errno(0x23) - EDESTADDRREQ = Errno(0x59) - EDOM = Errno(0x21) - EDOTDOT = Errno(0x49) - EDQUOT = Errno(0x7a) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x70) - EHOSTUNREACH = Errno(0x71) - EHWPOISON = Errno(0x85) - EIDRM = Errno(0x2b) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x73) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x6a) - EISDIR = Errno(0x15) - EISNAM = Errno(0x78) - EKEYEXPIRED = Errno(0x7f) - EKEYREJECTED = Errno(0x81) - EKEYREVOKED = Errno(0x80) - EL2HLT = Errno(0x33) - EL2NSYNC = Errno(0x2d) - EL3HLT = Errno(0x2e) - EL3RST = Errno(0x2f) - ELIBACC = Errno(0x4f) - ELIBBAD = Errno(0x50) - ELIBEXEC = Errno(0x53) - ELIBMAX = Errno(0x52) - ELIBSCN = Errno(0x51) - ELNRNG = Errno(0x30) - ELOOP = Errno(0x28) - EMEDIUMTYPE = Errno(0x7c) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x5a) - EMULTIHOP = Errno(0x48) - ENAMETOOLONG = Errno(0x24) - ENAVAIL = Errno(0x77) - ENETDOWN = Errno(0x64) - ENETRESET = Errno(0x66) - ENETUNREACH = Errno(0x65) - ENFILE = Errno(0x17) - ENOANO = Errno(0x37) - ENOBUFS = Errno(0x69) - ENOCSI = Errno(0x32) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOKEY = Errno(0x7e) - ENOLCK = Errno(0x25) - ENOLINK = Errno(0x43) - ENOMEDIUM = Errno(0x7b) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x2a) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x5c) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x26) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x6b) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x27) - ENOTNAM = Errno(0x76) - ENOTRECOVERABLE = Errno(0x83) - ENOTSOCK = Errno(0x58) - ENOTSUP = Errno(0x5f) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x4c) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x5f) - EOVERFLOW = Errno(0x4b) - EOWNERDEAD = Errno(0x82) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x60) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x5d) - EPROTOTYPE = Errno(0x5b) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x4e) - EREMOTE = Errno(0x42) - EREMOTEIO = Errno(0x79) - ERESTART = Errno(0x55) - ERFKILL = Errno(0x84) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x6c) - ESOCKTNOSUPPORT = Errno(0x5e) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x74) - ESTRPIPE = Errno(0x56) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x6e) - ETOOMANYREFS = Errno(0x6d) - ETXTBSY = Errno(0x1a) - EUCLEAN = Errno(0x75) - EUNATCH = Errno(0x31) - EUSERS = Errno(0x57) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x36) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0x7) - SIGCHLD = Signal(0x11) - SIGCLD = Signal(0x11) - SIGCONT = Signal(0x12) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x1d) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x1d) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x1e) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTKFLT = Signal(0x10) - SIGSTOP = Signal(0x13) - SIGSYS = Signal(0x1f) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x14) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGUNUSED = Signal(0x1f) - SIGURG = Signal(0x17) - SIGUSR1 = Signal(0xa) - SIGUSR2 = Signal(0xc) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_netbsd_386.go b/c/syscall/zerrors_netbsd_386.go deleted file mode 100644 index 56866699..00000000 --- a/c/syscall/zerrors_netbsd_386.go +++ /dev/null @@ -1,1575 +0,0 @@ -// mkerrors.sh -m32 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m32 _const.go - -//go:build 386 && netbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x1c - AF_BLUETOOTH = 0x1f - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x20 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x23 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OROUTE = 0x11 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x22 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ARCNET = 0x7 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_STRIP = 0x17 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427d - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0084277 - BIOCGETIF = 0x4090426b - BIOCGFEEDBACK = 0x4004427c - BIOCGHDRCMPLT = 0x40044274 - BIOCGRTIMEOUT = 0x400c427b - BIOCGSEESENT = 0x40044278 - BIOCGSTATS = 0x4080426f - BIOCGSTATSOLD = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044276 - BIOCSETF = 0x80084267 - BIOCSETIF = 0x8090426c - BIOCSFEEDBACK = 0x8004427d - BIOCSHDRCMPLT = 0x80044275 - BIOCSRTIMEOUT = 0x800c427a - BIOCSSEESENT = 0x80044279 - BIOCSTCPF = 0x80084272 - BIOCSUDPF = 0x80084273 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALIGNMENT32 = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DFLTBUFSIZE = 0x100000 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x1000000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CLONE_CSIGNAL = 0xff - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_PID = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SIGHAND = 0x800 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - CTL_QUERY = -0x2 - DIOCBSFLUSH = 0x20006478 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HDLC = 0x10 - DLT_HHDLC = 0x79 - DLT_HIPPI = 0xf - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0xe - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RAWAF_MASK = 0x2240000 - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xd - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMUL_LINUX = 0x1 - EMUL_LINUX32 = 0x5 - EMUL_MAXID = 0x6 - EN_SW_CTL_INF = 0x1000 - EN_SW_CTL_PREC = 0x300 - EN_SW_CTL_ROUND = 0xc00 - EN_SW_DATACHAIN = 0x80 - EN_SW_DENORM = 0x2 - EN_SW_INVOP = 0x1 - EN_SW_OVERFLOW = 0x8 - EN_SW_PRECLOSS = 0x20 - EN_SW_UNDERFLOW = 0x10 - EN_SW_ZERODIV = 0x4 - ETHERCAP_JUMBO_MTU = 0x4 - ETHERCAP_VLAN_HWTAGGING = 0x2 - ETHERCAP_VLAN_MTU = 0x1 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERMTU_JUMBO = 0x2328 - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOWPROTOCOLS = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_LEN = 0x5ee - ETHER_MAX_LEN_JUMBO = 0x233a - ETHER_MIN_LEN = 0x40 - ETHER_PPPOE_ENCAP_LEN = 0x8 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = 0x2 - EVFILT_PROC = 0x4 - EVFILT_READ = 0x0 - EVFILT_SIGNAL = 0x5 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = 0x6 - EVFILT_VNODE = 0x3 - EVFILT_WRITE = 0x1 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x100 - FLUSHO = 0x800000 - F_CLOSEM = 0xa - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xc - F_FSCTL = -0x80000000 - F_FSDIRMASK = 0x70000000 - F_FSIN = 0x10000000 - F_FSINOUT = 0x30000000 - F_FSOUT = 0x20000000 - F_FSPRIV = 0x8000 - F_FSVOID = 0x40000000 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETNOSIGPIPE = 0xd - F_GETOWN = 0x5 - F_MAXFD = 0xb - F_OK = 0x0 - F_PARAM_MASK = 0xfff - F_PARAM_MAX = 0xfff - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETNOSIGPIPE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8f52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IPV6_ICMP = 0x3a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MOBILE = 0x37 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_VRRP = 0x70 - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_EF = 0x8000 - IP_ERRORMTU = 0x15 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x16 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINFRAGSIZE = 0x45 - IP_MINTTL = 0x18 - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x17 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ALIGNMENT_16MB = 0x18000000 - MAP_ALIGNMENT_1TB = 0x28000000 - MAP_ALIGNMENT_256TB = 0x30000000 - MAP_ALIGNMENT_4GB = 0x20000000 - MAP_ALIGNMENT_64KB = 0x10000000 - MAP_ALIGNMENT_64PB = 0x38000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_DEFAULT = 0x1 - MAP_INHERIT_DONATE_COPY = 0x3 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_STACK = 0x2000 - MAP_TRYFIXED = 0x400 - MAP_WIRED = 0x800 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CONTROLMBUF = 0x2000000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_IOVUSRSPACE = 0x4000000 - MSG_LENUSRSPACE = 0x8000000 - MSG_MCAST = 0x200 - MSG_NAMEMBUF = 0x1000000 - MSG_NBIO = 0x1000 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_USERFLAGS = 0xffffff - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x4 - NAME_MAX = 0x1ff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x5 - NET_RT_MAXID = 0x6 - NET_RT_OIFLIST = 0x4 - NET_RT_OOIFLIST = 0x3 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - OFIOGETBMAP = 0xc004667a - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_ALT_IO = 0x40000 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x400000 - O_CREAT = 0x200 - O_DIRECT = 0x80000 - O_DIRECTORY = 0x200000 - O_DSYNC = 0x10000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_NOSIGPIPE = 0x1000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x20000 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PRI_IOFLUSH = 0x7c - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x9 - RTAX_NETMASK = 0x2 - RTAX_TAG = 0x8 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTA_TAG = 0x100 - RTF_ANNOUNCE = 0x20000 - RTF_BLACKHOLE = 0x1000 - RTF_CLONED = 0x2000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_REJECT = 0x8 - RTF_SRC = 0x10000 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_CHGADDR = 0x15 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x11 - RTM_IFANNOUNCE = 0x10 - RTM_IFINFO = 0x14 - RTM_LLINFO_UPD = 0x13 - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_OIFINFO = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_OOIFINFO = 0xe - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_SETGATE = 0x12 - RTM_VERSION = 0x4 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x4 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x8 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80906931 - SIOCADDRT = 0x8030720a - SIOCAIFADDR = 0x8040691a - SIOCALIFADDR = 0x8118691c - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80906932 - SIOCDELRT = 0x8030720b - SIOCDIFADDR = 0x80906919 - SIOCDIFPHYADDR = 0x80906949 - SIOCDLIFADDR = 0x8118691e - SIOCGDRVSPEC = 0xc01c697b - SIOCGETPFSYNC = 0xc09069f8 - SIOCGETSGCNT = 0xc0147534 - SIOCGETVIFCNT = 0xc0147533 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0906921 - SIOCGIFADDRPREF = 0xc0946920 - SIOCGIFALIAS = 0xc040691b - SIOCGIFBRDADDR = 0xc0906923 - SIOCGIFCAP = 0xc0206976 - SIOCGIFCONF = 0xc0086926 - SIOCGIFDATA = 0xc0946985 - SIOCGIFDLT = 0xc0906977 - SIOCGIFDSTADDR = 0xc0906922 - SIOCGIFFLAGS = 0xc0906911 - SIOCGIFGENERIC = 0xc090693a - SIOCGIFMEDIA = 0xc0286936 - SIOCGIFMETRIC = 0xc0906917 - SIOCGIFMTU = 0xc090697e - SIOCGIFNETMASK = 0xc0906925 - SIOCGIFPDSTADDR = 0xc0906948 - SIOCGIFPSRCADDR = 0xc0906947 - SIOCGLIFADDR = 0xc118691d - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLINKSTR = 0xc01c6987 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGVH = 0xc0906983 - SIOCIFCREATE = 0x8090697a - SIOCIFDESTROY = 0x80906979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCINITIFADDR = 0xc0446984 - SIOCSDRVSPEC = 0x801c697b - SIOCSETPFSYNC = 0x809069f7 - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8090690c - SIOCSIFADDRPREF = 0x8094691f - SIOCSIFBRDADDR = 0x80906913 - SIOCSIFCAP = 0x80206975 - SIOCSIFDSTADDR = 0x8090690e - SIOCSIFFLAGS = 0x80906910 - SIOCSIFGENERIC = 0x80906939 - SIOCSIFMEDIA = 0xc0906935 - SIOCSIFMETRIC = 0x80906918 - SIOCSIFMTU = 0x8090697f - SIOCSIFNETMASK = 0x80906916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLINKSTR = 0x801c6988 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSVH = 0xc0906982 - SIOCZIFDATA = 0xc0946986 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_FLAGS_MASK = 0xf0000000 - SOCK_NONBLOCK = 0x20000000 - SOCK_NOSIGPIPE = 0x40000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NOHEADER = 0x100a - SO_NOSIGPIPE = 0x800 - SO_OOBINLINE = 0x100 - SO_OVERFLOWED = 0x1009 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x100c - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x100b - SO_TIMESTAMP = 0x2000 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SYSCTL_VERSION = 0x1000000 - SYSCTL_VERS_0 = 0x0 - SYSCTL_VERS_1 = 0x1000000 - SYSCTL_VERS_MASK = 0xff000000 - S_ARCH1 = 0x10000 - S_ARCH2 = 0x20000 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFWHT = 0xe000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISTXT = 0x200 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - S_LOGIN_SET = 0x1 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CONGCTL = 0x20 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x3 - TCP_KEEPINIT = 0x7 - TCP_KEEPINTVL = 0x5 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x400c7458 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CDTRCTS = 0x10 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGLINED = 0x40207442 - TIOCGPGRP = 0x40047477 - TIOCGQSIZE = 0x40047481 - TIOCGRANTPT = 0x20007447 - TIOCGSID = 0x40047463 - TIOCGSIZE = 0x40087468 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMGET = 0x40287446 - TIOCPTSNAME = 0x40287448 - TIOCRCVFRAME = 0x80047445 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x2000745f - TIOCSLINED = 0x80207443 - TIOCSPGRP = 0x80047476 - TIOCSQSIZE = 0x80047480 - TIOCSSIZE = 0x80087467 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TIOCXMTFRAME = 0x80047444 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALL = 0x8 - WALLSIG = 0x8 - WALTSIG = 0x4 - WCLONE = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x20 - WNOHANG = 0x1 - WNOWAIT = 0x10000 - WNOZOMBIE = 0x20000 - WOPTSCHECKED = 0x40000 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x58) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x57) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x55) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5e) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x5d) - ENOBUFS = Errno(0x37) - ENODATA = Errno(0x59) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x5a) - ENOSTR = Errno(0x5b) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x56) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x60) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIME = Errno(0x5c) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x20) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_netbsd_amd64.go b/c/syscall/zerrors_netbsd_amd64.go deleted file mode 100644 index 86c70c17..00000000 --- a/c/syscall/zerrors_netbsd_amd64.go +++ /dev/null @@ -1,1565 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && netbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x1c - AF_BLUETOOTH = 0x1f - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x20 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x23 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OROUTE = 0x11 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x22 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ARCNET = 0x7 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_STRIP = 0x17 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427d - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0104277 - BIOCGETIF = 0x4090426b - BIOCGFEEDBACK = 0x4004427c - BIOCGHDRCMPLT = 0x40044274 - BIOCGRTIMEOUT = 0x4010427b - BIOCGSEESENT = 0x40044278 - BIOCGSTATS = 0x4080426f - BIOCGSTATSOLD = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044276 - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8090426c - BIOCSFEEDBACK = 0x8004427d - BIOCSHDRCMPLT = 0x80044275 - BIOCSRTIMEOUT = 0x8010427a - BIOCSSEESENT = 0x80044279 - BIOCSTCPF = 0x80104272 - BIOCSUDPF = 0x80104273 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x8 - BPF_ALIGNMENT32 = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DFLTBUFSIZE = 0x100000 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x1000000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CLONE_CSIGNAL = 0xff - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_PID = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SIGHAND = 0x800 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - CTL_QUERY = -0x2 - DIOCBSFLUSH = 0x20006478 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HDLC = 0x10 - DLT_HHDLC = 0x79 - DLT_HIPPI = 0xf - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0xe - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RAWAF_MASK = 0x2240000 - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xd - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMUL_LINUX = 0x1 - EMUL_LINUX32 = 0x5 - EMUL_MAXID = 0x6 - ETHERCAP_JUMBO_MTU = 0x4 - ETHERCAP_VLAN_HWTAGGING = 0x2 - ETHERCAP_VLAN_MTU = 0x1 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERMTU_JUMBO = 0x2328 - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOWPROTOCOLS = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_LEN = 0x5ee - ETHER_MAX_LEN_JUMBO = 0x233a - ETHER_MIN_LEN = 0x40 - ETHER_PPPOE_ENCAP_LEN = 0x8 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = 0x2 - EVFILT_PROC = 0x4 - EVFILT_READ = 0x0 - EVFILT_SIGNAL = 0x5 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = 0x6 - EVFILT_VNODE = 0x3 - EVFILT_WRITE = 0x1 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x100 - FLUSHO = 0x800000 - F_CLOSEM = 0xa - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xc - F_FSCTL = -0x80000000 - F_FSDIRMASK = 0x70000000 - F_FSIN = 0x10000000 - F_FSINOUT = 0x30000000 - F_FSOUT = 0x20000000 - F_FSPRIV = 0x8000 - F_FSVOID = 0x40000000 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETNOSIGPIPE = 0xd - F_GETOWN = 0x5 - F_MAXFD = 0xb - F_OK = 0x0 - F_PARAM_MASK = 0xfff - F_PARAM_MAX = 0xfff - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETNOSIGPIPE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8f52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IPV6_ICMP = 0x3a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MOBILE = 0x37 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_VRRP = 0x70 - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_EF = 0x8000 - IP_ERRORMTU = 0x15 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x16 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINFRAGSIZE = 0x45 - IP_MINTTL = 0x18 - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x17 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ALIGNMENT_16MB = 0x18000000 - MAP_ALIGNMENT_1TB = 0x28000000 - MAP_ALIGNMENT_256TB = 0x30000000 - MAP_ALIGNMENT_4GB = 0x20000000 - MAP_ALIGNMENT_64KB = 0x10000000 - MAP_ALIGNMENT_64PB = 0x38000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_DEFAULT = 0x1 - MAP_INHERIT_DONATE_COPY = 0x3 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_STACK = 0x2000 - MAP_TRYFIXED = 0x400 - MAP_WIRED = 0x800 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CONTROLMBUF = 0x2000000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_IOVUSRSPACE = 0x4000000 - MSG_LENUSRSPACE = 0x8000000 - MSG_MCAST = 0x200 - MSG_NAMEMBUF = 0x1000000 - MSG_NBIO = 0x1000 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_USERFLAGS = 0xffffff - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x4 - NAME_MAX = 0x1ff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x5 - NET_RT_MAXID = 0x6 - NET_RT_OIFLIST = 0x4 - NET_RT_OOIFLIST = 0x3 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - OFIOGETBMAP = 0xc004667a - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_ALT_IO = 0x40000 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x400000 - O_CREAT = 0x200 - O_DIRECT = 0x80000 - O_DIRECTORY = 0x200000 - O_DSYNC = 0x10000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_NOSIGPIPE = 0x1000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x20000 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PRI_IOFLUSH = 0x7c - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x9 - RTAX_NETMASK = 0x2 - RTAX_TAG = 0x8 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTA_TAG = 0x100 - RTF_ANNOUNCE = 0x20000 - RTF_BLACKHOLE = 0x1000 - RTF_CLONED = 0x2000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_REJECT = 0x8 - RTF_SRC = 0x10000 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_CHGADDR = 0x15 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x11 - RTM_IFANNOUNCE = 0x10 - RTM_IFINFO = 0x14 - RTM_LLINFO_UPD = 0x13 - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_OIFINFO = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_OOIFINFO = 0xe - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_SETGATE = 0x12 - RTM_VERSION = 0x4 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x4 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x8 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80906931 - SIOCADDRT = 0x8038720a - SIOCAIFADDR = 0x8040691a - SIOCALIFADDR = 0x8118691c - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80906932 - SIOCDELRT = 0x8038720b - SIOCDIFADDR = 0x80906919 - SIOCDIFPHYADDR = 0x80906949 - SIOCDLIFADDR = 0x8118691e - SIOCGDRVSPEC = 0xc028697b - SIOCGETPFSYNC = 0xc09069f8 - SIOCGETSGCNT = 0xc0207534 - SIOCGETVIFCNT = 0xc0287533 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0906921 - SIOCGIFADDRPREF = 0xc0986920 - SIOCGIFALIAS = 0xc040691b - SIOCGIFBRDADDR = 0xc0906923 - SIOCGIFCAP = 0xc0206976 - SIOCGIFCONF = 0xc0106926 - SIOCGIFDATA = 0xc0986985 - SIOCGIFDLT = 0xc0906977 - SIOCGIFDSTADDR = 0xc0906922 - SIOCGIFFLAGS = 0xc0906911 - SIOCGIFGENERIC = 0xc090693a - SIOCGIFMEDIA = 0xc0306936 - SIOCGIFMETRIC = 0xc0906917 - SIOCGIFMTU = 0xc090697e - SIOCGIFNETMASK = 0xc0906925 - SIOCGIFPDSTADDR = 0xc0906948 - SIOCGIFPSRCADDR = 0xc0906947 - SIOCGLIFADDR = 0xc118691d - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLINKSTR = 0xc0286987 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGVH = 0xc0906983 - SIOCIFCREATE = 0x8090697a - SIOCIFDESTROY = 0x80906979 - SIOCIFGCLONERS = 0xc0106978 - SIOCINITIFADDR = 0xc0706984 - SIOCSDRVSPEC = 0x8028697b - SIOCSETPFSYNC = 0x809069f7 - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8090690c - SIOCSIFADDRPREF = 0x8098691f - SIOCSIFBRDADDR = 0x80906913 - SIOCSIFCAP = 0x80206975 - SIOCSIFDSTADDR = 0x8090690e - SIOCSIFFLAGS = 0x80906910 - SIOCSIFGENERIC = 0x80906939 - SIOCSIFMEDIA = 0xc0906935 - SIOCSIFMETRIC = 0x80906918 - SIOCSIFMTU = 0x8090697f - SIOCSIFNETMASK = 0x80906916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLINKSTR = 0x80286988 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSVH = 0xc0906982 - SIOCZIFDATA = 0xc0986986 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_FLAGS_MASK = 0xf0000000 - SOCK_NONBLOCK = 0x20000000 - SOCK_NOSIGPIPE = 0x40000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NOHEADER = 0x100a - SO_NOSIGPIPE = 0x800 - SO_OOBINLINE = 0x100 - SO_OVERFLOWED = 0x1009 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x100c - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x100b - SO_TIMESTAMP = 0x2000 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SYSCTL_VERSION = 0x1000000 - SYSCTL_VERS_0 = 0x0 - SYSCTL_VERS_1 = 0x1000000 - SYSCTL_VERS_MASK = 0xff000000 - S_ARCH1 = 0x10000 - S_ARCH2 = 0x20000 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFWHT = 0xe000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISTXT = 0x200 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - S_LOGIN_SET = 0x1 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CONGCTL = 0x20 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x3 - TCP_KEEPINIT = 0x7 - TCP_KEEPINTVL = 0x5 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x40107458 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CDTRCTS = 0x10 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGLINED = 0x40207442 - TIOCGPGRP = 0x40047477 - TIOCGQSIZE = 0x40047481 - TIOCGRANTPT = 0x20007447 - TIOCGSID = 0x40047463 - TIOCGSIZE = 0x40087468 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMGET = 0x40287446 - TIOCPTSNAME = 0x40287448 - TIOCRCVFRAME = 0x80087445 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x2000745f - TIOCSLINED = 0x80207443 - TIOCSPGRP = 0x80047476 - TIOCSQSIZE = 0x80047480 - TIOCSSIZE = 0x80087467 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TIOCXMTFRAME = 0x80087444 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALL = 0x8 - WALLSIG = 0x8 - WALTSIG = 0x4 - WCLONE = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x20 - WNOHANG = 0x1 - WNOWAIT = 0x10000 - WNOZOMBIE = 0x20000 - WOPTSCHECKED = 0x40000 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x58) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x57) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x55) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5e) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x5d) - ENOBUFS = Errno(0x37) - ENODATA = Errno(0x59) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x5a) - ENOSTR = Errno(0x5b) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x56) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x60) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIME = Errno(0x5c) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x20) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_netbsd_arm.go b/c/syscall/zerrors_netbsd_arm.go deleted file mode 100644 index b50b54a0..00000000 --- a/c/syscall/zerrors_netbsd_arm.go +++ /dev/null @@ -1,1551 +0,0 @@ -// mkerrors.sh -marm -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -marm _const.go - -//go:build arm && netbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x1c - AF_BLUETOOTH = 0x1f - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x20 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x23 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OROUTE = 0x11 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x22 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ARCNET = 0x7 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_STRIP = 0x17 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427d - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0084277 - BIOCGETIF = 0x4090426b - BIOCGFEEDBACK = 0x4004427c - BIOCGHDRCMPLT = 0x40044274 - BIOCGRTIMEOUT = 0x400c427b - BIOCGSEESENT = 0x40044278 - BIOCGSTATS = 0x4080426f - BIOCGSTATSOLD = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044276 - BIOCSETF = 0x80084267 - BIOCSETIF = 0x8090426c - BIOCSFEEDBACK = 0x8004427d - BIOCSHDRCMPLT = 0x80044275 - BIOCSRTIMEOUT = 0x800c427a - BIOCSSEESENT = 0x80044279 - BIOCSTCPF = 0x80084272 - BIOCSUDPF = 0x80084273 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALIGNMENT32 = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DFLTBUFSIZE = 0x100000 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x1000000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - CTL_QUERY = -0x2 - DIOCBSFLUSH = 0x20006478 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HDLC = 0x10 - DLT_HHDLC = 0x79 - DLT_HIPPI = 0xf - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0xe - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RAWAF_MASK = 0x2240000 - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xd - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMUL_LINUX = 0x1 - EMUL_LINUX32 = 0x5 - EMUL_MAXID = 0x6 - ETHERCAP_JUMBO_MTU = 0x4 - ETHERCAP_VLAN_HWTAGGING = 0x2 - ETHERCAP_VLAN_MTU = 0x1 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERMTU_JUMBO = 0x2328 - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOWPROTOCOLS = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_LEN = 0x5ee - ETHER_MAX_LEN_JUMBO = 0x233a - ETHER_MIN_LEN = 0x40 - ETHER_PPPOE_ENCAP_LEN = 0x8 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = 0x2 - EVFILT_PROC = 0x4 - EVFILT_READ = 0x0 - EVFILT_SIGNAL = 0x5 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = 0x6 - EVFILT_VNODE = 0x3 - EVFILT_WRITE = 0x1 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x100 - FLUSHO = 0x800000 - F_CLOSEM = 0xa - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xc - F_FSCTL = -0x80000000 - F_FSDIRMASK = 0x70000000 - F_FSIN = 0x10000000 - F_FSINOUT = 0x30000000 - F_FSOUT = 0x20000000 - F_FSPRIV = 0x8000 - F_FSVOID = 0x40000000 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETNOSIGPIPE = 0xd - F_GETOWN = 0x5 - F_MAXFD = 0xb - F_OK = 0x0 - F_PARAM_MASK = 0xfff - F_PARAM_MAX = 0xfff - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETNOSIGPIPE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8f52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IPV6_ICMP = 0x3a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MOBILE = 0x37 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_VRRP = 0x70 - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_EF = 0x8000 - IP_ERRORMTU = 0x15 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x16 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINFRAGSIZE = 0x45 - IP_MINTTL = 0x18 - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x17 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ALIGNMENT_16MB = 0x18000000 - MAP_ALIGNMENT_1TB = 0x28000000 - MAP_ALIGNMENT_256TB = 0x30000000 - MAP_ALIGNMENT_4GB = 0x20000000 - MAP_ALIGNMENT_64KB = 0x10000000 - MAP_ALIGNMENT_64PB = 0x38000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_DEFAULT = 0x1 - MAP_INHERIT_DONATE_COPY = 0x3 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_STACK = 0x2000 - MAP_TRYFIXED = 0x400 - MAP_WIRED = 0x800 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CONTROLMBUF = 0x2000000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_IOVUSRSPACE = 0x4000000 - MSG_LENUSRSPACE = 0x8000000 - MSG_MCAST = 0x200 - MSG_NAMEMBUF = 0x1000000 - MSG_NBIO = 0x1000 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_USERFLAGS = 0xffffff - MSG_WAITALL = 0x40 - NAME_MAX = 0x1ff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x5 - NET_RT_MAXID = 0x6 - NET_RT_OIFLIST = 0x4 - NET_RT_OOIFLIST = 0x3 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - OFIOGETBMAP = 0xc004667a - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_ALT_IO = 0x40000 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x400000 - O_CREAT = 0x200 - O_DIRECT = 0x80000 - O_DIRECTORY = 0x200000 - O_DSYNC = 0x10000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_NOSIGPIPE = 0x1000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x20000 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PRI_IOFLUSH = 0x7c - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x9 - RTAX_NETMASK = 0x2 - RTAX_TAG = 0x8 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTA_TAG = 0x100 - RTF_ANNOUNCE = 0x20000 - RTF_BLACKHOLE = 0x1000 - RTF_CLONED = 0x2000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_REJECT = 0x8 - RTF_SRC = 0x10000 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_CHGADDR = 0x15 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x11 - RTM_IFANNOUNCE = 0x10 - RTM_IFINFO = 0x14 - RTM_LLINFO_UPD = 0x13 - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_OIFINFO = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_OOIFINFO = 0xe - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_SETGATE = 0x12 - RTM_VERSION = 0x4 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x4 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x8 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80906931 - SIOCADDRT = 0x8030720a - SIOCAIFADDR = 0x8040691a - SIOCALIFADDR = 0x8118691c - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80906932 - SIOCDELRT = 0x8030720b - SIOCDIFADDR = 0x80906919 - SIOCDIFPHYADDR = 0x80906949 - SIOCDLIFADDR = 0x8118691e - SIOCGDRVSPEC = 0xc01c697b - SIOCGETPFSYNC = 0xc09069f8 - SIOCGETSGCNT = 0xc0147534 - SIOCGETVIFCNT = 0xc0147533 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0906921 - SIOCGIFADDRPREF = 0xc0946920 - SIOCGIFALIAS = 0xc040691b - SIOCGIFBRDADDR = 0xc0906923 - SIOCGIFCAP = 0xc0206976 - SIOCGIFCONF = 0xc0086926 - SIOCGIFDATA = 0xc0946985 - SIOCGIFDLT = 0xc0906977 - SIOCGIFDSTADDR = 0xc0906922 - SIOCGIFFLAGS = 0xc0906911 - SIOCGIFGENERIC = 0xc090693a - SIOCGIFMEDIA = 0xc0286936 - SIOCGIFMETRIC = 0xc0906917 - SIOCGIFMTU = 0xc090697e - SIOCGIFNETMASK = 0xc0906925 - SIOCGIFPDSTADDR = 0xc0906948 - SIOCGIFPSRCADDR = 0xc0906947 - SIOCGLIFADDR = 0xc118691d - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLINKSTR = 0xc01c6987 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGVH = 0xc0906983 - SIOCIFCREATE = 0x8090697a - SIOCIFDESTROY = 0x80906979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCINITIFADDR = 0xc0446984 - SIOCSDRVSPEC = 0x801c697b - SIOCSETPFSYNC = 0x809069f7 - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8090690c - SIOCSIFADDRPREF = 0x8094691f - SIOCSIFBRDADDR = 0x80906913 - SIOCSIFCAP = 0x80206975 - SIOCSIFDSTADDR = 0x8090690e - SIOCSIFFLAGS = 0x80906910 - SIOCSIFGENERIC = 0x80906939 - SIOCSIFMEDIA = 0xc0906935 - SIOCSIFMETRIC = 0x80906918 - SIOCSIFMTU = 0x8090697f - SIOCSIFNETMASK = 0x80906916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLINKSTR = 0x801c6988 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSVH = 0xc0906982 - SIOCZIFDATA = 0xc0946986 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_FLAGS_MASK = 0xf0000000 - SOCK_NONBLOCK = 0x20000000 - SOCK_NOSIGPIPE = 0x40000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NOHEADER = 0x100a - SO_NOSIGPIPE = 0x800 - SO_OOBINLINE = 0x100 - SO_OVERFLOWED = 0x1009 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x100c - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x100b - SO_TIMESTAMP = 0x2000 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SYSCTL_VERSION = 0x1000000 - SYSCTL_VERS_0 = 0x0 - SYSCTL_VERS_1 = 0x1000000 - SYSCTL_VERS_MASK = 0xff000000 - S_ARCH1 = 0x10000 - S_ARCH2 = 0x20000 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFWHT = 0xe000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISTXT = 0x200 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CONGCTL = 0x20 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x3 - TCP_KEEPINIT = 0x7 - TCP_KEEPINTVL = 0x5 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x400c7458 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CDTRCTS = 0x10 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGLINED = 0x40207442 - TIOCGPGRP = 0x40047477 - TIOCGQSIZE = 0x40047481 - TIOCGRANTPT = 0x20007447 - TIOCGSID = 0x40047463 - TIOCGSIZE = 0x40087468 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMGET = 0x48087446 - TIOCPTSNAME = 0x48087448 - TIOCRCVFRAME = 0x80047445 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x2000745f - TIOCSLINED = 0x80207443 - TIOCSPGRP = 0x80047476 - TIOCSQSIZE = 0x80047480 - TIOCSSIZE = 0x80087467 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TIOCXMTFRAME = 0x80047444 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALL = 0x8 - WALLSIG = 0x8 - WALTSIG = 0x4 - WCLONE = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x20 - WNOHANG = 0x1 - WNOWAIT = 0x10000 - WNOZOMBIE = 0x20000 - WOPTSCHECKED = 0x40000 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x58) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x57) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x55) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5e) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x5d) - ENOBUFS = Errno(0x37) - ENODATA = Errno(0x59) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x5a) - ENOSTR = Errno(0x5b) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x56) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x60) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIME = Errno(0x5c) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x20) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_netbsd_arm64.go b/c/syscall/zerrors_netbsd_arm64.go deleted file mode 100644 index 82695d63..00000000 --- a/c/syscall/zerrors_netbsd_arm64.go +++ /dev/null @@ -1,1565 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build arm64 && netbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x1c - AF_BLUETOOTH = 0x1f - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x20 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x23 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OROUTE = 0x11 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x22 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ARCNET = 0x7 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_STRIP = 0x17 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427d - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0104277 - BIOCGETIF = 0x4090426b - BIOCGFEEDBACK = 0x4004427c - BIOCGHDRCMPLT = 0x40044274 - BIOCGRTIMEOUT = 0x4010427b - BIOCGSEESENT = 0x40044278 - BIOCGSTATS = 0x4080426f - BIOCGSTATSOLD = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDLT = 0x80044276 - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8090426c - BIOCSFEEDBACK = 0x8004427d - BIOCSHDRCMPLT = 0x80044275 - BIOCSRTIMEOUT = 0x8010427a - BIOCSSEESENT = 0x80044279 - BIOCSTCPF = 0x80104272 - BIOCSUDPF = 0x80104273 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x8 - BPF_ALIGNMENT32 = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DFLTBUFSIZE = 0x100000 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x1000000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CLONE_CSIGNAL = 0xff - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_PID = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SIGHAND = 0x800 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - CTL_QUERY = -0x2 - DIOCBSFLUSH = 0x20006478 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HDLC = 0x10 - DLT_HHDLC = 0x79 - DLT_HIPPI = 0xf - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0xe - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RAWAF_MASK = 0x2240000 - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xd - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMUL_LINUX = 0x1 - EMUL_LINUX32 = 0x5 - EMUL_MAXID = 0x6 - ETHERCAP_JUMBO_MTU = 0x4 - ETHERCAP_VLAN_HWTAGGING = 0x2 - ETHERCAP_VLAN_MTU = 0x1 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERMTU_JUMBO = 0x2328 - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOWPROTOCOLS = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_LEN = 0x5ee - ETHER_MAX_LEN_JUMBO = 0x233a - ETHER_MIN_LEN = 0x40 - ETHER_PPPOE_ENCAP_LEN = 0x8 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = 0x2 - EVFILT_PROC = 0x4 - EVFILT_READ = 0x0 - EVFILT_SIGNAL = 0x5 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = 0x6 - EVFILT_VNODE = 0x3 - EVFILT_WRITE = 0x1 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x100 - FLUSHO = 0x800000 - F_CLOSEM = 0xa - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xc - F_FSCTL = -0x80000000 - F_FSDIRMASK = 0x70000000 - F_FSIN = 0x10000000 - F_FSINOUT = 0x30000000 - F_FSOUT = 0x20000000 - F_FSPRIV = 0x8000 - F_FSVOID = 0x40000000 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETNOSIGPIPE = 0xd - F_GETOWN = 0x5 - F_MAXFD = 0xb - F_OK = 0x0 - F_PARAM_MASK = 0xfff - F_PARAM_MAX = 0xfff - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETNOSIGPIPE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8f52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IPV6_ICMP = 0x3a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MOBILE = 0x37 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_VRRP = 0x70 - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_EF = 0x8000 - IP_ERRORMTU = 0x15 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x16 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINFRAGSIZE = 0x45 - IP_MINTTL = 0x18 - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTTL = 0x17 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ALIGNMENT_16MB = 0x18000000 - MAP_ALIGNMENT_1TB = 0x28000000 - MAP_ALIGNMENT_256TB = 0x30000000 - MAP_ALIGNMENT_4GB = 0x20000000 - MAP_ALIGNMENT_64KB = 0x10000000 - MAP_ALIGNMENT_64PB = 0x38000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_DEFAULT = 0x1 - MAP_INHERIT_DONATE_COPY = 0x3 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_STACK = 0x2000 - MAP_TRYFIXED = 0x400 - MAP_WIRED = 0x800 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CONTROLMBUF = 0x2000000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_IOVUSRSPACE = 0x4000000 - MSG_LENUSRSPACE = 0x8000000 - MSG_MCAST = 0x200 - MSG_NAMEMBUF = 0x1000000 - MSG_NBIO = 0x1000 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_USERFLAGS = 0xffffff - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x4 - NAME_MAX = 0x1ff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x5 - NET_RT_MAXID = 0x6 - NET_RT_OIFLIST = 0x4 - NET_RT_OOIFLIST = 0x3 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - OFIOGETBMAP = 0xc004667a - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_ALT_IO = 0x40000 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x400000 - O_CREAT = 0x200 - O_DIRECT = 0x80000 - O_DIRECTORY = 0x200000 - O_DSYNC = 0x10000 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_NOSIGPIPE = 0x1000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x20000 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PRI_IOFLUSH = 0x7c - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x9 - RTAX_NETMASK = 0x2 - RTAX_TAG = 0x8 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTA_TAG = 0x100 - RTF_ANNOUNCE = 0x20000 - RTF_BLACKHOLE = 0x1000 - RTF_CLONED = 0x2000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_REJECT = 0x8 - RTF_SRC = 0x10000 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_CHGADDR = 0x15 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x11 - RTM_IFANNOUNCE = 0x10 - RTM_IFINFO = 0x14 - RTM_LLINFO_UPD = 0x13 - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_OIFINFO = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_OOIFINFO = 0xe - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_SETGATE = 0x12 - RTM_VERSION = 0x4 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_CREDS = 0x4 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x8 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80906931 - SIOCADDRT = 0x8038720a - SIOCAIFADDR = 0x8040691a - SIOCALIFADDR = 0x8118691c - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80906932 - SIOCDELRT = 0x8038720b - SIOCDIFADDR = 0x80906919 - SIOCDIFPHYADDR = 0x80906949 - SIOCDLIFADDR = 0x8118691e - SIOCGDRVSPEC = 0xc028697b - SIOCGETPFSYNC = 0xc09069f8 - SIOCGETSGCNT = 0xc0207534 - SIOCGETVIFCNT = 0xc0287533 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0906921 - SIOCGIFADDRPREF = 0xc0986920 - SIOCGIFALIAS = 0xc040691b - SIOCGIFBRDADDR = 0xc0906923 - SIOCGIFCAP = 0xc0206976 - SIOCGIFCONF = 0xc0106926 - SIOCGIFDATA = 0xc0986985 - SIOCGIFDLT = 0xc0906977 - SIOCGIFDSTADDR = 0xc0906922 - SIOCGIFFLAGS = 0xc0906911 - SIOCGIFGENERIC = 0xc090693a - SIOCGIFMEDIA = 0xc0306936 - SIOCGIFMETRIC = 0xc0906917 - SIOCGIFMTU = 0xc090697e - SIOCGIFNETMASK = 0xc0906925 - SIOCGIFPDSTADDR = 0xc0906948 - SIOCGIFPSRCADDR = 0xc0906947 - SIOCGLIFADDR = 0xc118691d - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLINKSTR = 0xc0286987 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGVH = 0xc0906983 - SIOCIFCREATE = 0x8090697a - SIOCIFDESTROY = 0x80906979 - SIOCIFGCLONERS = 0xc0106978 - SIOCINITIFADDR = 0xc0706984 - SIOCSDRVSPEC = 0x8028697b - SIOCSETPFSYNC = 0x809069f7 - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8090690c - SIOCSIFADDRPREF = 0x8098691f - SIOCSIFBRDADDR = 0x80906913 - SIOCSIFCAP = 0x80206975 - SIOCSIFDSTADDR = 0x8090690e - SIOCSIFFLAGS = 0x80906910 - SIOCSIFGENERIC = 0x80906939 - SIOCSIFMEDIA = 0xc0906935 - SIOCSIFMETRIC = 0x80906918 - SIOCSIFMTU = 0x8090697f - SIOCSIFNETMASK = 0x80906916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLINKSTR = 0x80286988 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSVH = 0xc0906982 - SIOCZIFDATA = 0xc0986986 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_FLAGS_MASK = 0xf0000000 - SOCK_NONBLOCK = 0x20000000 - SOCK_NOSIGPIPE = 0x40000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NOHEADER = 0x100a - SO_NOSIGPIPE = 0x800 - SO_OOBINLINE = 0x100 - SO_OVERFLOWED = 0x1009 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x100c - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x100b - SO_TIMESTAMP = 0x2000 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SYSCTL_VERSION = 0x1000000 - SYSCTL_VERS_0 = 0x0 - SYSCTL_VERS_1 = 0x1000000 - SYSCTL_VERS_MASK = 0xff000000 - S_ARCH1 = 0x10000 - S_ARCH2 = 0x20000 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IFWHT = 0xe000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISTXT = 0x200 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - S_LOGIN_SET = 0x1 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CONGCTL = 0x20 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x3 - TCP_KEEPINIT = 0x7 - TCP_KEEPINTVL = 0x5 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDCDTIMESTAMP = 0x40107458 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CDTRCTS = 0x10 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGLINED = 0x40207442 - TIOCGPGRP = 0x40047477 - TIOCGQSIZE = 0x40047481 - TIOCGRANTPT = 0x20007447 - TIOCGSID = 0x40047463 - TIOCGSIZE = 0x40087468 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMGET = 0x40287446 - TIOCPTSNAME = 0x40287448 - TIOCRCVFRAME = 0x80087445 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x2000745f - TIOCSLINED = 0x80207443 - TIOCSPGRP = 0x80047476 - TIOCSQSIZE = 0x80047480 - TIOCSSIZE = 0x80087467 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TIOCXMTFRAME = 0x80087444 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALL = 0x8 - WALLSIG = 0x8 - WALTSIG = 0x4 - WCLONE = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x20 - WNOHANG = 0x1 - WNOWAIT = 0x10000 - WNOZOMBIE = 0x20000 - WOPTSCHECKED = 0x40000 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x58) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x57) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x52) - EILSEQ = Errno(0x55) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x60) - ELOOP = Errno(0x3e) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - EMULTIHOP = Errno(0x5e) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x5d) - ENOBUFS = Errno(0x37) - ENODATA = Errno(0x59) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOLINK = Errno(0x5f) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x53) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x5a) - ENOSTR = Errno(0x5b) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x56) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x54) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x60) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIME = Errno(0x5c) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGPWR = Signal(0x20) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_openbsd_386.go b/c/syscall/zerrors_openbsd_386.go deleted file mode 100644 index bdf23738..00000000 --- a/c/syscall/zerrors_openbsd_386.go +++ /dev/null @@ -1,1454 +0,0 @@ -// mkerrors.sh -m32 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m32 _const.go - -//go:build 386 && openbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_BLUETOOTH = 0x20 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_ENCAP = 0x1c - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_KEY = 0x1e - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x24 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SIP = 0x1d - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRFILT = 0x4004427c - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc008427b - BIOCGETIF = 0x4020426b - BIOCGFILDROP = 0x40044278 - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x400c426e - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x20004276 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDIRFILT = 0x8004427d - BIOCSDLT = 0x8004427a - BIOCSETF = 0x80084267 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x80084277 - BIOCSFILDROP = 0x80044279 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x800c426d - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIRECTION_IN = 0x1 - BPF_DIRECTION_OUT = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x200000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0xff - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DIOCOSFPFLUSH = 0x2000444e - DLT_ARCNET = 0x7 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0xd - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_LOOP = 0xc - DLT_MPLS = 0xdb - DLT_NULL = 0x0 - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xe - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 - ENDRUNDISC = 0x9 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_AOE = 0x88a2 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LLDP = 0x88cc - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_QINQ = 0x88a8 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOW = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_ALIGN = 0x2 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_DIX_LEN = 0x600 - ETHER_MAX_LEN = 0x5ee - ETHER_MIN_LEN = 0x40 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = -0x3 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = -0x7 - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xa - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETOWN = 0x5 - F_OK = 0x0 - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8e52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BLUETOOTH = 0xf8 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf7 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DUMMY = 0xf1 - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf3 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFLOW = 0xf9 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf2 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_HOST = 0x1 - IN_RFC3021_NET = 0xfffffffe - IN_RFC3021_NSHIFT = 0x1f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x103 - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPV6_AUTH_LEVEL = 0x35 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_ESP_NETWORK_LEVEL = 0x37 - IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPCOMP_LEVEL = 0x3c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 - IPV6_PATHMTU = 0x2c - IPV6_PIPEX = 0x3f - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVDSTPORT = 0x40 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTABLE = 0x1021 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_AUTH_LEVEL = 0x14 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 - IP_DROP_MEMBERSHIP = 0xd - IP_ESP_NETWORK_LEVEL = 0x16 - IP_ESP_TRANS_LEVEL = 0x15 - IP_HDRINCL = 0x2 - IP_IPCOMP_LEVEL = 0x1d - IP_IPSECFLOWINFO = 0x24 - IP_IPSEC_LOCAL_AUTH = 0x1b - IP_IPSEC_LOCAL_CRED = 0x19 - IP_IPSEC_LOCAL_ID = 0x17 - IP_IPSEC_REMOTE_AUTH = 0x1c - IP_IPSEC_REMOTE_CRED = 0x1a - IP_IPSEC_REMOTE_ID = 0x18 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0xfff - IP_MF = 0x2000 - IP_MINTTL = 0x20 - IP_MIN_MEMBERSHIPS = 0xf - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PIPEX = 0x22 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVDSTPORT = 0x21 - IP_RECVIF = 0x1e - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVRTABLE = 0x23 - IP_RECVTTL = 0x1f - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RTABLE = 0x1021 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LCNT_OVERLOAD_FLUSH = 0x6 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ANON = 0x1000 - MAP_COPY = 0x4 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FLAGMASK = 0x1ff7 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_DONATE_COPY = 0x3 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_TRYFIXED = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_MCAST = 0x200 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x4 - MS_SYNC = 0x2 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 - NET_RT_STATS = 0x4 - NET_RT_TABLE = 0x5 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EOF = 0x2 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRUNCATE = 0x80 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x80 - ONOCR = 0x40 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x10000 - O_CREAT = 0x200 - O_DIRECTORY = 0x20000 - O_DSYNC = 0x80 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x80 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PF_FLUSH = 0x1 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PT_MASK = 0x3ff000 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_LABEL = 0xa - RTAX_MAX = 0xb - RTAX_NETMASK = 0x2 - RTAX_SRC = 0x8 - RTAX_SRCMASK = 0x9 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_LABEL = 0x400 - RTA_NETMASK = 0x4 - RTA_SRC = 0x100 - RTA_SRCMASK = 0x200 - RTF_ANNOUNCE = 0x4000 - RTF_BLACKHOLE = 0x1000 - RTF_CLONED = 0x10000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x10f808 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_MPATH = 0x40000 - RTF_MPLS = 0x100000 - RTF_PERMANENT_ARP = 0x2000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x2000 - RTF_REJECT = 0x8 - RTF_SOURCE = 0x20000 - RTF_STATIC = 0x800 - RTF_TUNNEL = 0x100000 - RTF_UP = 0x1 - RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DESYNC = 0x10 - RTM_GET = 0x4 - RTM_IFANNOUNCE = 0xf - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MAXSIZE = 0x800 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RT_TABLEID_MAX = 0xff - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8218691c - SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8054693c - SIOCBRDGADDS = 0x80546941 - SIOCBRDGARL = 0x806e694d - SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8054693d - SIOCBRDGDELS = 0x80546942 - SIOCBRDGFLUSH = 0x80546948 - SIOCBRDGFRL = 0x806e694e - SIOCBRDGGCACHE = 0xc0146941 - SIOCBRDGGFD = 0xc0146952 - SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc054693e - SIOCBRDGGMA = 0xc0146953 - SIOCBRDGGPARAM = 0xc03c6958 - SIOCBRDGGPRI = 0xc0146950 - SIOCBRDGGRL = 0xc028694f - SIOCBRDGGSIFS = 0xc054693c - SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0546942 - SIOCBRDGRTS = 0xc0186943 - SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80146940 - SIOCBRDGSFD = 0x80146952 - SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80546955 - SIOCBRDGSIFFLGS = 0x8054693f - SIOCBRDGSIFPRIO = 0x80546954 - SIOCBRDGSMA = 0x80146953 - SIOCBRDGSPRI = 0x80146950 - SIOCBRDGSPROTO = 0x8014695a - SIOCBRDGSTO = 0x80146945 - SIOCBRDGSTXHC = 0x80146959 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80246989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e - SIOCGETKALIVE = 0xc01869a4 - SIOCGETLABEL = 0x8020699a - SIOCGETPFLOW = 0xc02069fe - SIOCGETPFSYNC = 0xc02069f8 - SIOCGETSGCNT = 0xc0147534 - SIOCGETVIFCNT = 0xc0147533 - SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCONF = 0xc0086924 - SIOCGIFDATA = 0xc020691b - SIOCGIFDESCR = 0xc0206981 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGATTR = 0xc024698b - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc024698a - SIOCGIFGROUP = 0xc0246988 - SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0286936 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc020697e - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFRDOMAIN = 0xc02069a0 - SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFTIMESLOT = 0xc0206986 - SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d - SIOCGLIFPHYADDR = 0xc218694b - SIOCGLIFPHYRTABLE = 0xc02069a2 - SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGSPPPPARAMS = 0xc0206994 - SIOCGVH = 0xc02069f6 - SIOCGVNETID = 0xc02069a7 - SIOCIFCREATE = 0x8020697a - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCSETKALIVE = 0x801869a3 - SIOCSETLABEL = 0x80206999 - SIOCSETPFLOW = 0x802069fd - SIOCSETPFSYNC = 0x802069f7 - SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFDESCR = 0x80206980 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGATTR = 0x8024698c - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x8020697f - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPRIORITY = 0x8020699b - SIOCSIFRDOMAIN = 0x8020699f - SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 - SIOCSIFXFLAGS = 0x8020699d - SIOCSLIFPHYADDR = 0x8218694a - SIOCSLIFPHYRTABLE = 0x802069a1 - SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSSPPPPARAMS = 0x80206993 - SIOCSVH = 0xc02069f5 - SIOCSVNETID = 0x802069a6 - SOCK_CLOEXEC = 0x8000 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x4000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BINDANY = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NETPROC = 0x1020 - SO_OOBINLINE = 0x100 - SO_PEERCRED = 0x1022 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RTABLE = 0x1021 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SPLICE = 0x1023 - SO_TIMESTAMP = 0x800 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x3 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x4 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb - TCP_SACK_ENABLE = 0x8 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_PPS = 0x10 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x400c745b - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMODG = 0x4004746a - TIOCMODS = 0x8004746d - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x8004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSTSTAMP = 0x8008745a - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALTSIG = 0x4 - WCONTINUED = 0x8 - WCOREFLAG = 0x80 - WNOHANG = 0x1 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x58) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x59) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EIPSEC = Errno(0x52) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x5b) - ELOOP = Errno(0x3e) - EMEDIUMTYPE = Errno(0x56) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x53) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOMEDIUM = Errno(0x55) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5a) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x5b) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x57) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_openbsd_amd64.go b/c/syscall/zerrors_openbsd_amd64.go deleted file mode 100644 index d2ad3424..00000000 --- a/c/syscall/zerrors_openbsd_amd64.go +++ /dev/null @@ -1,1453 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && openbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_BLUETOOTH = 0x20 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_ENCAP = 0x1c - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_KEY = 0x1e - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x24 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SIP = 0x1d - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRFILT = 0x4004427c - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc010427b - BIOCGETIF = 0x4020426b - BIOCGFILDROP = 0x40044278 - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x20004276 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDIRFILT = 0x8004427d - BIOCSDLT = 0x8004427a - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x80104277 - BIOCSFILDROP = 0x80044279 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x8010426d - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIRECTION_IN = 0x1 - BPF_DIRECTION_OUT = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x200000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0xff - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DIOCOSFPFLUSH = 0x2000444e - DLT_ARCNET = 0x7 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0xd - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_LOOP = 0xc - DLT_MPLS = 0xdb - DLT_NULL = 0x0 - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xe - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 - ENDRUNDISC = 0x9 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_AOE = 0x88a2 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LLDP = 0x88cc - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_QINQ = 0x88a8 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOW = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_ALIGN = 0x2 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_DIX_LEN = 0x600 - ETHER_MAX_LEN = 0x5ee - ETHER_MIN_LEN = 0x40 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = -0x3 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = -0x7 - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xa - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETOWN = 0x5 - F_OK = 0x0 - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8e52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BLUETOOTH = 0xf8 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf7 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DUMMY = 0xf1 - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf3 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFLOW = 0xf9 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf2 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_HOST = 0x1 - IN_RFC3021_NET = 0xfffffffe - IN_RFC3021_NSHIFT = 0x1f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x103 - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPV6_AUTH_LEVEL = 0x35 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_ESP_NETWORK_LEVEL = 0x37 - IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPCOMP_LEVEL = 0x3c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 - IPV6_PATHMTU = 0x2c - IPV6_PIPEX = 0x3f - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVDSTPORT = 0x40 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTABLE = 0x1021 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_AUTH_LEVEL = 0x14 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 - IP_DROP_MEMBERSHIP = 0xd - IP_ESP_NETWORK_LEVEL = 0x16 - IP_ESP_TRANS_LEVEL = 0x15 - IP_HDRINCL = 0x2 - IP_IPCOMP_LEVEL = 0x1d - IP_IPSECFLOWINFO = 0x24 - IP_IPSEC_LOCAL_AUTH = 0x1b - IP_IPSEC_LOCAL_CRED = 0x19 - IP_IPSEC_LOCAL_ID = 0x17 - IP_IPSEC_REMOTE_AUTH = 0x1c - IP_IPSEC_REMOTE_CRED = 0x1a - IP_IPSEC_REMOTE_ID = 0x18 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0xfff - IP_MF = 0x2000 - IP_MINTTL = 0x20 - IP_MIN_MEMBERSHIPS = 0xf - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PIPEX = 0x22 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVDSTPORT = 0x21 - IP_RECVIF = 0x1e - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVRTABLE = 0x23 - IP_RECVTTL = 0x1f - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RTABLE = 0x1021 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LCNT_OVERLOAD_FLUSH = 0x6 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ANON = 0x1000 - MAP_COPY = 0x4 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FLAGMASK = 0x1ff7 - MAP_HASSEMAPHORE = 0x200 - MAP_INHERIT = 0x80 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_DONATE_COPY = 0x3 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_TRYFIXED = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_MCAST = 0x200 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x4 - MS_SYNC = 0x2 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 - NET_RT_STATS = 0x4 - NET_RT_TABLE = 0x5 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EOF = 0x2 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRUNCATE = 0x80 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x80 - ONOCR = 0x40 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x10000 - O_CREAT = 0x200 - O_DIRECTORY = 0x20000 - O_DSYNC = 0x80 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x80 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PF_FLUSH = 0x1 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_LABEL = 0xa - RTAX_MAX = 0xb - RTAX_NETMASK = 0x2 - RTAX_SRC = 0x8 - RTAX_SRCMASK = 0x9 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_LABEL = 0x400 - RTA_NETMASK = 0x4 - RTA_SRC = 0x100 - RTA_SRCMASK = 0x200 - RTF_ANNOUNCE = 0x4000 - RTF_BLACKHOLE = 0x1000 - RTF_CLONED = 0x10000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x10f808 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_MPATH = 0x40000 - RTF_MPLS = 0x100000 - RTF_PERMANENT_ARP = 0x2000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x2000 - RTF_REJECT = 0x8 - RTF_SOURCE = 0x20000 - RTF_STATIC = 0x800 - RTF_TUNNEL = 0x100000 - RTF_UP = 0x1 - RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DESYNC = 0x10 - RTM_GET = 0x4 - RTM_IFANNOUNCE = 0xf - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MAXSIZE = 0x800 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RT_TABLEID_MAX = 0xff - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80286987 - SIOCALIFADDR = 0x8218691c - SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8058693c - SIOCBRDGADDS = 0x80586941 - SIOCBRDGARL = 0x806e694d - SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8058693d - SIOCBRDGDELS = 0x80586942 - SIOCBRDGFLUSH = 0x80586948 - SIOCBRDGFRL = 0x806e694e - SIOCBRDGGCACHE = 0xc0146941 - SIOCBRDGGFD = 0xc0146952 - SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc058693e - SIOCBRDGGMA = 0xc0146953 - SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0146950 - SIOCBRDGGRL = 0xc030694f - SIOCBRDGGSIFS = 0xc058693c - SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0586942 - SIOCBRDGRTS = 0xc0206943 - SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80146940 - SIOCBRDGSFD = 0x80146952 - SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80586955 - SIOCBRDGSIFFLGS = 0x8058693f - SIOCBRDGSIFPRIO = 0x80586954 - SIOCBRDGSMA = 0x80146953 - SIOCBRDGSPRI = 0x80146950 - SIOCBRDGSPROTO = 0x8014695a - SIOCBRDGSTO = 0x80146945 - SIOCBRDGSTXHC = 0x80146959 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80286989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e - SIOCGETKALIVE = 0xc01869a4 - SIOCGETLABEL = 0x8020699a - SIOCGETPFLOW = 0xc02069fe - SIOCGETPFSYNC = 0xc02069f8 - SIOCGETSGCNT = 0xc0207534 - SIOCGETVIFCNT = 0xc0287533 - SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCONF = 0xc0106924 - SIOCGIFDATA = 0xc020691b - SIOCGIFDESCR = 0xc0206981 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGATTR = 0xc028698b - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc028698a - SIOCGIFGROUP = 0xc0286988 - SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0306936 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc020697e - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFRDOMAIN = 0xc02069a0 - SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFTIMESLOT = 0xc0206986 - SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d - SIOCGLIFPHYADDR = 0xc218694b - SIOCGLIFPHYRTABLE = 0xc02069a2 - SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGSPPPPARAMS = 0xc0206994 - SIOCGVH = 0xc02069f6 - SIOCGVNETID = 0xc02069a7 - SIOCIFCREATE = 0x8020697a - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSETKALIVE = 0x801869a3 - SIOCSETLABEL = 0x80206999 - SIOCSETPFLOW = 0x802069fd - SIOCSETPFSYNC = 0x802069f7 - SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFDESCR = 0x80206980 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGATTR = 0x8028698c - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x8020697f - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPRIORITY = 0x8020699b - SIOCSIFRDOMAIN = 0x8020699f - SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 - SIOCSIFXFLAGS = 0x8020699d - SIOCSLIFPHYADDR = 0x8218694a - SIOCSLIFPHYRTABLE = 0x802069a1 - SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSSPPPPARAMS = 0x80206993 - SIOCSVH = 0xc02069f5 - SIOCSVNETID = 0x802069a6 - SOCK_CLOEXEC = 0x8000 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x4000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BINDANY = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NETPROC = 0x1020 - SO_OOBINLINE = 0x100 - SO_PEERCRED = 0x1022 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RTABLE = 0x1021 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SPLICE = 0x1023 - SO_TIMESTAMP = 0x800 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x3 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x4 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb - TCP_SACK_ENABLE = 0x8 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_PPS = 0x10 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x4010745b - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMODG = 0x4004746a - TIOCMODS = 0x8004746d - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x8004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSTSTAMP = 0x8008745a - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALTSIG = 0x4 - WCONTINUED = 0x8 - WCOREFLAG = 0x80 - WNOHANG = 0x1 - WSTOPPED = 0x7f - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x58) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x59) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EIPSEC = Errno(0x52) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x5b) - ELOOP = Errno(0x3e) - EMEDIUMTYPE = Errno(0x56) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x53) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOMEDIUM = Errno(0x55) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5a) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x5b) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x57) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_openbsd_arm.go b/c/syscall/zerrors_openbsd_arm.go deleted file mode 100644 index 30a1c9da..00000000 --- a/c/syscall/zerrors_openbsd_arm.go +++ /dev/null @@ -1,1453 +0,0 @@ -// mkerrors.sh -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- _const.go - -//go:build arm && openbsd - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_BLUETOOTH = 0x20 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_ENCAP = 0x1c - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_KEY = 0x1e - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x24 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SIP = 0x1d - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRFILT = 0x4004427c - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc008427b - BIOCGETIF = 0x4020426b - BIOCGFILDROP = 0x40044278 - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x400c426e - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x20004276 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDIRFILT = 0x8004427d - BIOCSDLT = 0x8004427a - BIOCSETF = 0x80084267 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x80084277 - BIOCSFILDROP = 0x80044279 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x800c426d - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIRECTION_IN = 0x1 - BPF_DIRECTION_OUT = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x200000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0xff - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DIOCOSFPFLUSH = 0x2000444e - DLT_ARCNET = 0x7 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0xd - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_LOOP = 0xc - DLT_MPLS = 0xdb - DLT_NULL = 0x0 - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xe - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 - ENDRUNDISC = 0x9 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_AOE = 0x88a2 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LLDP = 0x88cc - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_QINQ = 0x88a8 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOW = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_ALIGN = 0x2 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_DIX_LEN = 0x600 - ETHER_MAX_LEN = 0x5ee - ETHER_MIN_LEN = 0x40 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = -0x3 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 - EVFILT_TIMER = -0x7 - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xa - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETOWN = 0x5 - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8e52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BLUETOOTH = 0xf8 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf7 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DUMMY = 0xf1 - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf3 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFLOW = 0xf9 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf2 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_HOST = 0x1 - IN_RFC3021_NET = 0xfffffffe - IN_RFC3021_NSHIFT = 0x1f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x103 - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPV6_AUTH_LEVEL = 0x35 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_ESP_NETWORK_LEVEL = 0x37 - IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPCOMP_LEVEL = 0x3c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 - IPV6_PATHMTU = 0x2c - IPV6_PIPEX = 0x3f - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVDSTPORT = 0x40 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTABLE = 0x1021 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_AUTH_LEVEL = 0x14 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 - IP_DROP_MEMBERSHIP = 0xd - IP_ESP_NETWORK_LEVEL = 0x16 - IP_ESP_TRANS_LEVEL = 0x15 - IP_HDRINCL = 0x2 - IP_IPCOMP_LEVEL = 0x1d - IP_IPSECFLOWINFO = 0x24 - IP_IPSEC_LOCAL_AUTH = 0x1b - IP_IPSEC_LOCAL_CRED = 0x19 - IP_IPSEC_LOCAL_ID = 0x17 - IP_IPSEC_REMOTE_AUTH = 0x1c - IP_IPSEC_REMOTE_CRED = 0x1a - IP_IPSEC_REMOTE_ID = 0x18 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0xfff - IP_MF = 0x2000 - IP_MINTTL = 0x20 - IP_MIN_MEMBERSHIPS = 0xf - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PIPEX = 0x22 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVDSTPORT = 0x21 - IP_RECVIF = 0x1e - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVRTABLE = 0x23 - IP_RECVTTL = 0x1f - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RTABLE = 0x1021 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LCNT_OVERLOAD_FLUSH = 0x6 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FLAGMASK = 0x3ff7 - MAP_HASSEMAPHORE = 0x0 - MAP_INHERIT = 0x0 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_INHERIT_ZERO = 0x3 - MAP_NOEXTEND = 0x0 - MAP_NORESERVE = 0x0 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x0 - MAP_SHARED = 0x1 - MAP_TRYFIXED = 0x0 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_MCAST = 0x200 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x4 - MS_SYNC = 0x2 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 - NET_RT_STATS = 0x4 - NET_RT_TABLE = 0x5 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EOF = 0x2 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRUNCATE = 0x80 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x80 - ONOCR = 0x40 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x10000 - O_CREAT = 0x200 - O_DIRECTORY = 0x20000 - O_DSYNC = 0x80 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x80 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PF_FLUSH = 0x1 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_LABEL = 0xa - RTAX_MAX = 0xb - RTAX_NETMASK = 0x2 - RTAX_SRC = 0x8 - RTAX_SRCMASK = 0x9 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_LABEL = 0x400 - RTA_NETMASK = 0x4 - RTA_SRC = 0x100 - RTA_SRCMASK = 0x200 - RTF_ANNOUNCE = 0x4000 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_CLONED = 0x10000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x70f808 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_MPATH = 0x40000 - RTF_MPLS = 0x100000 - RTF_PERMANENT_ARP = 0x2000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x2000 - RTF_REJECT = 0x8 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DESYNC = 0x10 - RTM_GET = 0x4 - RTM_IFANNOUNCE = 0xf - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MAXSIZE = 0x800 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RT_TABLEID_MAX = 0xff - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8218691c - SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8054693c - SIOCBRDGADDS = 0x80546941 - SIOCBRDGARL = 0x806e694d - SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8054693d - SIOCBRDGDELS = 0x80546942 - SIOCBRDGFLUSH = 0x80546948 - SIOCBRDGFRL = 0x806e694e - SIOCBRDGGCACHE = 0xc0146941 - SIOCBRDGGFD = 0xc0146952 - SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc054693e - SIOCBRDGGMA = 0xc0146953 - SIOCBRDGGPARAM = 0xc03c6958 - SIOCBRDGGPRI = 0xc0146950 - SIOCBRDGGRL = 0xc028694f - SIOCBRDGGSIFS = 0xc054693c - SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0546942 - SIOCBRDGRTS = 0xc0186943 - SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80146940 - SIOCBRDGSFD = 0x80146952 - SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80546955 - SIOCBRDGSIFFLGS = 0x8054693f - SIOCBRDGSIFPRIO = 0x80546954 - SIOCBRDGSMA = 0x80146953 - SIOCBRDGSPRI = 0x80146950 - SIOCBRDGSPROTO = 0x8014695a - SIOCBRDGSTO = 0x80146945 - SIOCBRDGSTXHC = 0x80146959 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80246989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e - SIOCGETKALIVE = 0xc01869a4 - SIOCGETLABEL = 0x8020699a - SIOCGETPFLOW = 0xc02069fe - SIOCGETPFSYNC = 0xc02069f8 - SIOCGETSGCNT = 0xc0147534 - SIOCGETVIFCNT = 0xc0147533 - SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCONF = 0xc0086924 - SIOCGIFDATA = 0xc020691b - SIOCGIFDESCR = 0xc0206981 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGATTR = 0xc024698b - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc024698a - SIOCGIFGROUP = 0xc0246988 - SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0286936 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc020697e - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFRDOMAIN = 0xc02069a0 - SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFRXR = 0x802069aa - SIOCGIFTIMESLOT = 0xc0206986 - SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d - SIOCGLIFPHYADDR = 0xc218694b - SIOCGLIFPHYRTABLE = 0xc02069a2 - SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGSPPPPARAMS = 0xc0206994 - SIOCGVH = 0xc02069f6 - SIOCGVNETID = 0xc02069a7 - SIOCIFCREATE = 0x8020697a - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCSETKALIVE = 0x801869a3 - SIOCSETLABEL = 0x80206999 - SIOCSETPFLOW = 0x802069fd - SIOCSETPFSYNC = 0x802069f7 - SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFDESCR = 0x80206980 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGATTR = 0x8024698c - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x8020697f - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPRIORITY = 0x8020699b - SIOCSIFRDOMAIN = 0x8020699f - SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 - SIOCSIFXFLAGS = 0x8020699d - SIOCSLIFPHYADDR = 0x8218694a - SIOCSLIFPHYRTABLE = 0x802069a1 - SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SIOCSSPPPPARAMS = 0x80206993 - SIOCSVH = 0xc02069f5 - SIOCSVNETID = 0x802069a6 - SOCK_CLOEXEC = 0x8000 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x4000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BINDANY = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NETPROC = 0x1020 - SO_OOBINLINE = 0x100 - SO_PEERCRED = 0x1022 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RTABLE = 0x1021 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SPLICE = 0x1023 - SO_TIMESTAMP = 0x800 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x3 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x4 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb - TCP_SACK_ENABLE = 0x8 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_PPS = 0x10 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x400c745b - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMODG = 0x4004746a - TIOCMODS = 0x8004746d - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x8004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSTSTAMP = 0x8008745a - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALTSIG = 0x4 - WCONTINUED = 0x8 - WCOREFLAG = 0x80 - WNOHANG = 0x1 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x58) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x59) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EIPSEC = Errno(0x52) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x5b) - ELOOP = Errno(0x3e) - EMEDIUMTYPE = Errno(0x56) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x53) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOMEDIUM = Errno(0x55) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5a) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x5b) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x57) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_openbsd_arm64.go b/c/syscall/zerrors_openbsd_arm64.go deleted file mode 100644 index 72a93f7e..00000000 --- a/c/syscall/zerrors_openbsd_arm64.go +++ /dev/null @@ -1,1540 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -m64 _const.go - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_BLUETOOTH = 0x20 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_ENCAP = 0x1c - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_KEY = 0x1e - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x24 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SIP = 0x1d - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRFILT = 0x4004427c - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc010427b - BIOCGETIF = 0x4020426b - BIOCGFILDROP = 0x40044278 - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x20004276 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDIRFILT = 0x8004427d - BIOCSDLT = 0x8004427a - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x80104277 - BIOCSFILDROP = 0x80044279 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x8010426d - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIRECTION_IN = 0x1 - BPF_DIRECTION_OUT = 0x2 - BPF_DIV = 0x30 - BPF_FILDROP_CAPTURE = 0x1 - BPF_FILDROP_DROP = 0x2 - BPF_FILDROP_PASS = 0x0 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x200000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0xff - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DIOCOSFPFLUSH = 0x2000444e - DLT_ARCNET = 0x7 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0xd - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_LOOP = 0xc - DLT_MPLS = 0xdb - DLT_NULL = 0x0 - DLT_OPENFLOW = 0x10b - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xe - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_USBPCAP = 0xf9 - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 - ENDRUNDISC = 0x9 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_AOE = 0x88a2 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LLDP = 0x88cc - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PBB = 0x88e7 - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_QINQ = 0x88a8 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOW = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_ALIGN = 0x2 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_DIX_LEN = 0x600 - ETHER_MAX_HARDMTU_LEN = 0xff9b - ETHER_MAX_LEN = 0x5ee - ETHER_MIN_LEN = 0x40 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = -0x3 - EVFILT_DEVICE = -0x8 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 - EVFILT_TIMER = -0x7 - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EVL_ENCAPLEN = 0x4 - EVL_PRIO_BITS = 0xd - EVL_PRIO_MAX = 0x7 - EVL_VLID_MASK = 0xfff - EVL_VLID_MAX = 0xffe - EVL_VLID_MIN = 0x1 - EVL_VLID_NULL = 0x0 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xa - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETOWN = 0x5 - F_ISATTY = 0xb - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8e52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_STATICARP = 0x20 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BLUETOOTH = 0xf8 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf7 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DUMMY = 0xf1 - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf3 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MBIM = 0xfa - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFLOW = 0xf9 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf2 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_HOST = 0x1 - IN_RFC3021_NET = 0xfffffffe - IN_RFC3021_NSHIFT = 0x1f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x103 - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPV6_AUTH_LEVEL = 0x35 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_ESP_NETWORK_LEVEL = 0x37 - IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPCOMP_LEVEL = 0x3c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MINHOPCOUNT = 0x41 - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 - IPV6_PATHMTU = 0x2c - IPV6_PIPEX = 0x3f - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVDSTPORT = 0x40 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTABLE = 0x1021 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_AUTH_LEVEL = 0x14 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_ESP_NETWORK_LEVEL = 0x16 - IP_ESP_TRANS_LEVEL = 0x15 - IP_HDRINCL = 0x2 - IP_IPCOMP_LEVEL = 0x1d - IP_IPDEFTTL = 0x25 - IP_IPSECFLOWINFO = 0x24 - IP_IPSEC_LOCAL_AUTH = 0x1b - IP_IPSEC_LOCAL_CRED = 0x19 - IP_IPSEC_LOCAL_ID = 0x17 - IP_IPSEC_REMOTE_AUTH = 0x1c - IP_IPSEC_REMOTE_CRED = 0x1a - IP_IPSEC_REMOTE_ID = 0x18 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0xfff - IP_MF = 0x2000 - IP_MINTTL = 0x20 - IP_MIN_MEMBERSHIPS = 0xf - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PIPEX = 0x22 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVDSTPORT = 0x21 - IP_RECVIF = 0x1e - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVRTABLE = 0x23 - IP_RECVTTL = 0x1f - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RTABLE = 0x1021 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LCNT_OVERLOAD_FLUSH = 0x6 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_CONCEAL = 0x8000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FLAGMASK = 0xfff7 - MAP_HASSEMAPHORE = 0x0 - MAP_INHERIT = 0x0 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_INHERIT_ZERO = 0x3 - MAP_NOEXTEND = 0x0 - MAP_NORESERVE = 0x0 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x0 - MAP_SHARED = 0x1 - MAP_STACK = 0x4000 - MAP_TRYFIXED = 0x0 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_MCAST = 0x200 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x4 - MS_SYNC = 0x2 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 - NET_RT_STATS = 0x4 - NET_RT_TABLE = 0x5 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHANGE = 0x1 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EOF = 0x2 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRUNCATE = 0x80 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x80 - ONOCR = 0x40 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x10000 - O_CREAT = 0x200 - O_DIRECTORY = 0x20000 - O_DSYNC = 0x80 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x80 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PF_FLUSH = 0x1 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BFD = 0xb - RTAX_BRD = 0x7 - RTAX_DNS = 0xc - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_LABEL = 0xa - RTAX_MAX = 0xf - RTAX_NETMASK = 0x2 - RTAX_SEARCH = 0xe - RTAX_SRC = 0x8 - RTAX_SRCMASK = 0x9 - RTAX_STATIC = 0xd - RTA_AUTHOR = 0x40 - RTA_BFD = 0x800 - RTA_BRD = 0x80 - RTA_DNS = 0x1000 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_LABEL = 0x400 - RTA_NETMASK = 0x4 - RTA_SEARCH = 0x4000 - RTA_SRC = 0x100 - RTA_SRCMASK = 0x200 - RTA_STATIC = 0x2000 - RTF_ANNOUNCE = 0x4000 - RTF_BFD = 0x1000000 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_CACHED = 0x20000 - RTF_CLONED = 0x10000 - RTF_CLONING = 0x100 - RTF_CONNECTED = 0x800000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x110fc08 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MPATH = 0x40000 - RTF_MPLS = 0x100000 - RTF_MULTICAST = 0x200 - RTF_PERMANENT_ARP = 0x2000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x2000 - RTF_REJECT = 0x8 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_USETRAILERS = 0x8000 - RTM_80211INFO = 0x15 - RTM_ADD = 0x1 - RTM_BFD = 0x12 - RTM_CHANGE = 0x3 - RTM_CHGADDRATTR = 0x14 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DESYNC = 0x10 - RTM_GET = 0x4 - RTM_IFANNOUNCE = 0xf - RTM_IFINFO = 0xe - RTM_INVALIDATE = 0x11 - RTM_LOSING = 0x5 - RTM_MAXSIZE = 0x800 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_PROPOSAL = 0x13 - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RT_TABLEID_BITS = 0x8 - RT_TABLEID_MASK = 0xff - RT_TABLEID_MAX = 0xff - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80286987 - SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8060693c - SIOCBRDGADDL = 0x80606949 - SIOCBRDGADDS = 0x80606941 - SIOCBRDGARL = 0x808c694d - SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8060693d - SIOCBRDGDELS = 0x80606942 - SIOCBRDGFLUSH = 0x80606948 - SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 - SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 - SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 - SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 - SIOCBRDGIFS = 0xc0606942 - SIOCBRDGRTS = 0xc0206943 - SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 - SIOCBRDGSIFCOST = 0x80606955 - SIOCBRDGSIFFLGS = 0x8060693f - SIOCBRDGSIFPRIO = 0x80606954 - SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 - SIOCDELLABEL = 0x80206997 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80286989 - SIOCDIFPARENT = 0x802069b4 - SIOCDIFPHYADDR = 0x80206949 - SIOCDPWE3NEIGHBOR = 0x802069de - SIOCDVNETID = 0x802069af - SIOCGETKALIVE = 0xc01869a4 - SIOCGETLABEL = 0x8020699a - SIOCGETMPWCFG = 0xc02069ae - SIOCGETPFLOW = 0xc02069fe - SIOCGETPFSYNC = 0xc02069f8 - SIOCGETSGCNT = 0xc0207534 - SIOCGETVIFCNT = 0xc0287533 - SIOCGETVLAN = 0xc0206990 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCONF = 0xc0106924 - SIOCGIFDATA = 0xc020691b - SIOCGIFDESCR = 0xc0206981 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGATTR = 0xc028698b - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGLIST = 0xc028698d - SIOCGIFGMEMB = 0xc028698a - SIOCGIFGROUP = 0xc0286988 - SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFLLPRIO = 0xc02069b6 - SIOCGIFMEDIA = 0xc0406938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc020697e - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPAIR = 0xc02069b1 - SIOCGIFPARENT = 0xc02069b3 - SIOCGIFPRIORITY = 0xc020699c - SIOCGIFRDOMAIN = 0xc02069a0 - SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFRXR = 0x802069aa - SIOCGIFSFFPAGE = 0xc1126939 - SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFPHYADDR = 0xc218694b - SIOCGLIFPHYDF = 0xc02069c2 - SIOCGLIFPHYECN = 0xc02069c8 - SIOCGLIFPHYRTABLE = 0xc02069a2 - SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGPGRP = 0x40047309 - SIOCGPWE3 = 0xc0206998 - SIOCGPWE3CTRLWORD = 0xc02069dc - SIOCGPWE3FAT = 0xc02069dd - SIOCGPWE3NEIGHBOR = 0xc21869de - SIOCGSPPPPARAMS = 0xc0206994 - SIOCGTXHPRIO = 0xc02069c6 - SIOCGUMBINFO = 0xc02069be - SIOCGUMBPARAM = 0xc02069c0 - SIOCGVH = 0xc02069f6 - SIOCGVNETFLOWID = 0xc02069c4 - SIOCGVNETID = 0xc02069a7 - SIOCIFAFATTACH = 0x801169ab - SIOCIFAFDETACH = 0x801169ac - SIOCIFCREATE = 0x8020697a - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSETKALIVE = 0x801869a3 - SIOCSETLABEL = 0x80206999 - SIOCSETMPWCFG = 0x802069ad - SIOCSETPFLOW = 0x802069fd - SIOCSETPFSYNC = 0x802069f7 - SIOCSETVLAN = 0x8020698f - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFDESCR = 0x80206980 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGATTR = 0x8028698c - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020691f - SIOCSIFLLPRIO = 0x802069b5 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x8020697f - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPAIR = 0x802069b0 - SIOCSIFPARENT = 0x802069b2 - SIOCSIFPRIORITY = 0x8020699b - SIOCSIFRDOMAIN = 0x8020699f - SIOCSIFRTLABEL = 0x80206982 - SIOCSIFXFLAGS = 0x8020699d - SIOCSLIFPHYADDR = 0x8218694a - SIOCSLIFPHYDF = 0x802069c1 - SIOCSLIFPHYECN = 0x802069c7 - SIOCSLIFPHYRTABLE = 0x802069a1 - SIOCSLIFPHYTTL = 0x802069a8 - SIOCSPGRP = 0x80047308 - SIOCSPWE3CTRLWORD = 0x802069dc - SIOCSPWE3FAT = 0x802069dd - SIOCSPWE3NEIGHBOR = 0x821869de - SIOCSSPPPPARAMS = 0x80206993 - SIOCSTXHPRIO = 0x802069c5 - SIOCSUMBPARAM = 0x802069bf - SIOCSVH = 0xc02069f5 - SIOCSVNETFLOWID = 0x802069c3 - SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f - SOCK_CLOEXEC = 0x8000 - SOCK_DGRAM = 0x2 - SOCK_DNS = 0x1000 - SOCK_NONBLOCK = 0x4000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BINDANY = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NETPROC = 0x1020 - SO_OOBINLINE = 0x100 - SO_PEERCRED = 0x1022 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RTABLE = 0x1021 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SPLICE = 0x1023 - SO_TIMESTAMP = 0x800 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_ZEROIZE = 0x2000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x3 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x4 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOPUSH = 0x10 - TCP_SACK_ENABLE = 0x8 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCHKVERAUTH = 0x2000741e - TIOCCLRVERAUTH = 0x2000741d - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_PPS = 0x10 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x4010745b - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMODG = 0x4004746a - TIOCMODS = 0x8004746d - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSETVERAUTH = 0x8004741c - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x8004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTOP = 0x2000746f - TIOCSTSTAMP = 0x8008745a - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TIOCUCNTL_CBRK = 0x7a - TIOCUCNTL_SBRK = 0x7b - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALTSIG = 0x4 - WCONTINUED = 0x8 - WCOREFLAG = 0x80 - WNOHANG = 0x1 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x5c) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x58) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x59) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EIPSEC = Errno(0x52) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x5f) - ELOOP = Errno(0x3e) - EMEDIUMTYPE = Errno(0x56) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x53) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOMEDIUM = Errno(0x55) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5a) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5d) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x5b) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x57) - EOWNERDEAD = Errno(0x5e) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5f) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_openbsd_mips64.go b/c/syscall/zerrors_openbsd_mips64.go deleted file mode 100644 index 061bce24..00000000 --- a/c/syscall/zerrors_openbsd_mips64.go +++ /dev/null @@ -1,1547 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -m64 _const.go - -package syscall - -const ( - AF_APPLETALK = 0x10 - AF_BLUETOOTH = 0x20 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_ENCAP = 0x1c - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x18 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_KEY = 0x1e - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x24 - AF_MPLS = 0x21 - AF_NATM = 0x1b - AF_NS = 0x6 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SIP = 0x1d - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - ARPHRD_ETHER = 0x1 - ARPHRD_FRELAY = 0xf - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B9600 = 0x2580 - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRFILT = 0x4004427c - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc010427b - BIOCGETIF = 0x4020426b - BIOCGFILDROP = 0x40044278 - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x4010426e - BIOCGSTATS = 0x4008426f - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x20004276 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = 0xc0044266 - BIOCSDIRFILT = 0x8004427d - BIOCSDLT = 0x8004427a - BIOCSETF = 0x80104267 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x80104277 - BIOCSFILDROP = 0x80044279 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x8010426d - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DIRECTION_IN = 0x1 - BPF_DIRECTION_OUT = 0x2 - BPF_DIV = 0x30 - BPF_FILDROP_CAPTURE = 0x1 - BPF_FILDROP_DROP = 0x2 - BPF_FILDROP_PASS = 0x0 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x200000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0xff - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0xc - CTL_NET = 0x4 - DIOCOSFPFLUSH = 0x2000444e - DLT_ARCNET = 0x7 - DLT_ATM_RFC1483 = 0xb - DLT_AX25 = 0x3 - DLT_CHAOS = 0x5 - DLT_C_HDLC = 0x68 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0xd - DLT_FDDI = 0xa - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_LOOP = 0xc - DLT_MPLS = 0xdb - DLT_NULL = 0x0 - DLT_OPENFLOW = 0x10b - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_SERIAL = 0x32 - DLT_PRONET = 0x4 - DLT_RAW = 0xe - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_USBPCAP = 0xf9 - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 - ENDRUNDISC = 0x9 - ETHERMIN = 0x2e - ETHERMTU = 0x5dc - ETHERTYPE_8023 = 0x4 - ETHERTYPE_AARP = 0x80f3 - ETHERTYPE_ACCTON = 0x8390 - ETHERTYPE_AEONIC = 0x8036 - ETHERTYPE_ALPHA = 0x814a - ETHERTYPE_AMBER = 0x6008 - ETHERTYPE_AMOEBA = 0x8145 - ETHERTYPE_AOE = 0x88a2 - ETHERTYPE_APOLLO = 0x80f7 - ETHERTYPE_APOLLODOMAIN = 0x8019 - ETHERTYPE_APPLETALK = 0x809b - ETHERTYPE_APPLITEK = 0x80c7 - ETHERTYPE_ARGONAUT = 0x803a - ETHERTYPE_ARP = 0x806 - ETHERTYPE_AT = 0x809b - ETHERTYPE_ATALK = 0x809b - ETHERTYPE_ATOMIC = 0x86df - ETHERTYPE_ATT = 0x8069 - ETHERTYPE_ATTSTANFORD = 0x8008 - ETHERTYPE_AUTOPHON = 0x806a - ETHERTYPE_AXIS = 0x8856 - ETHERTYPE_BCLOOP = 0x9003 - ETHERTYPE_BOFL = 0x8102 - ETHERTYPE_CABLETRON = 0x7034 - ETHERTYPE_CHAOS = 0x804 - ETHERTYPE_COMDESIGN = 0x806c - ETHERTYPE_COMPUGRAPHIC = 0x806d - ETHERTYPE_COUNTERPOINT = 0x8062 - ETHERTYPE_CRONUS = 0x8004 - ETHERTYPE_CRONUSVLN = 0x8003 - ETHERTYPE_DCA = 0x1234 - ETHERTYPE_DDE = 0x807b - ETHERTYPE_DEBNI = 0xaaaa - ETHERTYPE_DECAM = 0x8048 - ETHERTYPE_DECCUST = 0x6006 - ETHERTYPE_DECDIAG = 0x6005 - ETHERTYPE_DECDNS = 0x803c - ETHERTYPE_DECDTS = 0x803e - ETHERTYPE_DECEXPER = 0x6000 - ETHERTYPE_DECLAST = 0x8041 - ETHERTYPE_DECLTM = 0x803f - ETHERTYPE_DECMUMPS = 0x6009 - ETHERTYPE_DECNETBIOS = 0x8040 - ETHERTYPE_DELTACON = 0x86de - ETHERTYPE_DIDDLE = 0x4321 - ETHERTYPE_DLOG1 = 0x660 - ETHERTYPE_DLOG2 = 0x661 - ETHERTYPE_DN = 0x6003 - ETHERTYPE_DOGFIGHT = 0x1989 - ETHERTYPE_DSMD = 0x8039 - ETHERTYPE_ECMA = 0x803 - ETHERTYPE_ENCRYPT = 0x803d - ETHERTYPE_ES = 0x805d - ETHERTYPE_EXCELAN = 0x8010 - ETHERTYPE_EXPERDATA = 0x8049 - ETHERTYPE_FLIP = 0x8146 - ETHERTYPE_FLOWCONTROL = 0x8808 - ETHERTYPE_FRARP = 0x808 - ETHERTYPE_GENDYN = 0x8068 - ETHERTYPE_HAYES = 0x8130 - ETHERTYPE_HIPPI_FP = 0x8180 - ETHERTYPE_HITACHI = 0x8820 - ETHERTYPE_HP = 0x8005 - ETHERTYPE_IEEEPUP = 0xa00 - ETHERTYPE_IEEEPUPAT = 0xa01 - ETHERTYPE_IMLBL = 0x4c42 - ETHERTYPE_IMLBLDIAG = 0x424c - ETHERTYPE_IP = 0x800 - ETHERTYPE_IPAS = 0x876c - ETHERTYPE_IPV6 = 0x86dd - ETHERTYPE_IPX = 0x8137 - ETHERTYPE_IPXNEW = 0x8037 - ETHERTYPE_KALPANA = 0x8582 - ETHERTYPE_LANBRIDGE = 0x8038 - ETHERTYPE_LANPROBE = 0x8888 - ETHERTYPE_LAT = 0x6004 - ETHERTYPE_LBACK = 0x9000 - ETHERTYPE_LITTLE = 0x8060 - ETHERTYPE_LLDP = 0x88cc - ETHERTYPE_LOGICRAFT = 0x8148 - ETHERTYPE_LOOPBACK = 0x9000 - ETHERTYPE_MACSEC = 0x88e5 - ETHERTYPE_MATRA = 0x807a - ETHERTYPE_MAX = 0xffff - ETHERTYPE_MERIT = 0x807c - ETHERTYPE_MICP = 0x873a - ETHERTYPE_MOPDL = 0x6001 - ETHERTYPE_MOPRC = 0x6002 - ETHERTYPE_MOTOROLA = 0x818d - ETHERTYPE_MPLS = 0x8847 - ETHERTYPE_MPLS_MCAST = 0x8848 - ETHERTYPE_MUMPS = 0x813f - ETHERTYPE_NBPCC = 0x3c04 - ETHERTYPE_NBPCLAIM = 0x3c09 - ETHERTYPE_NBPCLREQ = 0x3c05 - ETHERTYPE_NBPCLRSP = 0x3c06 - ETHERTYPE_NBPCREQ = 0x3c02 - ETHERTYPE_NBPCRSP = 0x3c03 - ETHERTYPE_NBPDG = 0x3c07 - ETHERTYPE_NBPDGB = 0x3c08 - ETHERTYPE_NBPDLTE = 0x3c0a - ETHERTYPE_NBPRAR = 0x3c0c - ETHERTYPE_NBPRAS = 0x3c0b - ETHERTYPE_NBPRST = 0x3c0d - ETHERTYPE_NBPSCD = 0x3c01 - ETHERTYPE_NBPVCD = 0x3c00 - ETHERTYPE_NBS = 0x802 - ETHERTYPE_NCD = 0x8149 - ETHERTYPE_NESTAR = 0x8006 - ETHERTYPE_NETBEUI = 0x8191 - ETHERTYPE_NOVELL = 0x8138 - ETHERTYPE_NS = 0x600 - ETHERTYPE_NSAT = 0x601 - ETHERTYPE_NSCOMPAT = 0x807 - ETHERTYPE_NTRAILER = 0x10 - ETHERTYPE_OS9 = 0x7007 - ETHERTYPE_OS9NET = 0x7009 - ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e - ETHERTYPE_PBB = 0x88e7 - ETHERTYPE_PCS = 0x4242 - ETHERTYPE_PLANNING = 0x8044 - ETHERTYPE_PPP = 0x880b - ETHERTYPE_PPPOE = 0x8864 - ETHERTYPE_PPPOEDISC = 0x8863 - ETHERTYPE_PRIMENTS = 0x7031 - ETHERTYPE_PUP = 0x200 - ETHERTYPE_PUPAT = 0x200 - ETHERTYPE_QINQ = 0x88a8 - ETHERTYPE_RACAL = 0x7030 - ETHERTYPE_RATIONAL = 0x8150 - ETHERTYPE_RAWFR = 0x6559 - ETHERTYPE_RCL = 0x1995 - ETHERTYPE_RDP = 0x8739 - ETHERTYPE_RETIX = 0x80f2 - ETHERTYPE_REVARP = 0x8035 - ETHERTYPE_SCA = 0x6007 - ETHERTYPE_SECTRA = 0x86db - ETHERTYPE_SECUREDATA = 0x876d - ETHERTYPE_SGITW = 0x817e - ETHERTYPE_SG_BOUNCE = 0x8016 - ETHERTYPE_SG_DIAG = 0x8013 - ETHERTYPE_SG_NETGAMES = 0x8014 - ETHERTYPE_SG_RESV = 0x8015 - ETHERTYPE_SIMNET = 0x5208 - ETHERTYPE_SLOW = 0x8809 - ETHERTYPE_SNA = 0x80d5 - ETHERTYPE_SNMP = 0x814c - ETHERTYPE_SONIX = 0xfaf5 - ETHERTYPE_SPIDER = 0x809f - ETHERTYPE_SPRITE = 0x500 - ETHERTYPE_STP = 0x8181 - ETHERTYPE_TALARIS = 0x812b - ETHERTYPE_TALARISMC = 0x852b - ETHERTYPE_TCPCOMP = 0x876b - ETHERTYPE_TCPSM = 0x9002 - ETHERTYPE_TEC = 0x814f - ETHERTYPE_TIGAN = 0x802f - ETHERTYPE_TRAIL = 0x1000 - ETHERTYPE_TRANSETHER = 0x6558 - ETHERTYPE_TYMSHARE = 0x802e - ETHERTYPE_UBBST = 0x7005 - ETHERTYPE_UBDEBUG = 0x900 - ETHERTYPE_UBDIAGLOOP = 0x7002 - ETHERTYPE_UBDL = 0x7000 - ETHERTYPE_UBNIU = 0x7001 - ETHERTYPE_UBNMC = 0x7003 - ETHERTYPE_VALID = 0x1600 - ETHERTYPE_VARIAN = 0x80dd - ETHERTYPE_VAXELN = 0x803b - ETHERTYPE_VEECO = 0x8067 - ETHERTYPE_VEXP = 0x805b - ETHERTYPE_VGLAB = 0x8131 - ETHERTYPE_VINES = 0xbad - ETHERTYPE_VINESECHO = 0xbaf - ETHERTYPE_VINESLOOP = 0xbae - ETHERTYPE_VITAL = 0xff00 - ETHERTYPE_VLAN = 0x8100 - ETHERTYPE_VLTLMAN = 0x8080 - ETHERTYPE_VPROD = 0x805c - ETHERTYPE_VURESERVED = 0x8147 - ETHERTYPE_WATERLOO = 0x8130 - ETHERTYPE_WELLFLEET = 0x8103 - ETHERTYPE_X25 = 0x805 - ETHERTYPE_X75 = 0x801 - ETHERTYPE_XNSSM = 0x9001 - ETHERTYPE_XTP = 0x817d - ETHER_ADDR_LEN = 0x6 - ETHER_ALIGN = 0x2 - ETHER_CRC_LEN = 0x4 - ETHER_CRC_POLY_BE = 0x4c11db6 - ETHER_CRC_POLY_LE = 0xedb88320 - ETHER_HDR_LEN = 0xe - ETHER_MAX_DIX_LEN = 0x600 - ETHER_MAX_HARDMTU_LEN = 0xff9b - ETHER_MAX_LEN = 0x5ee - ETHER_MIN_LEN = 0x40 - ETHER_TYPE_LEN = 0x2 - ETHER_VLAN_ENCAP_LEN = 0x4 - EVFILT_AIO = -0x3 - EVFILT_DEVICE = -0x8 - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 - EVFILT_TIMER = -0x7 - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EVL_ENCAPLEN = 0x4 - EVL_PRIO_BITS = 0xd - EVL_PRIO_MAX = 0x7 - EVL_VLID_MASK = 0xfff - EVL_VLID_MAX = 0xffe - EVL_VLID_MIN = 0x1 - EVL_VLID_NULL = 0x0 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0xa - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0x7 - F_GETOWN = 0x5 - F_ISATTY = 0xb - F_RDLCK = 0x1 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x8 - F_SETLKW = 0x9 - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x8e52 - IFF_DEBUG = 0x4 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_STATICARP = 0x20 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BLUETOOTH = 0xf8 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf7 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DUMMY = 0xf1 - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ECONET = 0xce - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf3 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LINEGROUP = 0xd2 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MBIM = 0xfa - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf5 - IFT_PFLOW = 0xf9 - IFT_PFSYNC = 0xf6 - IFT_PLC = 0xae - IFT_PON155 = 0xcf - IFT_PON622 = 0xd0 - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPATM = 0xc5 - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf2 - IFT_Q2931 = 0xc9 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SIPSIG = 0xcc - IFT_SIPTG = 0xcb - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TELINK = 0xc8 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VIRTUALTG = 0xca - IFT_VOICEDID = 0xd5 - IFT_VOICEEM = 0x64 - IFT_VOICEEMFGD = 0xd3 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFGDEANA = 0xd4 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERCABLE = 0xc6 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_HOST = 0x1 - IN_RFC3021_NET = 0xfffffffe - IN_RFC3021_NSHIFT = 0x1f - IPPROTO_AH = 0x33 - IPPROTO_CARP = 0x70 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPIP = 0x4 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x103 - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_NONE = 0x3b - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_AUTH_LEVEL = 0x35 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_ESP_NETWORK_LEVEL = 0x37 - IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xfffffff - IPV6_FLOWLABEL_MASK = 0xfffff - IPV6_FRAGTTL = 0x78 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPCOMP_LEVEL = 0x3c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXPACKET = 0xffff - IPV6_MINHOPCOUNT = 0x41 - IPV6_MMTU = 0x500 - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 - IPV6_PATHMTU = 0x2c - IPV6_PIPEX = 0x3f - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVDSTPORT = 0x40 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTABLE = 0x1021 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_AUTH_LEVEL = 0x14 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0xd - IP_ESP_NETWORK_LEVEL = 0x16 - IP_ESP_TRANS_LEVEL = 0x15 - IP_HDRINCL = 0x2 - IP_IPCOMP_LEVEL = 0x1d - IP_IPDEFTTL = 0x25 - IP_IPSECFLOWINFO = 0x24 - IP_IPSEC_LOCAL_AUTH = 0x1b - IP_IPSEC_LOCAL_CRED = 0x19 - IP_IPSEC_LOCAL_ID = 0x17 - IP_IPSEC_REMOTE_AUTH = 0x1c - IP_IPSEC_REMOTE_CRED = 0x1a - IP_IPSEC_REMOTE_ID = 0x18 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0xfff - IP_MF = 0x2000 - IP_MINTTL = 0x20 - IP_MIN_MEMBERSHIPS = 0xf - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x1 - IP_PIPEX = 0x22 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVDSTPORT = 0x21 - IP_RECVIF = 0x1e - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVRTABLE = 0x23 - IP_RECVTTL = 0x1f - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RTABLE = 0x1021 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LCNT_OVERLOAD_FLUSH = 0x6 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x6 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_SPACEAVAIL = 0x5 - MADV_WILLNEED = 0x3 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_CONCEAL = 0x8000 - MAP_COPY = 0x2 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FLAGMASK = 0xfff7 - MAP_HASSEMAPHORE = 0x0 - MAP_INHERIT = 0x0 - MAP_INHERIT_COPY = 0x1 - MAP_INHERIT_NONE = 0x2 - MAP_INHERIT_SHARE = 0x0 - MAP_INHERIT_ZERO = 0x3 - MAP_NOEXTEND = 0x0 - MAP_NORESERVE = 0x0 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x0 - MAP_SHARED = 0x1 - MAP_STACK = 0x4000 - MAP_TRYFIXED = 0x0 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_BCAST = 0x100 - MSG_CMSG_CLOEXEC = 0x800 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOR = 0x8 - MSG_MCAST = 0x200 - MSG_NOSIGNAL = 0x400 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x4 - MS_SYNC = 0x2 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 - NET_RT_STATS = 0x4 - NET_RT_TABLE = 0x5 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHANGE = 0x1 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EOF = 0x2 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRUNCATE = 0x80 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x80 - ONOCR = 0x40 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x10000 - O_CREAT = 0x200 - O_DIRECTORY = 0x20000 - O_DSYNC = 0x80 - O_EXCL = 0x800 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x80 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PF_FLUSH = 0x1 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BFD = 0xb - RTAX_BRD = 0x7 - RTAX_DNS = 0xc - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_LABEL = 0xa - RTAX_MAX = 0xf - RTAX_NETMASK = 0x2 - RTAX_SEARCH = 0xe - RTAX_SRC = 0x8 - RTAX_SRCMASK = 0x9 - RTAX_STATIC = 0xd - RTA_AUTHOR = 0x40 - RTA_BFD = 0x800 - RTA_BRD = 0x80 - RTA_DNS = 0x1000 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_LABEL = 0x400 - RTA_NETMASK = 0x4 - RTA_SEARCH = 0x4000 - RTA_SRC = 0x100 - RTA_SRCMASK = 0x200 - RTA_STATIC = 0x2000 - RTF_ANNOUNCE = 0x4000 - RTF_BFD = 0x1000000 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_CACHED = 0x20000 - RTF_CLONED = 0x10000 - RTF_CLONING = 0x100 - RTF_CONNECTED = 0x800000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x110fc08 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MPATH = 0x40000 - RTF_MPLS = 0x100000 - RTF_MULTICAST = 0x200 - RTF_PERMANENT_ARP = 0x2000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x2000 - RTF_REJECT = 0x8 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_USETRAILERS = 0x8000 - RTM_80211INFO = 0x15 - RTM_ADD = 0x1 - RTM_BFD = 0x12 - RTM_CHANGE = 0x3 - RTM_CHGADDRATTR = 0x14 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DESYNC = 0x10 - RTM_GET = 0x4 - RTM_IFANNOUNCE = 0xf - RTM_IFINFO = 0xe - RTM_INVALIDATE = 0x11 - RTM_LOSING = 0x5 - RTM_MAXSIZE = 0x800 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_PROPOSAL = 0x13 - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RT_TABLEID_BITS = 0x8 - RT_TABLEID_MASK = 0xff - RT_TABLEID_MAX = 0xff - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x4 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80286987 - SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8060693c - SIOCBRDGADDL = 0x80606949 - SIOCBRDGADDS = 0x80606941 - SIOCBRDGARL = 0x808c694d - SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8060693d - SIOCBRDGDELS = 0x80606942 - SIOCBRDGFLUSH = 0x80606948 - SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 - SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 - SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 - SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 - SIOCBRDGIFS = 0xc0606942 - SIOCBRDGRTS = 0xc0206943 - SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 - SIOCBRDGSIFCOST = 0x80606955 - SIOCBRDGSIFFLGS = 0x8060693f - SIOCBRDGSIFPRIO = 0x80606954 - SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 - SIOCDELLABEL = 0x80206997 - SIOCDELMULTI = 0x80206932 - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80286989 - SIOCDIFPARENT = 0x802069b4 - SIOCDIFPHYADDR = 0x80206949 - SIOCDPWE3NEIGHBOR = 0x802069de - SIOCDVNETID = 0x802069af - SIOCGETKALIVE = 0xc01869a4 - SIOCGETLABEL = 0x8020699a - SIOCGETMPWCFG = 0xc02069ae - SIOCGETPFLOW = 0xc02069fe - SIOCGETPFSYNC = 0xc02069f8 - SIOCGETSGCNT = 0xc0207534 - SIOCGETVIFCNT = 0xc0287533 - SIOCGETVLAN = 0xc0206990 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCONF = 0xc0106924 - SIOCGIFDATA = 0xc020691b - SIOCGIFDESCR = 0xc0206981 - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGATTR = 0xc028698b - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGLIST = 0xc028698d - SIOCGIFGMEMB = 0xc028698a - SIOCGIFGROUP = 0xc0286988 - SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFLLPRIO = 0xc02069b6 - SIOCGIFMEDIA = 0xc0406938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc020697e - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPAIR = 0xc02069b1 - SIOCGIFPARENT = 0xc02069b3 - SIOCGIFPRIORITY = 0xc020699c - SIOCGIFRDOMAIN = 0xc02069a0 - SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFRXR = 0x802069aa - SIOCGIFSFFPAGE = 0xc1126939 - SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFPHYADDR = 0xc218694b - SIOCGLIFPHYDF = 0xc02069c2 - SIOCGLIFPHYECN = 0xc02069c8 - SIOCGLIFPHYRTABLE = 0xc02069a2 - SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGPGRP = 0x40047309 - SIOCGPWE3 = 0xc0206998 - SIOCGPWE3CTRLWORD = 0xc02069dc - SIOCGPWE3FAT = 0xc02069dd - SIOCGPWE3NEIGHBOR = 0xc21869de - SIOCGRXHPRIO = 0xc02069db - SIOCGSPPPPARAMS = 0xc0206994 - SIOCGTXHPRIO = 0xc02069c6 - SIOCGUMBINFO = 0xc02069be - SIOCGUMBPARAM = 0xc02069c0 - SIOCGVH = 0xc02069f6 - SIOCGVNETFLOWID = 0xc02069c4 - SIOCGVNETID = 0xc02069a7 - SIOCIFAFATTACH = 0x801169ab - SIOCIFAFDETACH = 0x801169ac - SIOCIFCREATE = 0x8020697a - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc0106978 - SIOCSETKALIVE = 0x801869a3 - SIOCSETLABEL = 0x80206999 - SIOCSETMPWCFG = 0x802069ad - SIOCSETPFLOW = 0x802069fd - SIOCSETPFSYNC = 0x802069f7 - SIOCSETVLAN = 0x8020698f - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFDESCR = 0x80206980 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGATTR = 0x8028698c - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020691f - SIOCSIFLLPRIO = 0x802069b5 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x8020697f - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPAIR = 0x802069b0 - SIOCSIFPARENT = 0x802069b2 - SIOCSIFPRIORITY = 0x8020699b - SIOCSIFRDOMAIN = 0x8020699f - SIOCSIFRTLABEL = 0x80206982 - SIOCSIFXFLAGS = 0x8020699d - SIOCSLIFPHYADDR = 0x8218694a - SIOCSLIFPHYDF = 0x802069c1 - SIOCSLIFPHYECN = 0x802069c7 - SIOCSLIFPHYRTABLE = 0x802069a1 - SIOCSLIFPHYTTL = 0x802069a8 - SIOCSPGRP = 0x80047308 - SIOCSPWE3CTRLWORD = 0x802069dc - SIOCSPWE3FAT = 0x802069dd - SIOCSPWE3NEIGHBOR = 0x821869de - SIOCSRXHPRIO = 0x802069db - SIOCSSPPPPARAMS = 0x80206993 - SIOCSTXHPRIO = 0x802069c5 - SIOCSUMBPARAM = 0x802069bf - SIOCSVH = 0xc02069f5 - SIOCSVNETFLOWID = 0x802069c3 - SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f - SOCK_CLOEXEC = 0x8000 - SOCK_DGRAM = 0x2 - SOCK_DNS = 0x1000 - SOCK_NONBLOCK = 0x4000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_BINDANY = 0x1000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DOMAIN = 0x1024 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_NETPROC = 0x1020 - SO_OOBINLINE = 0x100 - SO_PEERCRED = 0x1022 - SO_PROTOCOL = 0x1025 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RTABLE = 0x1021 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SPLICE = 0x1023 - SO_TIMESTAMP = 0x800 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_ZEROIZE = 0x2000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x3 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x4 - TCP_MSS = 0x200 - TCP_NODELAY = 0x1 - TCP_NOPUSH = 0x10 - TCP_SACKHOLE_LIMIT = 0x80 - TCP_SACK_ENABLE = 0x8 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCHKVERAUTH = 0x2000741e - TIOCCLRVERAUTH = 0x2000741d - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLAG_CLOCAL = 0x2 - TIOCFLAG_CRTSCTS = 0x4 - TIOCFLAG_MDMBUF = 0x8 - TIOCFLAG_PPS = 0x10 - TIOCFLAG_SOFTCAR = 0x1 - TIOCFLUSH = 0x80047410 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGFLAGS = 0x4004745d - TIOCGPGRP = 0x40047477 - TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x4010745b - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMODG = 0x4004746a - TIOCMODS = 0x8004746d - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCREMOTE = 0x80047469 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSETVERAUTH = 0x8004741c - TIOCSFLAGS = 0x8004745c - TIOCSIG = 0x8004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTOP = 0x2000746f - TIOCSTSTAMP = 0x8008745a - TIOCSWINSZ = 0x80087467 - TIOCUCNTL = 0x80047466 - TIOCUCNTL_CBRK = 0x7a - TIOCUCNTL_SBRK = 0x7b - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WALTSIG = 0x4 - WCONTINUED = 0x8 - WCOREFLAG = 0x80 - WNOHANG = 0x1 - WUNTRACED = 0x2 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x30) - EADDRNOTAVAIL = Errno(0x31) - EAFNOSUPPORT = Errno(0x2f) - EAGAIN = Errno(0x23) - EALREADY = Errno(0x25) - EAUTH = Errno(0x50) - EBADF = Errno(0x9) - EBADMSG = Errno(0x5c) - EBADRPC = Errno(0x48) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x58) - ECHILD = Errno(0xa) - ECONNABORTED = Errno(0x35) - ECONNREFUSED = Errno(0x3d) - ECONNRESET = Errno(0x36) - EDEADLK = Errno(0xb) - EDESTADDRREQ = Errno(0x27) - EDOM = Errno(0x21) - EDQUOT = Errno(0x45) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EFTYPE = Errno(0x4f) - EHOSTDOWN = Errno(0x40) - EHOSTUNREACH = Errno(0x41) - EIDRM = Errno(0x59) - EILSEQ = Errno(0x54) - EINPROGRESS = Errno(0x24) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EIPSEC = Errno(0x52) - EISCONN = Errno(0x38) - EISDIR = Errno(0x15) - ELAST = Errno(0x5f) - ELOOP = Errno(0x3e) - EMEDIUMTYPE = Errno(0x56) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x28) - ENAMETOOLONG = Errno(0x3f) - ENEEDAUTH = Errno(0x51) - ENETDOWN = Errno(0x32) - ENETRESET = Errno(0x34) - ENETUNREACH = Errno(0x33) - ENFILE = Errno(0x17) - ENOATTR = Errno(0x53) - ENOBUFS = Errno(0x37) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x4d) - ENOMEDIUM = Errno(0x55) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x5a) - ENOPROTOOPT = Errno(0x2a) - ENOSPC = Errno(0x1c) - ENOSYS = Errno(0x4e) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x39) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x42) - ENOTRECOVERABLE = Errno(0x5d) - ENOTSOCK = Errno(0x26) - ENOTSUP = Errno(0x5b) - ENOTTY = Errno(0x19) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x2d) - EOVERFLOW = Errno(0x57) - EOWNERDEAD = Errno(0x5e) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x2e) - EPIPE = Errno(0x20) - EPROCLIM = Errno(0x43) - EPROCUNAVAIL = Errno(0x4c) - EPROGMISMATCH = Errno(0x4b) - EPROGUNAVAIL = Errno(0x4a) - EPROTO = Errno(0x5f) - EPROTONOSUPPORT = Errno(0x2b) - EPROTOTYPE = Errno(0x29) - ERANGE = Errno(0x22) - EREMOTE = Errno(0x47) - EROFS = Errno(0x1e) - ERPCMISMATCH = Errno(0x49) - ESHUTDOWN = Errno(0x3a) - ESOCKTNOSUPPORT = Errno(0x2c) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESTALE = Errno(0x46) - ETIMEDOUT = Errno(0x3c) - ETOOMANYREFS = Errno(0x3b) - ETXTBSY = Errno(0x1a) - EUSERS = Errno(0x44) - EWOULDBLOCK = Errno(0x23) - EXDEV = Errno(0x12) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCHLD = Signal(0x14) - SIGCONT = Signal(0x13) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINFO = Signal(0x1d) - SIGINT = Signal(0x2) - SIGIO = Signal(0x17) - SIGIOT = Signal(0x6) - SIGKILL = Signal(0x9) - SIGPIPE = Signal(0xd) - SIGPROF = Signal(0x1b) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x11) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHR = Signal(0x20) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x12) - SIGTTIN = Signal(0x15) - SIGTTOU = Signal(0x16) - SIGURG = Signal(0x10) - SIGUSR1 = Signal(0x1e) - SIGUSR2 = Signal(0x1f) - SIGVTALRM = Signal(0x1a) - SIGWINCH = Signal(0x1c) - SIGXCPU = Signal(0x18) - SIGXFSZ = Signal(0x19) -) diff --git a/c/syscall/zerrors_solaris_amd64.go b/c/syscall/zerrors_solaris_amd64.go deleted file mode 100644 index d3da33f6..00000000 --- a/c/syscall/zerrors_solaris_amd64.go +++ /dev/null @@ -1,1247 +0,0 @@ -// mkerrors.sh -m64 -// Code generated by the command above; DO NOT EDIT. - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -m64 _const.go - -//go:build amd64 && solaris - -package syscall - -const ( - AF_802 = 0x12 - AF_APPLETALK = 0x10 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_ECMA = 0x8 - AF_FILE = 0x1 - AF_GOSIP = 0x16 - AF_HYLINK = 0xf - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1a - AF_INET_OFFLOAD = 0x1e - AF_IPX = 0x17 - AF_KEY = 0x1b - AF_LAT = 0xe - AF_LINK = 0x19 - AF_LOCAL = 0x1 - AF_MAX = 0x20 - AF_NBS = 0x7 - AF_NCA = 0x1c - AF_NIT = 0x11 - AF_NS = 0x6 - AF_OSI = 0x13 - AF_OSINET = 0x15 - AF_PACKET = 0x20 - AF_POLICY = 0x1d - AF_PUP = 0x4 - AF_ROUTE = 0x18 - AF_SNA = 0xb - AF_TRILL = 0x1f - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_X25 = 0x14 - ARPHRD_ARCNET = 0x7 - ARPHRD_ATM = 0x10 - ARPHRD_AX25 = 0x3 - ARPHRD_CHAOS = 0x5 - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_FC = 0x12 - ARPHRD_FRAME = 0xf - ARPHRD_HDLC = 0x11 - ARPHRD_IB = 0x20 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IPATM = 0x13 - ARPHRD_METRICOM = 0x17 - ARPHRD_TUNNEL = 0x1f - B0 = 0x0 - B110 = 0x3 - B115200 = 0x12 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B153600 = 0x13 - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B230400 = 0x14 - B2400 = 0xb - B300 = 0x7 - B307200 = 0x15 - B38400 = 0xf - B460800 = 0x16 - B4800 = 0xc - B50 = 0x1 - B57600 = 0x10 - B600 = 0x8 - B75 = 0x2 - B76800 = 0x11 - B921600 = 0x17 - B9600 = 0xd - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = -0x3fefbd89 - BIOCGDLTLIST32 = -0x3ff7bd89 - BIOCGETIF = 0x4020426b - BIOCGETLIF = 0x4078426b - BIOCGHDRCMPLT = 0x40044274 - BIOCGRTIMEOUT = 0x4010427b - BIOCGRTIMEOUT32 = 0x4008427b - BIOCGSEESENT = 0x40044278 - BIOCGSTATS = 0x4080426f - BIOCGSTATSOLD = 0x4008426f - BIOCIMMEDIATE = -0x7ffbbd90 - BIOCPROMISC = 0x20004269 - BIOCSBLEN = -0x3ffbbd9a - BIOCSDLT = -0x7ffbbd8a - BIOCSETF = -0x7fefbd99 - BIOCSETF32 = -0x7ff7bd99 - BIOCSETIF = -0x7fdfbd94 - BIOCSETLIF = -0x7f87bd94 - BIOCSHDRCMPLT = -0x7ffbbd8b - BIOCSRTIMEOUT = -0x7fefbd86 - BIOCSRTIMEOUT32 = -0x7ff7bd86 - BIOCSSEESENT = -0x7ffbbd87 - BIOCSTCPF = -0x7fefbd8e - BIOCSUDPF = -0x7fefbd8d - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_DFLTBUFSIZE = 0x100000 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x1000000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x800 - CREAD = 0x80 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIZE = 0x30 - CSTART = 0x11 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - CSWTCH = 0x1a - DLT_AIRONET_HEADER = 0x78 - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_BACNET_MS_TP = 0xa5 - DLT_CHAOS = 0x5 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_DOCSIS = 0x8f - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FDDI = 0xa - DLT_FRELAY = 0x6b - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_HDLC = 0x10 - DLT_HHDLC = 0x79 - DLT_HIPPI = 0xf - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xa2 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x12 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0xe - DLT_PPP_PPPD = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAW = 0xc - DLT_RAWAF_MASK = 0x2240000 - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xd - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - EMPTY_SET = 0x0 - EMT_CPCOVF = 0x1 - EQUALITY_CHECK = 0x0 - EXTA = 0xe - EXTB = 0xf - FD_CLOEXEC = 0x1 - FD_NFDBITS = 0x40 - FD_SETSIZE = 0x10000 - FLUSHALL = 0x1 - FLUSHDATA = 0x0 - FLUSHO = 0x2000 - F_ALLOCSP = 0xa - F_ALLOCSP64 = 0xa - F_BADFD = 0x2e - F_BLKSIZE = 0x13 - F_BLOCKS = 0x12 - F_CHKFL = 0x8 - F_COMPAT = 0x8 - F_DUP2FD = 0x9 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x25 - F_FREESP = 0xb - F_FREESP64 = 0xb - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xe - F_GETLK64 = 0xe - F_GETOWN = 0x17 - F_GETXFL = 0x2d - F_HASREMOTELOCKS = 0x1a - F_ISSTREAM = 0xd - F_MANDDNY = 0x10 - F_MDACC = 0x20 - F_NODNY = 0x0 - F_NPRIV = 0x10 - F_PRIV = 0xf - F_QUOTACTL = 0x11 - F_RDACC = 0x1 - F_RDDNY = 0x1 - F_RDLCK = 0x1 - F_REVOKE = 0x19 - F_RMACC = 0x4 - F_RMDNY = 0x4 - F_RWACC = 0x3 - F_RWDNY = 0x3 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLK64_NBMAND = 0x2a - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETLK_NBMAND = 0x2a - F_SETOWN = 0x18 - F_SHARE = 0x28 - F_SHARE_NBMAND = 0x2b - F_UNLCK = 0x3 - F_UNLKSYS = 0x4 - F_UNSHARE = 0x29 - F_WRACC = 0x2 - F_WRDNY = 0x2 - F_WRLCK = 0x2 - HUPCL = 0x400 - ICANON = 0x2 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFF_ADDRCONF = 0x80000 - IFF_ALLMULTI = 0x200 - IFF_ANYCAST = 0x400000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x7f203003b5a - IFF_COS_ENABLED = 0x200000000 - IFF_DEBUG = 0x4 - IFF_DEPRECATED = 0x40000 - IFF_DHCPRUNNING = 0x4000 - IFF_DUPLICATE = 0x4000000000 - IFF_FAILED = 0x10000000 - IFF_FIXEDMTU = 0x1000000000 - IFF_INACTIVE = 0x40000000 - IFF_INTELLIGENT = 0x400 - IFF_IPMP = 0x8000000000 - IFF_IPMP_CANTCHANGE = 0x10000000 - IFF_IPMP_INVALID = 0x1ec200080 - IFF_IPV4 = 0x1000000 - IFF_IPV6 = 0x2000000 - IFF_L3PROTECT = 0x40000000000 - IFF_LOOPBACK = 0x8 - IFF_MULTICAST = 0x800 - IFF_MULTI_BCAST = 0x1000 - IFF_NOACCEPT = 0x4000000 - IFF_NOARP = 0x80 - IFF_NOFAILOVER = 0x8000000 - IFF_NOLINKLOCAL = 0x20000000000 - IFF_NOLOCAL = 0x20000 - IFF_NONUD = 0x200000 - IFF_NORTEXCH = 0x800000 - IFF_NOTRAILERS = 0x20 - IFF_NOXMIT = 0x10000 - IFF_OFFLINE = 0x80000000 - IFF_POINTOPOINT = 0x10 - IFF_PREFERRED = 0x400000000 - IFF_PRIVATE = 0x8000 - IFF_PROMISC = 0x100 - IFF_ROUTER = 0x100000 - IFF_RUNNING = 0x40 - IFF_STANDBY = 0x20000000 - IFF_TEMPORARY = 0x800000000 - IFF_UNNUMBERED = 0x2000 - IFF_UP = 0x1 - IFF_VIRTUAL = 0x2000000000 - IFF_VRRP = 0x10000000000 - IFF_XRESOLV = 0x100000000 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_6TO4 = 0xca - IFT_AAL5 = 0x31 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ATM = 0x25 - IFT_CEPT = 0x13 - IFT_DS3 = 0x1e - IFT_EON = 0x19 - IFT_ETHER = 0x6 - IFT_FDDI = 0xf - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_HDH1822 = 0x3 - IFT_HIPPI = 0x2f - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IB = 0xc7 - IFT_IPV4 = 0xc8 - IFT_IPV6 = 0xc9 - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88026 = 0xa - IFT_LAPB = 0x10 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_NSIP = 0x1b - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PPP = 0x17 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PTPSERIAL = 0x16 - IFT_RS232 = 0x21 - IFT_SDLC = 0x11 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_STARLAN = 0xb - IFT_T1 = 0x12 - IFT_ULTRA = 0x1d - IFT_V35 = 0x2d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_AUTOCONF_MASK = 0xffff0000 - IN_AUTOCONF_NET = 0xa9fe0000 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_CLASSE_NET = 0xffffffff - IN_LOOPBACKNET = 0x7f - IN_PRIVATE12_MASK = 0xfff00000 - IN_PRIVATE12_NET = 0xac100000 - IN_PRIVATE16_MASK = 0xffff0000 - IN_PRIVATE16_NET = 0xc0a80000 - IN_PRIVATE8_MASK = 0xff000000 - IN_PRIVATE8_NET = 0xa000000 - IPPROTO_AH = 0x33 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x4 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_HELLO = 0x3f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPV6 = 0x29 - IPPROTO_MAX = 0x100 - IPPROTO_ND = 0x4d - IPPROTO_NONE = 0x3b - IPPROTO_OSPF = 0x59 - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_UDP = 0x11 - IPV6_ADD_MEMBERSHIP = 0x9 - IPV6_BOUND_IF = 0x41 - IPV6_CHECKSUM = 0x18 - IPV6_DONTFRAG = 0x21 - IPV6_DROP_MEMBERSHIP = 0xa - IPV6_DSTOPTS = 0xf - IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 - IPV6_FLOWINFO_TCLASS = 0xf00f - IPV6_HOPLIMIT = 0xc - IPV6_HOPOPTS = 0xe - IPV6_JOIN_GROUP = 0x9 - IPV6_LEAVE_GROUP = 0xa - IPV6_MULTICAST_HOPS = 0x7 - IPV6_MULTICAST_IF = 0x6 - IPV6_MULTICAST_LOOP = 0x8 - IPV6_NEXTHOP = 0xd - IPV6_PAD1_OPT = 0x0 - IPV6_PATHMTU = 0x25 - IPV6_PKTINFO = 0xb - IPV6_PREFER_SRC_CGA = 0x20 - IPV6_PREFER_SRC_CGADEFAULT = 0x10 - IPV6_PREFER_SRC_CGAMASK = 0x30 - IPV6_PREFER_SRC_COA = 0x2 - IPV6_PREFER_SRC_DEFAULT = 0x15 - IPV6_PREFER_SRC_HOME = 0x1 - IPV6_PREFER_SRC_MASK = 0x3f - IPV6_PREFER_SRC_MIPDEFAULT = 0x1 - IPV6_PREFER_SRC_MIPMASK = 0x3 - IPV6_PREFER_SRC_NONCGA = 0x10 - IPV6_PREFER_SRC_PUBLIC = 0x4 - IPV6_PREFER_SRC_TMP = 0x8 - IPV6_PREFER_SRC_TMPDEFAULT = 0x4 - IPV6_PREFER_SRC_TMPMASK = 0xc - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x13 - IPV6_RECVHOPOPTS = 0x14 - IPV6_RECVPATHMTU = 0x24 - IPV6_RECVPKTINFO = 0x12 - IPV6_RECVRTHDR = 0x16 - IPV6_RECVRTHDRDSTOPTS = 0x17 - IPV6_RECVTCLASS = 0x19 - IPV6_RTHDR = 0x10 - IPV6_RTHDRDSTOPTS = 0x11 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SEC_OPT = 0x22 - IPV6_SRC_PREFERENCES = 0x23 - IPV6_TCLASS = 0x26 - IPV6_UNICAST_HOPS = 0x5 - IPV6_UNSPEC_SRC = 0x42 - IPV6_USE_MIN_MTU = 0x20 - IPV6_V6ONLY = 0x27 - IP_ADD_MEMBERSHIP = 0x13 - IP_ADD_SOURCE_MEMBERSHIP = 0x17 - IP_BLOCK_SOURCE = 0x15 - IP_BOUND_IF = 0x41 - IP_BROADCAST = 0x106 - IP_BROADCAST_TTL = 0x43 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DHCPINIT_IF = 0x45 - IP_DONTFRAG = 0x1b - IP_DONTROUTE = 0x105 - IP_DROP_MEMBERSHIP = 0x14 - IP_DROP_SOURCE_MEMBERSHIP = 0x18 - IP_HDRINCL = 0x2 - IP_MAXPACKET = 0xffff - IP_MF = 0x2000 - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x10 - IP_MULTICAST_LOOP = 0x12 - IP_MULTICAST_TTL = 0x11 - IP_NEXTHOP = 0x19 - IP_OPTIONS = 0x1 - IP_PKTINFO = 0x1a - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x9 - IP_RECVOPTS = 0x5 - IP_RECVPKTINFO = 0x1a - IP_RECVRETOPTS = 0x6 - IP_RECVSLLA = 0xa - IP_RECVTTL = 0xb - IP_RETOPTS = 0x8 - IP_REUSEADDR = 0x104 - IP_SEC_OPT = 0x22 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x16 - IP_UNSPEC_SRC = 0x42 - ISIG = 0x1 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - MADV_ACCESS_DEFAULT = 0x6 - MADV_ACCESS_LWP = 0x7 - MADV_ACCESS_MANY = 0x8 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_32BIT = 0x80 - MAP_ALIGN = 0x200 - MAP_ANON = 0x100 - MAP_ANONYMOUS = 0x100 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_INITDATA = 0x800 - MAP_NORESERVE = 0x40 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_TEXT = 0x400 - MAP_TYPE = 0xf - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CTRUNC = 0x10 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_DUPCTRL = 0x800 - MSG_EOR = 0x8 - MSG_MAXIOVLEN = 0x10 - MSG_NOTIFICATION = 0x100 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x20 - MSG_WAITALL = 0x40 - MSG_XPG4_2 = 0x8000 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_OLDSYNC = 0x0 - MS_SYNC = 0x4 - M_FLUSH = 0x86 - NOFLSH = 0x80 - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENFAIL = -0x1 - OPOST = 0x1 - O_ACCMODE = 0x600003 - O_APPEND = 0x8 - O_CLOEXEC = 0x800000 - O_CREAT = 0x100 - O_DSYNC = 0x40 - O_EXCL = 0x400 - O_EXEC = 0x400000 - O_LARGEFILE = 0x2000 - O_NDELAY = 0x4 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NOLINKS = 0x40000 - O_NONBLOCK = 0x80 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x8000 - O_SEARCH = 0x200000 - O_SIOCGIFCONF = -0x3ff796ec - O_SIOCGLIFCONF = -0x3fef9688 - O_SYNC = 0x10 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - O_XATTR = 0x4000 - PARENB = 0x100 - PAREXT = 0x100000 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x5 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x3 - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x9 - RTAX_NETMASK = 0x2 - RTAX_SRC = 0x8 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTA_NUMBITS = 0x9 - RTA_SRC = 0x100 - RTF_BLACKHOLE = 0x1000 - RTF_CLONING = 0x100 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INDIRECT = 0x40000 - RTF_KERNEL = 0x80000 - RTF_LLINFO = 0x400 - RTF_MASK = 0x80 - RTF_MODIFIED = 0x20 - RTF_MULTIRT = 0x10000 - RTF_PRIVATE = 0x2000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_REJECT = 0x8 - RTF_SETSRC = 0x20000 - RTF_STATIC = 0x800 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTF_ZONE = 0x100000 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_CHGADDR = 0xf - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_FREEADDR = 0x10 - RTM_GET = 0x4 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_VERSION = 0x3 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RT_AWARE = 0x1 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - SCM_RIGHTS = 0x1010 - SCM_TIMESTAMP = 0x1013 - SCM_UCRED = 0x1012 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIG2STR_MAX = 0x20 - SIOCADDMULTI = -0x7fdf96cf - SIOCADDRT = -0x7fcf8df6 - SIOCATMARK = 0x40047307 - SIOCDARP = -0x7fdb96e0 - SIOCDELMULTI = -0x7fdf96ce - SIOCDELRT = -0x7fcf8df5 - SIOCDIPSECONFIG = -0x7ffb9669 - SIOCDXARP = -0x7fff9658 - SIOCFIPSECONFIG = -0x7ffb966b - SIOCGARP = -0x3fdb96e1 - SIOCGDSTINFO = -0x3fff965c - SIOCGENADDR = -0x3fdf96ab - SIOCGENPSTATS = -0x3fdf96c7 - SIOCGETLSGCNT = -0x3fef8deb - SIOCGETNAME = 0x40107334 - SIOCGETPEER = 0x40107335 - SIOCGETPROP = -0x3fff8f44 - SIOCGETSGCNT = -0x3feb8deb - SIOCGETSYNC = -0x3fdf96d3 - SIOCGETVIFCNT = -0x3feb8dec - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = -0x3fdf96f3 - SIOCGIFBRDADDR = -0x3fdf96e9 - SIOCGIFCONF = -0x3ff796a4 - SIOCGIFDSTADDR = -0x3fdf96f1 - SIOCGIFFLAGS = -0x3fdf96ef - SIOCGIFHWADDR = -0x3fdf9647 - SIOCGIFINDEX = -0x3fdf96a6 - SIOCGIFMEM = -0x3fdf96ed - SIOCGIFMETRIC = -0x3fdf96e5 - SIOCGIFMTU = -0x3fdf96ea - SIOCGIFMUXID = -0x3fdf96a8 - SIOCGIFNETMASK = -0x3fdf96e7 - SIOCGIFNUM = 0x40046957 - SIOCGIP6ADDRPOLICY = -0x3fff965e - SIOCGIPMSFILTER = -0x3ffb964c - SIOCGLIFADDR = -0x3f87968f - SIOCGLIFBINDING = -0x3f879666 - SIOCGLIFBRDADDR = -0x3f879685 - SIOCGLIFCONF = -0x3fef965b - SIOCGLIFDADSTATE = -0x3f879642 - SIOCGLIFDSTADDR = -0x3f87968d - SIOCGLIFFLAGS = -0x3f87968b - SIOCGLIFGROUPINFO = -0x3f4b9663 - SIOCGLIFGROUPNAME = -0x3f879664 - SIOCGLIFHWADDR = -0x3f879640 - SIOCGLIFINDEX = -0x3f87967b - SIOCGLIFLNKINFO = -0x3f879674 - SIOCGLIFMETRIC = -0x3f879681 - SIOCGLIFMTU = -0x3f879686 - SIOCGLIFMUXID = -0x3f87967d - SIOCGLIFNETMASK = -0x3f879683 - SIOCGLIFNUM = -0x3ff3967e - SIOCGLIFSRCOF = -0x3fef964f - SIOCGLIFSUBNET = -0x3f879676 - SIOCGLIFTOKEN = -0x3f879678 - SIOCGLIFUSESRC = -0x3f879651 - SIOCGLIFZONE = -0x3f879656 - SIOCGLOWAT = 0x40047303 - SIOCGMSFILTER = -0x3ffb964e - SIOCGPGRP = 0x40047309 - SIOCGSTAMP = -0x3fef9646 - SIOCGXARP = -0x3fff9659 - SIOCIFDETACH = -0x7fdf96c8 - SIOCILB = -0x3ffb9645 - SIOCLIFADDIF = -0x3f879691 - SIOCLIFDELND = -0x7f879673 - SIOCLIFGETND = -0x3f879672 - SIOCLIFREMOVEIF = -0x7f879692 - SIOCLIFSETND = -0x7f879671 - SIOCLIPSECONFIG = -0x7ffb9668 - SIOCLOWER = -0x7fdf96d7 - SIOCSARP = -0x7fdb96e2 - SIOCSCTPGOPT = -0x3fef9653 - SIOCSCTPPEELOFF = -0x3ffb9652 - SIOCSCTPSOPT = -0x7fef9654 - SIOCSENABLESDP = -0x3ffb9649 - SIOCSETPROP = -0x7ffb8f43 - SIOCSETSYNC = -0x7fdf96d4 - SIOCSHIWAT = -0x7ffb8d00 - SIOCSIFADDR = -0x7fdf96f4 - SIOCSIFBRDADDR = -0x7fdf96e8 - SIOCSIFDSTADDR = -0x7fdf96f2 - SIOCSIFFLAGS = -0x7fdf96f0 - SIOCSIFINDEX = -0x7fdf96a5 - SIOCSIFMEM = -0x7fdf96ee - SIOCSIFMETRIC = -0x7fdf96e4 - SIOCSIFMTU = -0x7fdf96eb - SIOCSIFMUXID = -0x7fdf96a7 - SIOCSIFNAME = -0x7fdf96b7 - SIOCSIFNETMASK = -0x7fdf96e6 - SIOCSIP6ADDRPOLICY = -0x7fff965d - SIOCSIPMSFILTER = -0x7ffb964b - SIOCSIPSECONFIG = -0x7ffb966a - SIOCSLGETREQ = -0x3fdf96b9 - SIOCSLIFADDR = -0x7f879690 - SIOCSLIFBRDADDR = -0x7f879684 - SIOCSLIFDSTADDR = -0x7f87968e - SIOCSLIFFLAGS = -0x7f87968c - SIOCSLIFGROUPNAME = -0x7f879665 - SIOCSLIFINDEX = -0x7f87967a - SIOCSLIFLNKINFO = -0x7f879675 - SIOCSLIFMETRIC = -0x7f879680 - SIOCSLIFMTU = -0x7f879687 - SIOCSLIFMUXID = -0x7f87967c - SIOCSLIFNAME = -0x3f87967f - SIOCSLIFNETMASK = -0x7f879682 - SIOCSLIFPREFIX = -0x3f879641 - SIOCSLIFSUBNET = -0x7f879677 - SIOCSLIFTOKEN = -0x7f879679 - SIOCSLIFUSESRC = -0x7f879650 - SIOCSLIFZONE = -0x7f879655 - SIOCSLOWAT = -0x7ffb8cfe - SIOCSLSTAT = -0x7fdf96b8 - SIOCSMSFILTER = -0x7ffb964d - SIOCSPGRP = -0x7ffb8cf8 - SIOCSPROMISC = -0x7ffb96d0 - SIOCSQPTR = -0x3ffb9648 - SIOCSSDSTATS = -0x3fdf96d2 - SIOCSSESTATS = -0x3fdf96d1 - SIOCSXARP = -0x7fff965a - SIOCTMYADDR = -0x3ff79670 - SIOCTMYSITE = -0x3ff7966e - SIOCTONLINK = -0x3ff7966f - SIOCUPPER = -0x7fdf96d8 - SIOCX25RCV = -0x3fdf96c4 - SIOCX25TBL = -0x3fdf96c3 - SIOCX25XMT = -0x3fdf96c5 - SIOCXPROTO = 0x20007337 - SOCK_CLOEXEC = 0x80000 - SOCK_DGRAM = 0x1 - SOCK_NDELAY = 0x200000 - SOCK_NONBLOCK = 0x100000 - SOCK_RAW = 0x4 - SOCK_RDM = 0x5 - SOCK_SEQPACKET = 0x6 - SOCK_STREAM = 0x2 - SOCK_TYPE_MASK = 0xffff - SOL_FILTER = 0xfffc - SOL_PACKET = 0xfffd - SOL_ROUTE = 0xfffe - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ALL = 0x3f - SO_ALLZONES = 0x1014 - SO_ANON_MLP = 0x100a - SO_ATTACH_FILTER = 0x40000001 - SO_BAND = 0x4000 - SO_BROADCAST = 0x20 - SO_COPYOPT = 0x80000 - SO_DEBUG = 0x1 - SO_DELIM = 0x8000 - SO_DETACH_FILTER = 0x40000002 - SO_DGRAM_ERRIND = 0x200 - SO_DOMAIN = 0x100c - SO_DONTLINGER = -0x81 - SO_DONTROUTE = 0x10 - SO_ERROPT = 0x40000 - SO_ERROR = 0x1007 - SO_EXCLBIND = 0x1015 - SO_HIWAT = 0x10 - SO_ISNTTY = 0x800 - SO_ISTTY = 0x400 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOWAT = 0x20 - SO_MAC_EXEMPT = 0x100b - SO_MAC_IMPLICIT = 0x1016 - SO_MAXBLK = 0x100000 - SO_MAXPSZ = 0x8 - SO_MINPSZ = 0x4 - SO_MREADOFF = 0x80 - SO_MREADON = 0x40 - SO_NDELOFF = 0x200 - SO_NDELON = 0x100 - SO_NODELIM = 0x10000 - SO_OOBINLINE = 0x100 - SO_PROTOTYPE = 0x1009 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVPSH = 0x100d - SO_RCVTIMEO = 0x1006 - SO_READOPT = 0x1 - SO_RECVUCRED = 0x400 - SO_REUSEADDR = 0x4 - SO_SECATTR = 0x1011 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_STRHOLD = 0x20000 - SO_TAIL = 0x200000 - SO_TIMESTAMP = 0x1013 - SO_TONSTOP = 0x2000 - SO_TOSTOP = 0x1000 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_VRRP = 0x1017 - SO_WROFF = 0x2 - TCFLSH = 0x5407 - TCIFLUSH = 0x0 - TCIOFLUSH = 0x2 - TCOFLUSH = 0x1 - TCP_ABORT_THRESHOLD = 0x11 - TCP_ANONPRIVBIND = 0x20 - TCP_CONN_ABORT_THRESHOLD = 0x13 - TCP_CONN_NOTIFY_THRESHOLD = 0x12 - TCP_CORK = 0x18 - TCP_EXCLBIND = 0x21 - TCP_INIT_CWND = 0x15 - TCP_KEEPALIVE = 0x8 - TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17 - TCP_KEEPALIVE_THRESHOLD = 0x16 - TCP_KEEPCNT = 0x23 - TCP_KEEPIDLE = 0x22 - TCP_KEEPINTVL = 0x24 - TCP_LINGER2 = 0x1c - TCP_MAXSEG = 0x2 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOTIFY_THRESHOLD = 0x10 - TCP_RECVDSTADDR = 0x14 - TCP_RTO_INITIAL = 0x19 - TCP_RTO_MAX = 0x1b - TCP_RTO_MIN = 0x1a - TCSAFLUSH = 0x5410 - TIOC = 0x5400 - TIOCCBRK = 0x747a - TIOCCDTR = 0x7478 - TIOCCILOOP = 0x746c - TIOCEXCL = 0x740d - TIOCFLUSH = 0x7410 - TIOCGETC = 0x7412 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x7414 - TIOCGPPS = 0x547d - TIOCGPPSEV = 0x547f - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5469 - TIOCGWINSZ = 0x5468 - TIOCHPCL = 0x7402 - TIOCKBOF = 0x5409 - TIOCKBON = 0x5408 - TIOCLBIC = 0x747e - TIOCLBIS = 0x747f - TIOCLGET = 0x747c - TIOCLSET = 0x747d - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMSET = 0x741a - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x7471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7473 - TIOCREMOTE = 0x741e - TIOCSBRK = 0x747b - TIOCSCTTY = 0x7484 - TIOCSDTR = 0x7479 - TIOCSETC = 0x7411 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIGNAL = 0x741f - TIOCSILOOP = 0x746d - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x7415 - TIOCSPPS = 0x547e - TIOCSSOFTCAR = 0x546a - TIOCSTART = 0x746e - TIOCSTI = 0x7417 - TIOCSTOP = 0x746f - TIOCSWINSZ = 0x5467 - TOSTOP = 0x100 - VCEOF = 0x8 - VCEOL = 0x9 - VDISCARD = 0xd - VDSUSP = 0xb - VEOF = 0x4 - VEOL = 0x5 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMIN = 0x4 - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WCONTFLG = 0xffff - WCONTINUED = 0x8 - WCOREFLG = 0x80 - WEXITED = 0x1 - WNOHANG = 0x40 - WNOWAIT = 0x80 - WOPTMASK = 0xcf - WRAP = 0x20000 - WSIGMASK = 0x7f - WSTOPFLG = 0x7f - WSTOPPED = 0x4 - WTRAPPED = 0x2 - WUNTRACED = 0x4 -) - -// Errors -const ( - E2BIG = Errno(0x7) - EACCES = Errno(0xd) - EADDRINUSE = Errno(0x7d) - EADDRNOTAVAIL = Errno(0x7e) - EADV = Errno(0x44) - EAFNOSUPPORT = Errno(0x7c) - EAGAIN = Errno(0xb) - EALREADY = Errno(0x95) - EBADE = Errno(0x32) - EBADF = Errno(0x9) - EBADFD = Errno(0x51) - EBADMSG = Errno(0x4d) - EBADR = Errno(0x33) - EBADRQC = Errno(0x36) - EBADSLT = Errno(0x37) - EBFONT = Errno(0x39) - EBUSY = Errno(0x10) - ECANCELED = Errno(0x2f) - ECHILD = Errno(0xa) - ECHRNG = Errno(0x25) - ECOMM = Errno(0x46) - ECONNABORTED = Errno(0x82) - ECONNREFUSED = Errno(0x92) - ECONNRESET = Errno(0x83) - EDEADLK = Errno(0x2d) - EDEADLOCK = Errno(0x38) - EDESTADDRREQ = Errno(0x60) - EDOM = Errno(0x21) - EDQUOT = Errno(0x31) - EEXIST = Errno(0x11) - EFAULT = Errno(0xe) - EFBIG = Errno(0x1b) - EHOSTDOWN = Errno(0x93) - EHOSTUNREACH = Errno(0x94) - EIDRM = Errno(0x24) - EILSEQ = Errno(0x58) - EINPROGRESS = Errno(0x96) - EINTR = Errno(0x4) - EINVAL = Errno(0x16) - EIO = Errno(0x5) - EISCONN = Errno(0x85) - EISDIR = Errno(0x15) - EL2HLT = Errno(0x2c) - EL2NSYNC = Errno(0x26) - EL3HLT = Errno(0x27) - EL3RST = Errno(0x28) - ELIBACC = Errno(0x53) - ELIBBAD = Errno(0x54) - ELIBEXEC = Errno(0x57) - ELIBMAX = Errno(0x56) - ELIBSCN = Errno(0x55) - ELNRNG = Errno(0x29) - ELOCKUNMAPPED = Errno(0x48) - ELOOP = Errno(0x5a) - EMFILE = Errno(0x18) - EMLINK = Errno(0x1f) - EMSGSIZE = Errno(0x61) - EMULTIHOP = Errno(0x4a) - ENAMETOOLONG = Errno(0x4e) - ENETDOWN = Errno(0x7f) - ENETRESET = Errno(0x81) - ENETUNREACH = Errno(0x80) - ENFILE = Errno(0x17) - ENOANO = Errno(0x35) - ENOBUFS = Errno(0x84) - ENOCSI = Errno(0x2b) - ENODATA = Errno(0x3d) - ENODEV = Errno(0x13) - ENOENT = Errno(0x2) - ENOEXEC = Errno(0x8) - ENOLCK = Errno(0x2e) - ENOLINK = Errno(0x43) - ENOMEM = Errno(0xc) - ENOMSG = Errno(0x23) - ENONET = Errno(0x40) - ENOPKG = Errno(0x41) - ENOPROTOOPT = Errno(0x63) - ENOSPC = Errno(0x1c) - ENOSR = Errno(0x3f) - ENOSTR = Errno(0x3c) - ENOSYS = Errno(0x59) - ENOTACTIVE = Errno(0x49) - ENOTBLK = Errno(0xf) - ENOTCONN = Errno(0x86) - ENOTDIR = Errno(0x14) - ENOTEMPTY = Errno(0x5d) - ENOTRECOVERABLE = Errno(0x3b) - ENOTSOCK = Errno(0x5f) - ENOTSUP = Errno(0x30) - ENOTTY = Errno(0x19) - ENOTUNIQ = Errno(0x50) - ENXIO = Errno(0x6) - EOPNOTSUPP = Errno(0x7a) - EOVERFLOW = Errno(0x4f) - EOWNERDEAD = Errno(0x3a) - EPERM = Errno(0x1) - EPFNOSUPPORT = Errno(0x7b) - EPIPE = Errno(0x20) - EPROTO = Errno(0x47) - EPROTONOSUPPORT = Errno(0x78) - EPROTOTYPE = Errno(0x62) - ERANGE = Errno(0x22) - EREMCHG = Errno(0x52) - EREMOTE = Errno(0x42) - ERESTART = Errno(0x5b) - EROFS = Errno(0x1e) - ESHUTDOWN = Errno(0x8f) - ESOCKTNOSUPPORT = Errno(0x79) - ESPIPE = Errno(0x1d) - ESRCH = Errno(0x3) - ESRMNT = Errno(0x45) - ESTALE = Errno(0x97) - ESTRPIPE = Errno(0x5c) - ETIME = Errno(0x3e) - ETIMEDOUT = Errno(0x91) - ETOOMANYREFS = Errno(0x90) - ETXTBSY = Errno(0x1a) - EUNATCH = Errno(0x2a) - EUSERS = Errno(0x5e) - EWOULDBLOCK = Errno(0xb) - EXDEV = Errno(0x12) - EXFULL = Errno(0x34) -) - -// Signals -const ( - SIGABRT = Signal(0x6) - SIGALRM = Signal(0xe) - SIGBUS = Signal(0xa) - SIGCANCEL = Signal(0x24) - SIGCHLD = Signal(0x12) - SIGCLD = Signal(0x12) - SIGCONT = Signal(0x19) - SIGEMT = Signal(0x7) - SIGFPE = Signal(0x8) - SIGFREEZE = Signal(0x22) - SIGHUP = Signal(0x1) - SIGILL = Signal(0x4) - SIGINT = Signal(0x2) - SIGIO = Signal(0x16) - SIGIOT = Signal(0x6) - SIGJVM1 = Signal(0x27) - SIGJVM2 = Signal(0x28) - SIGKILL = Signal(0x9) - SIGLOST = Signal(0x25) - SIGLWP = Signal(0x21) - SIGPIPE = Signal(0xd) - SIGPOLL = Signal(0x16) - SIGPROF = Signal(0x1d) - SIGPWR = Signal(0x13) - SIGQUIT = Signal(0x3) - SIGSEGV = Signal(0xb) - SIGSTOP = Signal(0x17) - SIGSYS = Signal(0xc) - SIGTERM = Signal(0xf) - SIGTHAW = Signal(0x23) - SIGTRAP = Signal(0x5) - SIGTSTP = Signal(0x18) - SIGTTIN = Signal(0x1a) - SIGTTOU = Signal(0x1b) - SIGURG = Signal(0x15) - SIGUSR1 = Signal(0x10) - SIGUSR2 = Signal(0x11) - SIGVTALRM = Signal(0x1c) - SIGWAITING = Signal(0x20) - SIGWINCH = Signal(0x14) - SIGXCPU = Signal(0x1e) - SIGXFSZ = Signal(0x1f) - SIGXRES = Signal(0x26) -) diff --git a/c/syscall/zerrors_windows.go b/c/syscall/zerrors_windows.go deleted file mode 100644 index b56609d8..00000000 --- a/c/syscall/zerrors_windows.go +++ /dev/null @@ -1,148 +0,0 @@ -// mkerrors_windows.sh -m32 -// Code generated by the command above; DO NOT EDIT. - -package syscall - -// Go names for Windows errors. -const ( - ENOENT Errno = ERROR_FILE_NOT_FOUND - ENOTDIR Errno = ERROR_PATH_NOT_FOUND -) - -// Windows reserves errors >= 1<<29 for application use. -const APPLICATION_ERROR = 1 << 29 - -// Invented values to support what package os and others expects. -const ( - E2BIG Errno = APPLICATION_ERROR + iota - EACCES - EADDRINUSE - EADDRNOTAVAIL - EADV - EAFNOSUPPORT - EAGAIN - EALREADY - EBADE - EBADF - EBADFD - EBADMSG - EBADR - EBADRQC - EBADSLT - EBFONT - EBUSY - ECANCELED - ECHILD - ECHRNG - ECOMM - ECONNABORTED - ECONNREFUSED - ECONNRESET - EDEADLK - EDEADLOCK - EDESTADDRREQ - EDOM - EDOTDOT - EDQUOT - EEXIST - EFAULT - EFBIG - EHOSTDOWN - EHOSTUNREACH - EIDRM - EILSEQ - EINPROGRESS - EINTR - EINVAL - EIO - EISCONN - EISDIR - EISNAM - EKEYEXPIRED - EKEYREJECTED - EKEYREVOKED - EL2HLT - EL2NSYNC - EL3HLT - EL3RST - ELIBACC - ELIBBAD - ELIBEXEC - ELIBMAX - ELIBSCN - ELNRNG - ELOOP - EMEDIUMTYPE - EMFILE - EMLINK - EMSGSIZE - EMULTIHOP - ENAMETOOLONG - ENAVAIL - ENETDOWN - ENETRESET - ENETUNREACH - ENFILE - ENOANO - ENOBUFS - ENOCSI - ENODATA - ENODEV - ENOEXEC - ENOKEY - ENOLCK - ENOLINK - ENOMEDIUM - ENOMEM - ENOMSG - ENONET - ENOPKG - ENOPROTOOPT - ENOSPC - ENOSR - ENOSTR - ENOSYS - ENOTBLK - ENOTCONN - ENOTEMPTY - ENOTNAM - ENOTRECOVERABLE - ENOTSOCK - ENOTSUP - ENOTTY - ENOTUNIQ - ENXIO - EOPNOTSUPP - EOVERFLOW - EOWNERDEAD - EPERM - EPFNOSUPPORT - EPIPE - EPROTO - EPROTONOSUPPORT - EPROTOTYPE - ERANGE - EREMCHG - EREMOTE - EREMOTEIO - ERESTART - EROFS - ESHUTDOWN - ESOCKTNOSUPPORT - ESPIPE - ESRCH - ESRMNT - ESTALE - ESTRPIPE - ETIME - ETIMEDOUT - ETOOMANYREFS - ETXTBSY - EUCLEAN - EUNATCH - EUSERS - EWOULDBLOCK - EXDEV - EXFULL - EWINDOWS -) diff --git a/c/syscall/ztypes_aix_ppc64.go b/c/syscall/ztypes_aix_ppc64.go deleted file mode 100644 index e7a25ece..00000000 --- a/c/syscall/ztypes_aix_ppc64.go +++ /dev/null @@ -1,288 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_aix.go | go run mkpost.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x3ff -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Timeval32 struct { - Sec int32 - Usec int32 -} - -type Timezone struct { - Minuteswest int32 - Dsttime int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Pid_t int32 - -type _Gid_t uint32 - -type Flock_t struct { - Type int16 - Whence int16 - Sysid uint32 - Pid int32 - Vfs int32 - Start int64 - Len int64 -} - -type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink int16 - Flag uint16 - Uid uint32 - Gid uint32 - Rdev uint64 - Ssize int32 - Atim StTimespec_t - Mtim StTimespec_t - Ctim StTimespec_t - Blksize int64 - Blocks int64 - Vfstype int32 - Vfs uint32 - Type uint32 - Gen uint32 - Reserved [9]uint32 - Padto_ll uint32 - Size int64 -} - -type Statfs_t struct { - Version int32 - Type int32 - Bsize uint64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid64_t - Vfstype int32 - Fsize uint64 - Vfsnumber int32 - Vfsoff int32 - Vfslen int32 - Vfsvers int32 - Fname [32]uint8 - Fpack [32]uint8 - Name_max int32 - Pad_cgo_0 [4]byte -} - -type Fsid64_t struct { - Val [2]uint64 -} - -type StTimespec_t struct { - Sec int64 - Nsec int32 - Pad_cgo_0 [4]byte -} - -type Dirent struct { - Offset uint64 - Ino uint64 - Reclen uint16 - Namlen uint16 - Name [256]uint8 - Pad_cgo_0 [4]byte -} - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [1023]uint8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [120]uint8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]uint8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [1012]uint8 -} - -type _Socklen uint32 - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x404 - SizeofSockaddrUnix = 0x401 - SizeofSockaddrDatalink = 0x80 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -const ( - SizeofIfMsghdr = 0x10 -) - -type IfMsgHdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Addrlen uint8 - Pad_cgo_0 [1]byte -} - -type Utsname struct { - Sysname [32]uint8 - Nodename [32]uint8 - Release [32]uint8 - Version [32]uint8 - Machine [32]uint8 -} - -const ( - _AT_FDCWD = -0x2 - _AT_REMOVEDIR = 0x1 - _AT_SYMLINK_NOFOLLOW = 0x1 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [16]uint8 -} diff --git a/c/syscall/ztypes_darwin_amd64.go b/c/syscall/ztypes_darwin_amd64.go deleted file mode 100644 index 551edc70..00000000 --- a/c/syscall/ztypes_darwin_amd64.go +++ /dev/null @@ -1,466 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_darwin.go - -//go:build amd64 && darwin - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Timeval32 struct { - Sec int32 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev int32 - Mode uint16 - Nlink uint16 - Ino uint64 - Uid uint32 - Gid uint32 - Rdev int32 - Pad_cgo_0 [4]byte - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint32 - Lspare int32 - Qspare [2]int64 -} - -type Statfs_t struct { - Bsize uint32 - Iosize int32 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Owner uint32 - Type uint32 - Flags uint32 - Fssubtype uint32 - Fstypename [16]int8 - Mntonname [1024]int8 - Mntfromname [1024]int8 - Reserved [8]uint32 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Fstore_t struct { - Flags uint32 - Posmode int32 - Offset int64 - Length int64 - Bytesalloc int64 -} - -type Radvisory_t struct { - Offset int64 - Count int32 - Pad_cgo_0 [4]byte -} - -type Fbootstraptransfer_t struct { - Offset int64 - Length uint64 - Buffer *byte -} - -type Log2phys_t struct { - Flags uint32 - Contigbytes int64 - Devoffset int64 -} - -type Fsid struct { - Val [2]int32 -} - -type Dirent struct { - Ino uint64 - Seekoff uint64 - Reclen uint16 - Namlen uint16 - Type uint8 - Name [1024]int8 - Pad_cgo_0 [3]byte -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex uint32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x14 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [32]int32 -} - -const ( - SizeofIfMsghdr = 0x70 - SizeofIfData = 0x60 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfmaMsghdr2 = 0x14 - SizeofRtMsghdr = 0x5c - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Typelen uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Recvquota uint8 - Xmitquota uint8 - Unused1 uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Recvtiming uint32 - Xmittiming uint32 - Lastchange Timeval32 - Unused2 uint32 - Hwassist uint32 - Reserved1 uint32 - Reserved2 uint32 -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfmaMsghdr2 struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Refcount int32 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint32 - Mtu uint32 - Hopcount uint32 - Expire int32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pksent uint32 - Filler [4]uint32 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval32 - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -const ( - _AT_FDCWD = -0x2 -) - -type Termios struct { - Iflag uint64 - Oflag uint64 - Cflag uint64 - Lflag uint64 - Cc [20]uint8 - Pad_cgo_0 [4]byte - Ispeed uint64 - Ospeed uint64 -} diff --git a/c/syscall/ztypes_darwin_arm64.go b/c/syscall/ztypes_darwin_arm64.go deleted file mode 100644 index 46f78a97..00000000 --- a/c/syscall/ztypes_darwin_arm64.go +++ /dev/null @@ -1,466 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_darwin.go - -//go:build arm64 && darwin - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Timeval32 struct { - Sec int32 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev int32 - Mode uint16 - Nlink uint16 - Ino uint64 - Uid uint32 - Gid uint32 - Rdev int32 - Pad_cgo_0 [4]byte - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint32 - Lspare int32 - Qspare [2]int64 -} - -type Statfs_t struct { - Bsize uint32 - Iosize int32 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Owner uint32 - Type uint32 - Flags uint32 - Fssubtype uint32 - Fstypename [16]int8 - Mntonname [1024]int8 - Mntfromname [1024]int8 - Reserved [8]uint32 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Fstore_t struct { - Flags uint32 - Posmode int32 - Offset int64 - Length int64 - Bytesalloc int64 -} - -type Radvisory_t struct { - Offset int64 - Count int32 - Pad_cgo_0 [4]byte -} - -type Fbootstraptransfer_t struct { - Offset int64 - Length uint64 - Buffer *byte -} - -type Log2phys_t struct { - Flags uint32 - Contigbytes int64 - Devoffset int64 -} - -type Fsid struct { - Val [2]int32 -} - -type Dirent struct { - Ino uint64 - Seekoff uint64 - Reclen uint16 - Namlen uint16 - Type uint8 - Name [1024]int8 - Pad_cgo_0 [3]byte -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex uint32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x14 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [32]int32 -} - -const ( - SizeofIfMsghdr = 0x70 - SizeofIfData = 0x60 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfmaMsghdr2 = 0x14 - SizeofRtMsghdr = 0x5c - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Typelen uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Recvquota uint8 - Xmitquota uint8 - Unused1 uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Recvtiming uint32 - Xmittiming uint32 - Lastchange Timeval32 - Unused2 uint32 - Hwassist uint32 - Reserved1 uint32 - Reserved2 uint32 -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfmaMsghdr2 struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Refcount int32 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint32 - Mtu uint32 - Hopcount uint32 - Expire int32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pksent uint32 - Filler [4]uint32 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval32 - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -const ( - _AT_FDCWD = -0x2 -) - -type Termios struct { - Iflag uint64 - Oflag uint64 - Cflag uint64 - Lflag uint64 - Cc [20]uint8 - Pad_cgo_0 [4]byte - Ispeed uint64 - Ospeed uint64 -} diff --git a/c/syscall/ztypes_dragonfly_amd64.go b/c/syscall/ztypes_dragonfly_amd64.go deleted file mode 100644 index ec519b72..00000000 --- a/c/syscall/ztypes_dragonfly_amd64.go +++ /dev/null @@ -1,453 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_dragonfly.go - -//go:build amd64 && dragonfly - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Ino uint64 - Nlink uint32 - Dev uint32 - Mode uint16 - Padding1 uint16 - Uid uint32 - Gid uint32 - Rdev uint32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - Lspare int32 - Qspare1 int64 - Qspare2 int64 -} - -type Statfs_t struct { - Spare2 int64 - Bsize int64 - Iosize int64 - Blocks int64 - Bfree int64 - Bavail int64 - Files int64 - Ffree int64 - Fsid Fsid - Owner uint32 - Type int32 - Flags int32 - Pad_cgo_0 [4]byte - Syncwrites int64 - Asyncwrites int64 - Fstypename [16]int8 - Mntonname [80]int8 - Syncreads int64 - Asyncreads int64 - Spares1 int16 - Mntfromname [80]int8 - Spares2 int16 - Pad_cgo_1 [4]byte - Spare [2]int64 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Namlen uint16 - Type uint8 - Unused1 uint8 - Unused2 uint32 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 - Rcf uint16 - Route [16]uint16 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x36 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [16]uint64 -} - -const ( - SizeofIfMsghdr = 0xb0 - SizeofIfData = 0xa0 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x98 - SizeofRtMetrics = 0x70 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Recvquota uint8 - Xmitquota uint8 - Pad_cgo_0 [2]byte - Mtu uint64 - Metric uint64 - Link_state uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Unused uint64 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits uint64 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Pksent uint64 - Expire uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Recvpipe uint64 - Hopcount uint64 - Mssopt uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Msl uint64 - Iwmaxsegs uint64 - Iwcapsegs uint64 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -const ( - _AT_FDCWD = 0xfffafdcd -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed uint32 - Ospeed uint32 -} diff --git a/c/syscall/ztypes_freebsd_386.go b/c/syscall/ztypes_freebsd_386.go deleted file mode 100644 index 70ae808e..00000000 --- a/c/syscall/ztypes_freebsd_386.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_freebsd.go | go run mkpost.go - -//go:build 386 && freebsd - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -const ( - _statfsVersion = 0x20140518 - _dirblksiz = 0x400 -) - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint16 - Padding0 int16 - Uid uint32 - Gid uint32 - Padding1 int32 - Rdev uint64 - Atim_ext int32 - Atimespec Timespec - Mtim_ext int32 - Mtimespec Timespec - Ctim_ext int32 - Ctimespec Timespec - Btim_ext int32 - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint64 - Spare [10]uint64 -} - -type Statfs_t struct { - Version uint32 - Type uint32 - Flags uint64 - Bsize uint64 - Iosize uint64 - Blocks uint64 - Bfree uint64 - Bavail int64 - Files uint64 - Ffree int64 - Syncwrites uint64 - Asyncwrites uint64 - Syncreads uint64 - Asyncreads uint64 - Spare [10]uint64 - Namemax uint32 - Owner uint32 - Fsid Fsid - Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [1024]int8 - Mntonname [1024]int8 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 - Sysid int32 -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Pad0 uint8 - Namlen uint16 - Pad1 uint16 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [46]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x36 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint32 - Filter int16 - Flags uint16 - Fflags uint32 - Data int32 - Udata *byte -} - -type FdSet struct { - X__fds_bits [32]uint32 -} - -const ( - sizeofIfMsghdr = 0x64 - SizeofIfMsghdr = 0x60 - sizeofIfData = 0x54 - SizeofIfData = 0x50 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x5c - SizeofRtMetrics = 0x38 -) - -type ifMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data ifData -} - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Hwassist uint64 - Epoch int32 - Lastchange Timeval -} - -type IfData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Spare_char1 uint8 - Spare_char2 uint8 - Datalen uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Hwassist uint32 - Epoch int32 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Fmask int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint32 - Mtu uint32 - Hopcount uint32 - Expire uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pksent uint32 - Weight uint32 - Filler [3]uint32 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfZbuf = 0xc - SizeofBpfProgram = 0x8 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 - SizeofBpfZbufHeader = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfZbuf struct { - Bufa *byte - Bufb *byte - Buflen uint32 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfZbufHeader struct { - Kernel_gen uint32 - Kernel_len uint32 - User_gen uint32 - X_bzh_pad [5]uint32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_SYMLINK_FOLLOW = 0x400 - _AT_SYMLINK_NOFOLLOW = 0x200 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed uint32 - Ospeed uint32 -} diff --git a/c/syscall/ztypes_freebsd_amd64.go b/c/syscall/ztypes_freebsd_amd64.go deleted file mode 100644 index 050432a6..00000000 --- a/c/syscall/ztypes_freebsd_amd64.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_freebsd.go | go run mkpost.go - -//go:build amd64 && freebsd - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -const ( - _statfsVersion = 0x20140518 - _dirblksiz = 0x400 -) - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint16 - Padding0 int16 - Uid uint32 - Gid uint32 - Padding1 int32 - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint64 - Spare [10]uint64 -} - -type Statfs_t struct { - Version uint32 - Type uint32 - Flags uint64 - Bsize uint64 - Iosize uint64 - Blocks uint64 - Bfree uint64 - Bavail int64 - Files uint64 - Ffree int64 - Syncwrites uint64 - Asyncwrites uint64 - Syncreads uint64 - Asyncreads uint64 - Spare [10]uint64 - Namemax uint32 - Owner uint32 - Fsid Fsid - Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [1024]int8 - Mntonname [1024]int8 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 - Sysid int32 - Pad_cgo_0 [4]byte -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Pad0 uint8 - Namlen uint16 - Pad1 uint16 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [46]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x36 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - X__fds_bits [16]uint64 -} - -const ( - sizeofIfMsghdr = 0xa8 - SizeofIfMsghdr = 0xa8 - sizeofIfData = 0x98 - SizeofIfData = 0x98 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x98 - SizeofRtMetrics = 0x70 -) - -type ifMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data ifData -} - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Spare_char1 uint8 - Spare_char2 uint8 - Datalen uint8 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Fmask int32 - Inits uint64 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Expire uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Pksent uint64 - Weight uint64 - Filler [3]uint64 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfZbuf = 0x18 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 - SizeofBpfZbufHeader = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfZbuf struct { - Bufa *byte - Bufb *byte - Buflen uint64 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -type BpfZbufHeader struct { - Kernel_gen uint32 - Kernel_len uint32 - User_gen uint32 - X_bzh_pad [5]uint32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_SYMLINK_FOLLOW = 0x400 - _AT_SYMLINK_NOFOLLOW = 0x200 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed uint32 - Ospeed uint32 -} diff --git a/c/syscall/ztypes_freebsd_arm.go b/c/syscall/ztypes_freebsd_arm.go deleted file mode 100644 index ae5ed56c..00000000 --- a/c/syscall/ztypes_freebsd_arm.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -fsigned-char types_freebsd.go - -//go:build arm && freebsd - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 - Pad_cgo_0 [4]byte -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -const ( - _statfsVersion = 0x20140518 - _dirblksiz = 0x400 -) - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint16 - Padding0 int16 - Uid uint32 - Gid uint32 - Padding1 int32 - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint64 - Spare [10]uint64 -} - -type Statfs_t struct { - Version uint32 - Type uint32 - Flags uint64 - Bsize uint64 - Iosize uint64 - Blocks uint64 - Bfree uint64 - Bavail int64 - Files uint64 - Ffree int64 - Syncwrites uint64 - Asyncwrites uint64 - Syncreads uint64 - Asyncreads uint64 - Spare [10]uint64 - Namemax uint32 - Owner uint32 - Fsid Fsid - Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [1024]int8 - Mntonname [1024]int8 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 - Sysid int32 - Pad_cgo_0 [4]byte -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Pad0 uint8 - Namlen uint16 - Pad1 uint16 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [46]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x36 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint32 - Filter int16 - Flags uint16 - Fflags uint32 - Data int32 - Udata *byte -} - -type FdSet struct { - X__fds_bits [32]uint32 -} - -const ( - sizeofIfMsghdr = 0x70 - SizeofIfMsghdr = 0x70 - sizeofIfData = 0x60 - SizeofIfData = 0x60 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x5c - SizeofRtMetrics = 0x38 -) - -type ifMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data ifData -} - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Spare_char1 uint8 - Spare_char2 uint8 - Datalen uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Hwassist uint32 - Pad_cgo_0 [4]byte - Epoch int64 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Fmask int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint32 - Mtu uint32 - Hopcount uint32 - Expire uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pksent uint32 - Weight uint32 - Filler [3]uint32 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfZbuf = 0xc - SizeofBpfProgram = 0x8 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 - SizeofBpfZbufHeader = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfZbuf struct { - Bufa *byte - Bufb *byte - Buflen uint32 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -type BpfZbufHeader struct { - Kernel_gen uint32 - Kernel_len uint32 - User_gen uint32 - X_bzh_pad [5]uint32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_SYMLINK_FOLLOW = 0x400 - _AT_SYMLINK_NOFOLLOW = 0x200 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed uint32 - Ospeed uint32 -} diff --git a/c/syscall/ztypes_freebsd_arm64.go b/c/syscall/ztypes_freebsd_arm64.go deleted file mode 100644 index b3ab991f..00000000 --- a/c/syscall/ztypes_freebsd_arm64.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_freebsd.go | go run mkpost.go - -//go:build arm64 && freebsd - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -const ( - _statfsVersion = 0x20140518 - _dirblksiz = 0x400 -) - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint16 - Padding0 int16 - Uid uint32 - Gid uint32 - Padding1 int32 - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint64 - Spare [10]uint64 -} - -type Statfs_t struct { - Version uint32 - Type uint32 - Flags uint64 - Bsize uint64 - Iosize uint64 - Blocks uint64 - Bfree uint64 - Bavail int64 - Files uint64 - Ffree int64 - Syncwrites uint64 - Asyncwrites uint64 - Syncreads uint64 - Asyncreads uint64 - Spare [10]uint64 - Namemax uint32 - Owner uint32 - Fsid Fsid - Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [1024]int8 - Mntonname [1024]int8 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 - Sysid int32 - Pad_cgo_0 [4]byte -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Pad0 uint8 - Namlen uint16 - Pad1 uint16 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [46]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x36 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - X__fds_bits [16]uint64 -} - -const ( - sizeofIfMsghdr = 0xa8 - SizeofIfMsghdr = 0xa8 - sizeofIfData = 0x98 - SizeofIfData = 0x98 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x98 - SizeofRtMetrics = 0x70 -) - -type ifMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data ifData -} - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Spare_char1 uint8 - Spare_char2 uint8 - Datalen uint8 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Fmask int32 - Inits uint64 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Expire uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Pksent uint64 - Weight uint64 - Filler [3]uint64 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfZbuf = 0x18 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 - SizeofBpfZbufHeader = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfZbuf struct { - Bufa *byte - Bufb *byte - Buflen uint64 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -type BpfZbufHeader struct { - Kernel_gen uint32 - Kernel_len uint32 - User_gen uint32 - X_bzh_pad [5]uint32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_SYMLINK_FOLLOW = 0x400 - _AT_SYMLINK_NOFOLLOW = 0x200 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed uint32 - Ospeed uint32 -} diff --git a/c/syscall/ztypes_freebsd_riscv64.go b/c/syscall/ztypes_freebsd_riscv64.go deleted file mode 100644 index 28895184..00000000 --- a/c/syscall/ztypes_freebsd_riscv64.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_freebsd.go | go run mkpost.go - -//go:build riscv64 && freebsd - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -const ( - _statfsVersion = 0x20140518 - _dirblksiz = 0x400 -) - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint16 - Padding0 int16 - Uid uint32 - Gid uint32 - Padding1 int32 - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint64 - Spare [10]uint64 -} - -type Statfs_t struct { - Version uint32 - Type uint32 - Flags uint64 - Bsize uint64 - Iosize uint64 - Blocks uint64 - Bfree uint64 - Bavail int64 - Files uint64 - Ffree int64 - Syncwrites uint64 - Asyncwrites uint64 - Syncreads uint64 - Asyncreads uint64 - Spare [10]uint64 - Namemax uint32 - Owner uint32 - Fsid Fsid - Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [1024]int8 - Mntonname [1024]int8 -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 - Sysid int32 - Pad_cgo_0 [4]byte -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Pad0 uint8 - Namlen uint16 - Pad1 uint16 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [46]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x36 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - X__fds_bits [16]uint64 -} - -const ( - sizeofIfMsghdr = 0xa8 - SizeofIfMsghdr = 0xa8 - sizeofIfData = 0x98 - SizeofIfData = 0x98 - SizeofIfaMsghdr = 0x14 - SizeofIfmaMsghdr = 0x10 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x98 - SizeofRtMetrics = 0x70 -) - -type ifMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data ifData -} - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Spare_char1 uint8 - Spare_char2 uint8 - Datalen uint8 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Hwassist uint64 - Epoch int64 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type IfmaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Fmask int32 - Inits uint64 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Expire uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Pksent uint64 - Weight uint64 - Filler [3]uint64 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfZbuf = 0x18 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 - SizeofBpfZbufHeader = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfZbuf struct { - Bufa *byte - Bufb *byte - Buflen uint64 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp Timeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -type BpfZbufHeader struct { - Kernel_gen uint32 - Kernel_len uint32 - User_gen uint32 - X_bzh_pad [5]uint32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_SYMLINK_FOLLOW = 0x400 - _AT_SYMLINK_NOFOLLOW = 0x200 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed uint32 - Ospeed uint32 -} diff --git a/c/syscall/ztypes_linux_386.go b/c/syscall/ztypes_linux_386.go deleted file mode 100644 index a45511e8..00000000 --- a/c/syscall/ztypes_linux_386.go +++ /dev/null @@ -1,700 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -//go:build 386 && linux - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -type Timex struct { - Modes uint32 - Offset int32 - Freq int32 - Maxerror int32 - Esterror int32 - Status int32 - Constant int32 - Precision int32 - Tolerance int32 - Time Timeval - Tick int32 - Ppsfreq int32 - Jitter int32 - Shift int32 - Stabil int32 - Jitcnt int32 - Calcnt int32 - Errcnt int32 - Stbcnt int32 - Tai int32 - Pad_cgo_0 [44]byte -} - -type Time_t int32 - -type Tms struct { - Utime int32 - Stime int32 - Cutime int32 - Cstime int32 -} - -type Utimbuf struct { - Actime int32 - Modtime int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - X__pad1 uint16 - Pad_cgo_0 [2]byte - X__st_ino uint32 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - X__pad2 uint16 - Pad_cgo_1 [2]byte - Size int64 - Blksize int32 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Ino uint64 -} - -type Statfs_t struct { - Type int32 - Bsize int32 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int32 - Frsize int32 - Flags int32 - Spare [4]int32 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [1]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Start int64 - Len int64 - Pid int32 -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x1d - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]uint8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Ebx int32 - Ecx int32 - Edx int32 - Esi int32 - Edi int32 - Ebp int32 - Eax int32 - Xds int32 - Xes int32 - Xfs int32 - Xgs int32 - Orig_eax int32 - Eip int32 - Xcs int32 - Eflags int32 - Esp int32 - Xss int32 -} - -type FdSet struct { - Bits [32]int32 -} - -type Sysinfo_t struct { - Uptime int32 - Loads [3]uint32 - Totalram uint32 - Freeram uint32 - Sharedram uint32 - Bufferram uint32 - Totalswap uint32 - Freeswap uint32 - Procs uint16 - Pad uint16 - Totalhigh uint32 - Freehigh uint32 - Unit uint32 - X_f [8]int8 -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Tinode uint32 - Fname [6]int8 - Fpack [6]int8 -} - -type EpollEvent struct { - Events uint32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - VINTR = 0x0 - VQUIT = 0x1 - VERASE = 0x2 - VKILL = 0x3 - VEOF = 0x4 - VTIME = 0x5 - VMIN = 0x6 - VSWTC = 0x7 - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VEOL = 0xb - VREPRINT = 0xc - VDISCARD = 0xd - VWERASE = 0xe - VLNEXT = 0xf - VEOL2 = 0x10 - IGNBRK = 0x1 - BRKINT = 0x2 - IGNPAR = 0x4 - PARMRK = 0x8 - INPCK = 0x10 - ISTRIP = 0x20 - INLCR = 0x40 - IGNCR = 0x80 - ICRNL = 0x100 - IUCLC = 0x200 - IXON = 0x400 - IXANY = 0x800 - IXOFF = 0x1000 - IMAXBEL = 0x2000 - IUTF8 = 0x4000 - OPOST = 0x1 - OLCUC = 0x2 - ONLCR = 0x4 - OCRNL = 0x8 - ONOCR = 0x10 - ONLRET = 0x20 - OFILL = 0x40 - OFDEL = 0x80 - B0 = 0x0 - B50 = 0x1 - B75 = 0x2 - B110 = 0x3 - B134 = 0x4 - B150 = 0x5 - B200 = 0x6 - B300 = 0x7 - B600 = 0x8 - B1200 = 0x9 - B1800 = 0xa - B2400 = 0xb - B4800 = 0xc - B9600 = 0xd - B19200 = 0xe - B38400 = 0xf - CSIZE = 0x30 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSTOPB = 0x40 - CREAD = 0x80 - PARENB = 0x100 - PARODD = 0x200 - HUPCL = 0x400 - CLOCAL = 0x800 - B57600 = 0x1001 - B115200 = 0x1002 - B230400 = 0x1003 - B460800 = 0x1004 - B500000 = 0x1005 - B576000 = 0x1006 - B921600 = 0x1007 - B1000000 = 0x1008 - B1152000 = 0x1009 - B1500000 = 0x100a - B2000000 = 0x100b - B2500000 = 0x100c - B3000000 = 0x100d - B3500000 = 0x100e - B4000000 = 0x100f - ISIG = 0x1 - ICANON = 0x2 - XCASE = 0x4 - ECHO = 0x8 - ECHOE = 0x10 - ECHOK = 0x20 - ECHONL = 0x40 - NOFLSH = 0x80 - TOSTOP = 0x100 - ECHOCTL = 0x200 - ECHOPRT = 0x400 - ECHOKE = 0x800 - FLUSHO = 0x1000 - PENDIN = 0x4000 - IEXTEN = 0x8000 - TCGETS = 0x5401 - TCSETS = 0x5402 -) diff --git a/c/syscall/ztypes_linux_amd64.go b/c/syscall/ztypes_linux_amd64.go deleted file mode 100644 index 1bab13bf..00000000 --- a/c/syscall/ztypes_linux_amd64.go +++ /dev/null @@ -1,718 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -//go:build amd64 && linux - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Pad_cgo_0 [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Pad_cgo_1 [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Pad_cgo_2 [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_3 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - X__pad0 int32 - Rdev uint64 - Size int64 - Blksize int64 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - X__unused [3]int64 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int64 - Frsize int64 - Flags int64 - Spare [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x1d - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]uint8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - R15 uint64 - R14 uint64 - R13 uint64 - R12 uint64 - Rbp uint64 - Rbx uint64 - R11 uint64 - R10 uint64 - R9 uint64 - R8 uint64 - Rax uint64 - Rcx uint64 - Rdx uint64 - Rsi uint64 - Rdi uint64 - Orig_rax uint64 - Rip uint64 - Cs uint64 - Eflags uint64 - Rsp uint64 - Ss uint64 - Fs_base uint64 - Gs_base uint64 - Ds uint64 - Es uint64 - Fs uint64 - Gs uint64 -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]byte - Pad_cgo_1 [4]byte -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Pad_cgo_0 [4]byte - Tinode uint64 - Fname [6]int8 - Fpack [6]int8 - Pad_cgo_1 [4]byte -} - -type EpollEvent struct { - Events uint32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - VINTR = 0x0 - VQUIT = 0x1 - VERASE = 0x2 - VKILL = 0x3 - VEOF = 0x4 - VTIME = 0x5 - VMIN = 0x6 - VSWTC = 0x7 - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VEOL = 0xb - VREPRINT = 0xc - VDISCARD = 0xd - VWERASE = 0xe - VLNEXT = 0xf - VEOL2 = 0x10 - IGNBRK = 0x1 - BRKINT = 0x2 - IGNPAR = 0x4 - PARMRK = 0x8 - INPCK = 0x10 - ISTRIP = 0x20 - INLCR = 0x40 - IGNCR = 0x80 - ICRNL = 0x100 - IUCLC = 0x200 - IXON = 0x400 - IXANY = 0x800 - IXOFF = 0x1000 - IMAXBEL = 0x2000 - IUTF8 = 0x4000 - OPOST = 0x1 - OLCUC = 0x2 - ONLCR = 0x4 - OCRNL = 0x8 - ONOCR = 0x10 - ONLRET = 0x20 - OFILL = 0x40 - OFDEL = 0x80 - B0 = 0x0 - B50 = 0x1 - B75 = 0x2 - B110 = 0x3 - B134 = 0x4 - B150 = 0x5 - B200 = 0x6 - B300 = 0x7 - B600 = 0x8 - B1200 = 0x9 - B1800 = 0xa - B2400 = 0xb - B4800 = 0xc - B9600 = 0xd - B19200 = 0xe - B38400 = 0xf - CSIZE = 0x30 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSTOPB = 0x40 - CREAD = 0x80 - PARENB = 0x100 - PARODD = 0x200 - HUPCL = 0x400 - CLOCAL = 0x800 - B57600 = 0x1001 - B115200 = 0x1002 - B230400 = 0x1003 - B460800 = 0x1004 - B500000 = 0x1005 - B576000 = 0x1006 - B921600 = 0x1007 - B1000000 = 0x1008 - B1152000 = 0x1009 - B1500000 = 0x100a - B2000000 = 0x100b - B2500000 = 0x100c - B3000000 = 0x100d - B3500000 = 0x100e - B4000000 = 0x100f - ISIG = 0x1 - ICANON = 0x2 - XCASE = 0x4 - ECHO = 0x8 - ECHOE = 0x10 - ECHOK = 0x20 - ECHONL = 0x40 - NOFLSH = 0x80 - TOSTOP = 0x100 - ECHOCTL = 0x200 - ECHOPRT = 0x400 - ECHOKE = 0x800 - FLUSHO = 0x1000 - PENDIN = 0x4000 - IEXTEN = 0x8000 - TCGETS = 0x5401 - TCSETS = 0x5402 -) diff --git a/c/syscall/ztypes_linux_arm.go b/c/syscall/ztypes_linux_arm.go deleted file mode 100644 index a4d61bd1..00000000 --- a/c/syscall/ztypes_linux_arm.go +++ /dev/null @@ -1,689 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -//go:build arm && linux - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -type Timex struct { - Modes uint32 - Offset int32 - Freq int32 - Maxerror int32 - Esterror int32 - Status int32 - Constant int32 - Precision int32 - Tolerance int32 - Time Timeval - Tick int32 - Ppsfreq int32 - Jitter int32 - Shift int32 - Stabil int32 - Jitcnt int32 - Calcnt int32 - Errcnt int32 - Stbcnt int32 - Tai int32 - Pad_cgo_0 [44]byte -} - -type Time_t int32 - -type Tms struct { - Utime int32 - Stime int32 - Cutime int32 - Cstime int32 -} - -type Utimbuf struct { - Actime int32 - Modtime int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - X__pad1 uint16 - Pad_cgo_0 [2]byte - X__st_ino uint32 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - X__pad2 uint16 - Pad_cgo_1 [6]byte - Size int64 - Blksize int32 - Pad_cgo_2 [4]byte - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Ino uint64 -} - -type Statfs_t struct { - Type int32 - Bsize int32 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int32 - Frsize int32 - Flags int32 - Spare [4]int32 - Pad_cgo_0 [4]byte -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]uint8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]uint8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]uint8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x1d - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]uint8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Uregs [18]uint32 -} - -type FdSet struct { - Bits [32]int32 -} - -type Sysinfo_t struct { - Uptime int32 - Loads [3]uint32 - Totalram uint32 - Freeram uint32 - Sharedram uint32 - Bufferram uint32 - Totalswap uint32 - Freeswap uint32 - Procs uint16 - Pad uint16 - Totalhigh uint32 - Freehigh uint32 - Unit uint32 - X_f [8]uint8 -} - -type Utsname struct { - Sysname [65]uint8 - Nodename [65]uint8 - Release [65]uint8 - Version [65]uint8 - Machine [65]uint8 - Domainname [65]uint8 -} - -type Ustat_t struct { - Tfree int32 - Tinode uint32 - Fname [6]uint8 - Fpack [6]uint8 -} - -type EpollEvent struct { - Events uint32 - PadFd int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - VINTR = 0x0 - VQUIT = 0x1 - VERASE = 0x2 - VKILL = 0x3 - VEOF = 0x4 - VTIME = 0x5 - VMIN = 0x6 - VSWTC = 0x7 - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VEOL = 0xb - VREPRINT = 0xc - VDISCARD = 0xd - VWERASE = 0xe - VLNEXT = 0xf - VEOL2 = 0x10 - IGNBRK = 0x1 - BRKINT = 0x2 - IGNPAR = 0x4 - PARMRK = 0x8 - INPCK = 0x10 - ISTRIP = 0x20 - INLCR = 0x40 - IGNCR = 0x80 - ICRNL = 0x100 - IUCLC = 0x200 - IXON = 0x400 - IXANY = 0x800 - IXOFF = 0x1000 - IMAXBEL = 0x2000 - IUTF8 = 0x4000 - OPOST = 0x1 - OLCUC = 0x2 - ONLCR = 0x4 - OCRNL = 0x8 - ONOCR = 0x10 - ONLRET = 0x20 - OFILL = 0x40 - OFDEL = 0x80 - B0 = 0x0 - B50 = 0x1 - B75 = 0x2 - B110 = 0x3 - B134 = 0x4 - B150 = 0x5 - B200 = 0x6 - B300 = 0x7 - B600 = 0x8 - B1200 = 0x9 - B1800 = 0xa - B2400 = 0xb - B4800 = 0xc - B9600 = 0xd - B19200 = 0xe - B38400 = 0xf - CSIZE = 0x30 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSTOPB = 0x40 - CREAD = 0x80 - PARENB = 0x100 - PARODD = 0x200 - HUPCL = 0x400 - CLOCAL = 0x800 - B57600 = 0x1001 - B115200 = 0x1002 - B230400 = 0x1003 - B460800 = 0x1004 - B500000 = 0x1005 - B576000 = 0x1006 - B921600 = 0x1007 - B1000000 = 0x1008 - B1152000 = 0x1009 - B1500000 = 0x100a - B2000000 = 0x100b - B2500000 = 0x100c - B3000000 = 0x100d - B3500000 = 0x100e - B4000000 = 0x100f - ISIG = 0x1 - ICANON = 0x2 - XCASE = 0x4 - ECHO = 0x8 - ECHOE = 0x10 - ECHOK = 0x20 - ECHONL = 0x40 - NOFLSH = 0x80 - TOSTOP = 0x100 - ECHOCTL = 0x200 - ECHOPRT = 0x400 - ECHOKE = 0x800 - FLUSHO = 0x1000 - PENDIN = 0x4000 - IEXTEN = 0x8000 - TCGETS = 0x5401 - TCSETS = 0x5402 -) diff --git a/c/syscall/ztypes_linux_arm64.go b/c/syscall/ztypes_linux_arm64.go deleted file mode 100644 index 1e469c36..00000000 --- a/c/syscall/ztypes_linux_arm64.go +++ /dev/null @@ -1,603 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -fsigned-char types_linux.go - -//go:build arm64 && linux - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Pad_cgo_0 [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Pad_cgo_1 [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Pad_cgo_2 [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_3 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - X__pad1 uint64 - Size int64 - Blksize int32 - X__pad2 int32 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - X__glibc_reserved [2]int32 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int64 - Frsize int64 - Flags int64 - Spare [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x24 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]int8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Regs [31]uint64 - Sp uint64 - Pc uint64 - Pstate uint64 -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]int8 - Pad_cgo_1 [4]byte -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Pad_cgo_0 [4]byte - Tinode uint64 - Fname [6]int8 - Fpack [6]int8 - Pad_cgo_1 [4]byte -} - -type EpollEvent struct { - Events uint32 - _ int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x5401 - TCSETS = 0x5402 - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_loong64.go b/c/syscall/ztypes_linux_loong64.go deleted file mode 100644 index b0e068d7..00000000 --- a/c/syscall/ztypes_linux_loong64.go +++ /dev/null @@ -1,635 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_linux.go | go run mkpost.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_0 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - X__pad1 uint64 - Size int64 - Blksize int32 - X__pad2 int32 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - X__glibc_reserved [2]int32 -} - -type statxTimestamp struct { - Sec int64 - Nsec uint32 - X__reserved int32 -} - -type statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - X__spare0 [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime statxTimestamp - Btime statxTimestamp - Ctime statxTimestamp - Mtime statxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - Mnt_id uint64 - X__spare2 uint64 - X__spare3 [12]uint64 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int64 - Frsize int64 - Flags int64 - Spare [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Start int64 - Len int64 - Pid int32 - Pad_cgo_0 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_0 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x3a - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Regs [32]uint64 - Orig_a0 uint64 - Era uint64 - Badv uint64 - Reserved [10]uint64 -} - -type ptracePsw struct { -} - -type ptraceFpregs struct { -} - -type ptracePer struct { -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]int8 - Pad_cgo_0 [4]byte -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Tinode uint64 - Fname [6]int8 - Fpack [6]int8 - Pad_cgo_0 [4]byte -} - -type EpollEvent struct { - Events uint32 - X_padFd int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 - _AT_EMPTY_PATH = 0x1000 - _AT_NO_AUTOMOUNT = 0x800 - _STATX_BASIC_STATS = 0x7ff -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Ispeed uint32 - Ospeed uint32 -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x5401 - TCSETS = 0x5402 - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_mips.go b/c/syscall/ztypes_linux_mips.go deleted file mode 100644 index 621ef2d5..00000000 --- a/c/syscall/ztypes_linux_mips.go +++ /dev/null @@ -1,599 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -type Timex struct { - Modes uint32 - Offset int32 - Freq int32 - Maxerror int32 - Esterror int32 - Status int32 - Constant int32 - Precision int32 - Tolerance int32 - Time Timeval - Tick int32 - Ppsfreq int32 - Jitter int32 - Shift int32 - Stabil int32 - Jitcnt int32 - Calcnt int32 - Errcnt int32 - Stbcnt int32 - Tai int32 - Pad_cgo_0 [44]byte -} - -type Time_t int32 - -type Tms struct { - Utime int32 - Stime int32 - Cutime int32 - Cstime int32 -} - -type Utimbuf struct { - Actime int32 - Modtime int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint32 - Pad1 [3]int32 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint32 - Pad2 [3]int32 - Size int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Blksize int32 - Pad4 int32 - Blocks int64 - Pad5 [14]int32 -} - -type Statfs_t struct { - Type int32 - Bsize int32 - Frsize int32 - Pad_cgo_0 [4]byte - Blocks uint64 - Bfree uint64 - Files uint64 - Ffree uint64 - Bavail uint64 - Fsid Fsid - Namelen int32 - Flags int32 - Spare [5]int32 - Pad_cgo_1 [4]byte -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x27 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Regs [109]uint32 - U_tsize uint32 - U_dsize uint32 - U_ssize uint32 - Start_code uint32 - Start_data uint32 - Start_stack uint32 - Signal int32 - U_ar0 *byte - Magic uint32 - U_comm [32]int8 -} - -type FdSet struct { - Bits [32]int32 -} - -type Sysinfo_t struct { - Uptime int32 - Loads [3]uint32 - Totalram uint32 - Freeram uint32 - Sharedram uint32 - Bufferram uint32 - Totalswap uint32 - Freeswap uint32 - Procs uint16 - Pad uint16 - Totalhigh uint32 - Freehigh uint32 - Unit uint32 - X_f [8]int8 -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Tinode uint32 - Fname [6]int8 - Fpack [6]int8 -} - -type EpollEvent struct { - Events uint32 - PadFd int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x540d - TCSETS = 0x540e - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_mips64.go b/c/syscall/ztypes_linux_mips64.go deleted file mode 100644 index 75a5bc45..00000000 --- a/c/syscall/ztypes_linux_mips64.go +++ /dev/null @@ -1,606 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Pad_cgo_0 [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Pad_cgo_1 [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Pad_cgo_2 [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_3 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint32 - Pad1 [3]int32 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint32 - Pad2 [3]uint32 - Size int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Blksize uint32 - Pad4 uint32 - Blocks int64 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Frsize int64 - Blocks uint64 - Bfree uint64 - Files uint64 - Ffree uint64 - Bavail uint64 - Fsid Fsid - Namelen int64 - Flags int64 - Spare [5]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x22 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]int8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Regs [102]uint64 - U_tsize uint64 - U_dsize uint64 - U_ssize uint64 - Start_code uint64 - Start_data uint64 - Start_stack uint64 - Signal int64 - U_ar0 uint64 - Magic uint64 - U_comm [32]int8 -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]int8 - Pad_cgo_1 [4]byte -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Pad_cgo_0 [4]byte - Tinode uint64 - Fname [6]int8 - Fpack [6]int8 - Pad_cgo_1 [4]byte -} - -type EpollEvent struct { - Events uint32 - _ int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x540d - TCSETS = 0x540e - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_mips64le.go b/c/syscall/ztypes_linux_mips64le.go deleted file mode 100644 index 75a5bc45..00000000 --- a/c/syscall/ztypes_linux_mips64le.go +++ /dev/null @@ -1,606 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Pad_cgo_0 [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Pad_cgo_1 [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Pad_cgo_2 [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_3 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint32 - Pad1 [3]int32 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint32 - Pad2 [3]uint32 - Size int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Blksize uint32 - Pad4 uint32 - Blocks int64 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Frsize int64 - Blocks uint64 - Bfree uint64 - Files uint64 - Ffree uint64 - Bavail uint64 - Fsid Fsid - Namelen int64 - Flags int64 - Spare [5]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x22 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]int8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Regs [102]uint64 - U_tsize uint64 - U_dsize uint64 - U_ssize uint64 - Start_code uint64 - Start_data uint64 - Start_stack uint64 - Signal int64 - U_ar0 uint64 - Magic uint64 - U_comm [32]int8 -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]int8 - Pad_cgo_1 [4]byte -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Pad_cgo_0 [4]byte - Tinode uint64 - Fname [6]int8 - Fpack [6]int8 - Pad_cgo_1 [4]byte -} - -type EpollEvent struct { - Events uint32 - _ int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x540d - TCSETS = 0x540e - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_mipsle.go b/c/syscall/ztypes_linux_mipsle.go deleted file mode 100644 index 621ef2d5..00000000 --- a/c/syscall/ztypes_linux_mipsle.go +++ /dev/null @@ -1,599 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -type Timex struct { - Modes uint32 - Offset int32 - Freq int32 - Maxerror int32 - Esterror int32 - Status int32 - Constant int32 - Precision int32 - Tolerance int32 - Time Timeval - Tick int32 - Ppsfreq int32 - Jitter int32 - Shift int32 - Stabil int32 - Jitcnt int32 - Calcnt int32 - Errcnt int32 - Stbcnt int32 - Tai int32 - Pad_cgo_0 [44]byte -} - -type Time_t int32 - -type Tms struct { - Utime int32 - Stime int32 - Cutime int32 - Cstime int32 -} - -type Utimbuf struct { - Actime int32 - Modtime int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint32 - Pad1 [3]int32 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint32 - Pad2 [3]int32 - Size int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Blksize int32 - Pad4 int32 - Blocks int64 - Pad5 [14]int32 -} - -type Statfs_t struct { - Type int32 - Bsize int32 - Frsize int32 - Pad_cgo_0 [4]byte - Blocks uint64 - Bfree uint64 - Files uint64 - Ffree uint64 - Bavail uint64 - Fsid Fsid - Namelen int32 - Flags int32 - Spare [5]int32 - Pad_cgo_1 [4]byte -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]int8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x27 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Regs [109]uint32 - U_tsize uint32 - U_dsize uint32 - U_ssize uint32 - Start_code uint32 - Start_data uint32 - Start_stack uint32 - Signal int32 - U_ar0 *byte - Magic uint32 - U_comm [32]int8 -} - -type FdSet struct { - Bits [32]int32 -} - -type Sysinfo_t struct { - Uptime int32 - Loads [3]uint32 - Totalram uint32 - Freeram uint32 - Sharedram uint32 - Bufferram uint32 - Totalswap uint32 - Freeswap uint32 - Procs uint16 - Pad uint16 - Totalhigh uint32 - Freehigh uint32 - Unit uint32 - X_f [8]int8 -} - -type Utsname struct { - Sysname [65]int8 - Nodename [65]int8 - Release [65]int8 - Version [65]int8 - Machine [65]int8 - Domainname [65]int8 -} - -type Ustat_t struct { - Tfree int32 - Tinode uint32 - Fname [6]int8 - Fpack [6]int8 -} - -type EpollEvent struct { - Events uint32 - PadFd int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x540d - TCSETS = 0x540e - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_ppc64.go b/c/syscall/ztypes_linux_ppc64.go deleted file mode 100644 index c830cee9..00000000 --- a/c/syscall/ztypes_linux_ppc64.go +++ /dev/null @@ -1,613 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -//go:build ppc64 && linux - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Pad_cgo_0 [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Pad_cgo_1 [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Pad_cgo_2 [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_3 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - X__pad2 int32 - Rdev uint64 - Size int64 - Blksize int64 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - X__unused4 uint64 - X__unused5 uint64 - X__unused6 uint64 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int64 - Frsize int64 - Flags int64 - Spare [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]uint8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]uint8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]uint8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x22 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]uint8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Gpr [32]uint64 - Nip uint64 - Msr uint64 - Orig_gpr3 uint64 - Ctr uint64 - Link uint64 - Xer uint64 - Ccr uint64 - Softe uint64 - Trap uint64 - Dar uint64 - Dsisr uint64 - Result uint64 -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]uint8 - Pad_cgo_1 [4]byte -} - -type Utsname struct { - Sysname [65]uint8 - Nodename [65]uint8 - Release [65]uint8 - Version [65]uint8 - Machine [65]uint8 - Domainname [65]uint8 -} - -type Ustat_t struct { - Tfree int32 - Pad_cgo_0 [4]byte - Tinode uint64 - Fname [6]uint8 - Fpack [6]uint8 - Pad_cgo_1 [4]byte -} - -type EpollEvent struct { - Events uint32 - X_padFd int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - IUCLC = 0x1000 - OLCUC = 0x4 - TCGETS = 0x402c7413 - TCSETS = 0x802c7414 - XCASE = 0x4000 -) diff --git a/c/syscall/ztypes_linux_ppc64le.go b/c/syscall/ztypes_linux_ppc64le.go deleted file mode 100644 index 770ddc9f..00000000 --- a/c/syscall/ztypes_linux_ppc64le.go +++ /dev/null @@ -1,613 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -//go:build ppc64le && linux - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Pad_cgo_0 [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Pad_cgo_1 [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Pad_cgo_2 [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - Pad_cgo_3 [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - X__pad2 int32 - Rdev uint64 - Size int64 - Blksize int64 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - X__glibc_reserved4 uint64 - X__glibc_reserved5 uint64 - X__glibc_reserved6 uint64 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int64 - Frsize int64 - Flags int64 - Spare [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]uint8 - Pad_cgo_0 [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Pid int32 - Pad_cgo_1 [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]uint8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]uint8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Pad_cgo_0 [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x22 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 - Name [0]uint8 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Gpr [32]uint64 - Nip uint64 - Msr uint64 - Orig_gpr3 uint64 - Ctr uint64 - Link uint64 - Xer uint64 - Ccr uint64 - Softe uint64 - Trap uint64 - Dar uint64 - Dsisr uint64 - Result uint64 -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Pad_cgo_0 [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]uint8 - Pad_cgo_1 [4]byte -} - -type Utsname struct { - Sysname [65]uint8 - Nodename [65]uint8 - Release [65]uint8 - Version [65]uint8 - Machine [65]uint8 - Domainname [65]uint8 -} - -type Ustat_t struct { - Tfree int32 - Pad_cgo_0 [4]byte - Tinode uint64 - Fname [6]uint8 - Fpack [6]uint8 - Pad_cgo_1 [4]byte -} - -type EpollEvent struct { - Events uint32 - X_padFd int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - IUCLC = 0x1000 - OLCUC = 0x4 - TCGETS = 0x402c7413 - TCSETS = 0x802c7414 - XCASE = 0x4000 -) diff --git a/c/syscall/ztypes_linux_riscv64.go b/c/syscall/ztypes_linux_riscv64.go deleted file mode 100644 index f6b9cede..00000000 --- a/c/syscall/ztypes_linux_riscv64.go +++ /dev/null @@ -1,627 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - _ [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - X__pad1 uint64 - Size int64 - Blksize int32 - X__pad2 int32 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - X__glibc_reserved [2]int32 -} - -type Statfs_t struct { - Type int64 - Bsize int64 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen int64 - Frsize int64 - Flags int64 - Spare [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]uint8 - _ [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - Start int64 - Len int64 - Pid int32 - _ [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]uint8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]uint8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - _ [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x26 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Pc uint64 - Ra uint64 - Sp uint64 - Gp uint64 - Tp uint64 - T0 uint64 - T1 uint64 - T2 uint64 - S0 uint64 - S1 uint64 - A0 uint64 - A1 uint64 - A2 uint64 - A3 uint64 - A4 uint64 - A5 uint64 - A6 uint64 - A7 uint64 - S2 uint64 - S3 uint64 - S4 uint64 - S5 uint64 - S6 uint64 - S7 uint64 - S8 uint64 - S9 uint64 - S10 uint64 - S11 uint64 - T3 uint64 - T4 uint64 - T5 uint64 - T6 uint64 -} - -type ptracePsw struct { -} - -type ptraceFpregs struct { -} - -type ptracePer struct { -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]uint8 - _ [4]byte -} - -type Utsname struct { - Sysname [65]uint8 - Nodename [65]uint8 - Release [65]uint8 - Version [65]uint8 - Machine [65]uint8 - Domainname [65]uint8 -} - -type Ustat_t struct { - Tfree int32 - Tinode uint64 - Fname [6]uint8 - Fpack [6]uint8 - _ [4]byte -} - -type EpollEvent struct { - Events uint32 - _ int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [19]uint8 - Ispeed uint32 - Ospeed uint32 -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x5401 - TCSETS = 0x5402 - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_linux_s390x.go b/c/syscall/ztypes_linux_s390x.go deleted file mode 100644 index b67877f0..00000000 --- a/c/syscall/ztypes_linux_s390x.go +++ /dev/null @@ -1,627 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go | go run mkpost.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x1000 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timex struct { - Modes uint32 - _ [4]byte - Offset int64 - Freq int64 - Maxerror int64 - Esterror int64 - Status int32 - _ [4]byte - Constant int64 - Precision int64 - Tolerance int64 - Time Timeval - Tick int64 - Ppsfreq int64 - Jitter int64 - Shift int32 - _ [4]byte - Stabil int64 - Jitcnt int64 - Calcnt int64 - Errcnt int64 - Stbcnt int64 - Tai int32 - _ [44]byte -} - -type Time_t int64 - -type Tms struct { - Utime int64 - Stime int64 - Cutime int64 - Cstime int64 -} - -type Utimbuf struct { - Actime int64 - Modtime int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - _ int32 - Rdev uint64 - Size int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Blksize int64 - Blocks int64 - _ [3]int64 -} - -type Statfs_t struct { - Type uint32 - Bsize uint32 - Blocks uint64 - Bfree uint64 - Bavail uint64 - Files uint64 - Ffree uint64 - Fsid Fsid - Namelen uint32 - Frsize uint32 - Flags uint32 - Spare [4]uint32 - _ [4]byte -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Type uint8 - Name [256]uint8 - _ [5]byte -} - -type Fsid struct { - X__val [2]int32 -} - -type Flock_t struct { - Type int16 - Whence int16 - _ [4]byte - Start int64 - Len int64 - Pid int32 - _ [4]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [96]uint8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - _ [4]byte - Iov *Iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - _ [4]byte -} - -type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - _ [2]byte - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 -) - -const ( - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x27 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 -) - -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - X__ifi_pad uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - _ [6]byte - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - -type PtraceRegs struct { - Psw PtracePsw - Gprs [16]uint64 - Acrs [16]uint32 - Orig_gpr2 uint64 - Fp_regs PtraceFpregs - Per_info PtracePer - Ieee_instruction_pointer uint64 -} - -type PtracePsw struct { - Mask uint64 - Addr uint64 -} - -type PtraceFpregs struct { - Fpc uint32 - _ [4]byte - Fprs [16]float64 -} - -type PtracePer struct { - Control_regs [0]uint64 - _ [24]byte - _ [8]byte - Starting_addr uint64 - Ending_addr uint64 - Perc_atmid uint16 - _ [6]byte - Address uint64 - Access_id uint8 - _ [7]byte -} - -type FdSet struct { - Bits [16]int64 -} - -type Sysinfo_t struct { - Uptime int64 - Loads [3]uint64 - Totalram uint64 - Freeram uint64 - Sharedram uint64 - Bufferram uint64 - Totalswap uint64 - Freeswap uint64 - Procs uint16 - Pad uint16 - _ [4]byte - Totalhigh uint64 - Freehigh uint64 - Unit uint32 - X_f [0]uint8 - _ [4]byte -} - -type Utsname struct { - Sysname [65]uint8 - Nodename [65]uint8 - Release [65]uint8 - Version [65]uint8 - Machine [65]uint8 - Domainname [65]uint8 -} - -type Ustat_t struct { - Tfree int32 - _ [4]byte - Tinode uint64 - Fname [6]uint8 - Fpack [6]uint8 - _ [4]byte -} - -type EpollEvent struct { - Events uint32 - _ int32 - Fd int32 - Pad int32 -} - -const ( - _AT_FDCWD = -0x64 - _AT_REMOVEDIR = 0x200 - _AT_SYMLINK_NOFOLLOW = 0x100 - _AT_EACCESS = 0x200 -) - -type pollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - _ [3]byte - Ispeed uint32 - Ospeed uint32 -} - -const ( - IUCLC = 0x200 - OLCUC = 0x2 - TCGETS = 0x5401 - TCSETS = 0x5402 - XCASE = 0x4 -) diff --git a/c/syscall/ztypes_netbsd_386.go b/c/syscall/ztypes_netbsd_386.go deleted file mode 100644 index 74eaa4a1..00000000 --- a/c/syscall/ztypes_netbsd_386.go +++ /dev/null @@ -1,408 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_netbsd.go - -//go:build 386 && netbsd - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 -} - -type Timeval struct { - Sec int64 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Mode uint32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - Spare [2]uint32 -} - -type Statfs_t [0]byte - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Reclen uint16 - Namlen uint16 - Type uint8 - Name [512]int8 - Pad_cgo_0 [3]byte -} - -type Fsid struct { - X__fsid_val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x14 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint32 - Filter uint32 - Flags uint32 - Fflags uint32 - Data int64 - Udata int32 -} - -type FdSet struct { - Bits [8]uint32 -} - -const ( - SizeofIfMsghdr = 0x98 - SizeofIfData = 0x84 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x78 - SizeofRtMetrics = 0x50 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData - Pad_cgo_1 [4]byte -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Pad_cgo_0 [1]byte - Link_state int32 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Lastchange Timespec -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Metric int32 - Index uint16 - Pad_cgo_0 [6]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits int32 - Pad_cgo_1 [4]byte - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Expire int64 - Pksent int64 -} - -type Mclpool [0]byte - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x80 - SizeofBpfProgram = 0x8 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint64 - Drop uint64 - Capt uint64 - Padding [13]uint64 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec int32 - Usec int32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} - -type Sysctlnode struct { - Flags uint32 - Num int32 - Name [32]int8 - Ver uint32 - X__rsvd uint32 - Un [16]byte - X_sysctl_size [8]byte - X_sysctl_func [8]byte - X_sysctl_parent [8]byte - X_sysctl_desc [8]byte -} - -type sigset struct { - X__bits [4]uint32 -} diff --git a/c/syscall/ztypes_netbsd_amd64.go b/c/syscall/ztypes_netbsd_amd64.go deleted file mode 100644 index fc28fc9b..00000000 --- a/c/syscall/ztypes_netbsd_amd64.go +++ /dev/null @@ -1,415 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_netbsd.go - -//go:build amd64 && netbsd - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Mode uint32 - Pad_cgo_0 [4]byte - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Pad_cgo_1 [4]byte - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - Spare [2]uint32 - Pad_cgo_2 [4]byte -} - -type Statfs_t [0]byte - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Reclen uint16 - Namlen uint16 - Type uint8 - Name [512]int8 - Pad_cgo_0 [3]byte -} - -type Fsid struct { - X__fsid_val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x14 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter uint32 - Flags uint32 - Fflags uint32 - Pad_cgo_0 [4]byte - Data int64 - Udata int64 -} - -type FdSet struct { - Bits [8]uint32 -} - -const ( - SizeofIfMsghdr = 0x98 - SizeofIfData = 0x88 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x78 - SizeofRtMetrics = 0x50 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Pad_cgo_0 [1]byte - Link_state int32 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Lastchange Timespec -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Metric int32 - Index uint16 - Pad_cgo_0 [6]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits int32 - Pad_cgo_1 [4]byte - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Expire int64 - Pksent int64 -} - -type Mclpool [0]byte - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x80 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint64 - Drop uint64 - Capt uint64 - Padding [13]uint64 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -type BpfTimeval struct { - Sec int64 - Usec int64 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} - -type Sysctlnode struct { - Flags uint32 - Num int32 - Name [32]int8 - Ver uint32 - X__rsvd uint32 - Un [16]byte - X_sysctl_size [8]byte - X_sysctl_func [8]byte - X_sysctl_parent [8]byte - X_sysctl_desc [8]byte -} - -type sigset struct { - X__bits [4]uint32 -} diff --git a/c/syscall/ztypes_netbsd_arm.go b/c/syscall/ztypes_netbsd_arm.go deleted file mode 100644 index 1f885048..00000000 --- a/c/syscall/ztypes_netbsd_arm.go +++ /dev/null @@ -1,413 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_netbsd.go - -//go:build arm && netbsd - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 - Pad_cgo_0 [4]byte -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Mode uint32 - Pad_cgo_0 [4]byte - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Pad_cgo_1 [4]byte - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - Spare [2]uint32 - Pad_cgo_2 [4]byte -} - -type Statfs_t [0]byte - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Reclen uint16 - Namlen uint16 - Type uint8 - Name [512]int8 - Pad_cgo_0 [3]byte -} - -type Fsid struct { - X__fsid_val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x14 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint32 - Filter uint32 - Flags uint32 - Fflags uint32 - Data int64 - Udata int32 - Pad_cgo_0 [4]byte -} - -type FdSet struct { - Bits [8]uint32 -} - -const ( - SizeofIfMsghdr = 0x98 - SizeofIfData = 0x88 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x78 - SizeofRtMetrics = 0x50 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Pad_cgo_0 [1]byte - Link_state int32 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Lastchange Timespec -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Metric int32 - Index uint16 - Pad_cgo_0 [6]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits int32 - Pad_cgo_1 [4]byte - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Expire int64 - Pksent int64 -} - -type Mclpool [0]byte - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x80 - SizeofBpfProgram = 0x8 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint64 - Drop uint64 - Capt uint64 - Padding [13]uint64 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec int32 - Usec int32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} - -type Sysctlnode struct { - Flags uint32 - Num int32 - Name [32]int8 - Ver uint32 - X__rsvd uint32 - Un [16]byte - X_sysctl_size [8]byte - X_sysctl_func [8]byte - X_sysctl_parent [8]byte - X_sysctl_desc [8]byte -} - -type sigset struct { - X__bits [4]uint32 -} diff --git a/c/syscall/ztypes_netbsd_arm64.go b/c/syscall/ztypes_netbsd_arm64.go deleted file mode 100644 index cac74693..00000000 --- a/c/syscall/ztypes_netbsd_arm64.go +++ /dev/null @@ -1,415 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_netbsd.go - -//go:build arm64 && netbsd - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -type Stat_t struct { - Dev uint64 - Mode uint32 - Pad_cgo_0 [4]byte - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Pad_cgo_1 [4]byte - Rdev uint64 - Atimespec Timespec - Mtimespec Timespec - Ctimespec Timespec - Birthtimespec Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - Spare [2]uint32 - Pad_cgo_2 [4]byte -} - -type Statfs_t [0]byte - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Reclen uint16 - Namlen uint16 - Type uint8 - Name [512]int8 - Pad_cgo_0 [3]byte -} - -type Fsid struct { - X__fsid_val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [12]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x14 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter uint32 - Flags uint32 - Fflags uint32 - Pad_cgo_0 [4]byte - Data int64 - Udata int64 -} - -type FdSet struct { - Bits [8]uint32 -} - -const ( - SizeofIfMsghdr = 0x98 - SizeofIfData = 0x88 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x18 - SizeofRtMsghdr = 0x78 - SizeofRtMetrics = 0x50 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Pad_cgo_0 [1]byte - Link_state int32 - Mtu uint64 - Metric uint64 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Lastchange Timespec -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Metric int32 - Index uint16 - Pad_cgo_0 [6]byte -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Name [16]int8 - What uint16 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits int32 - Pad_cgo_1 [4]byte - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint64 - Mtu uint64 - Hopcount uint64 - Recvpipe uint64 - Sendpipe uint64 - Ssthresh uint64 - Rtt uint64 - Rttvar uint64 - Expire int64 - Pksent int64 -} - -type Mclpool [0]byte - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x80 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x20 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint64 - Drop uint64 - Capt uint64 - Padding [13]uint64 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [6]byte -} - -type BpfTimeval struct { - Sec int64 - Usec int64 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} - -type Sysctlnode struct { - Flags uint32 - Num int32 - Name [32]int8 - Ver uint32 - X__rsvd uint32 - Un [16]byte - X_sysctl_size [8]byte - X_sysctl_func [8]byte - X_sysctl_parent [8]byte - X_sysctl_desc [8]byte -} - -type sigset struct { - X__bits [4]uint32 -} diff --git a/c/syscall/ztypes_openbsd_386.go b/c/syscall/ztypes_openbsd_386.go deleted file mode 100644 index f9ba685e..00000000 --- a/c/syscall/ztypes_openbsd_386.go +++ /dev/null @@ -1,451 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -//go:build 386 && openbsd - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 -} - -type Timeval struct { - Sec int64 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - X__st_birthtim Timespec -} - -type Statfs_t struct { - F_flags uint32 - F_bsize uint32 - F_iosize uint32 - F_blocks uint64 - F_bfree uint64 - F_bavail int64 - F_files uint64 - F_ffree uint64 - F_favail int64 - F_syncwrites uint64 - F_syncreads uint64 - F_asyncwrites uint64 - F_asyncreads uint64 - F_fsid Fsid - F_namemax uint32 - F_owner uint32 - F_ctime uint64 - F_fstypename [16]int8 - F_mntonname [90]int8 - F_mntfromname [90]int8 - F_mntfromspec [90]int8 - Pad_cgo_0 [2]byte - Mount_info [160]byte -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [24]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x20 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint32 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [32]uint32 -} - -const ( - SizeofIfMsghdr = 0xec - SizeofIfData = 0xd4 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x60 - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Xflags int32 - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Mtu uint32 - Metric uint32 - Pad uint32 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Capabilities uint32 - Lastchange Timeval - Mclpool [7]Mclpool -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Metric int32 -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - What uint16 - Name [16]int8 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Priority uint8 - Mpls uint8 - Addrs int32 - Flags int32 - Fmask int32 - Pid int32 - Seq int32 - Errno int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Pksent uint64 - Expire int64 - Locks uint32 - Mtu uint32 - Refcnt uint32 - Hopcount uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pad uint32 -} - -type Mclpool struct { - Grown int32 - Alive uint16 - Hwm uint16 - Cwm uint16 - Lwm uint16 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x8 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec uint32 - Usec uint32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} diff --git a/c/syscall/ztypes_openbsd_amd64.go b/c/syscall/ztypes_openbsd_amd64.go deleted file mode 100644 index 889b9551..00000000 --- a/c/syscall/ztypes_openbsd_amd64.go +++ /dev/null @@ -1,458 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -//go:build amd64 && openbsd - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - Pad_cgo_0 [4]byte - X__st_birthtim Timespec -} - -type Statfs_t struct { - F_flags uint32 - F_bsize uint32 - F_iosize uint32 - Pad_cgo_0 [4]byte - F_blocks uint64 - F_bfree uint64 - F_bavail int64 - F_files uint64 - F_ffree uint64 - F_favail int64 - F_syncwrites uint64 - F_syncreads uint64 - F_asyncwrites uint64 - F_asyncreads uint64 - F_fsid Fsid - F_namemax uint32 - F_owner uint32 - F_ctime uint64 - F_fstypename [16]int8 - F_mntonname [90]int8 - F_mntfromname [90]int8 - F_mntfromspec [90]int8 - Pad_cgo_1 [2]byte - Mount_info [160]byte -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [24]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen uint32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x20 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [32]uint32 -} - -const ( - SizeofIfMsghdr = 0xf8 - SizeofIfData = 0xe0 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x60 - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Xflags int32 - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Mtu uint32 - Metric uint32 - Pad uint32 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Noproto uint64 - Capabilities uint32 - Pad_cgo_0 [4]byte - Lastchange Timeval - Mclpool [7]Mclpool - Pad_cgo_1 [4]byte -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Metric int32 -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - What uint16 - Name [16]int8 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Priority uint8 - Mpls uint8 - Addrs int32 - Flags int32 - Fmask int32 - Pid int32 - Seq int32 - Errno int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Pksent uint64 - Expire int64 - Locks uint32 - Mtu uint32 - Refcnt uint32 - Hopcount uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pad uint32 -} - -type Mclpool struct { - Grown int32 - Alive uint16 - Hwm uint16 - Cwm uint16 - Lwm uint16 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec uint32 - Usec uint32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} diff --git a/c/syscall/ztypes_openbsd_arm.go b/c/syscall/ztypes_openbsd_arm.go deleted file mode 100644 index acadf4b4..00000000 --- a/c/syscall/ztypes_openbsd_arm.go +++ /dev/null @@ -1,450 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -fsigned-char types_openbsd.go - -package syscall - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 - Pad_cgo_0 [4]byte -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint32 - Pad_cgo_0 [4]byte - X__st_birthtim Timespec -} - -type Statfs_t struct { - F_flags uint32 - F_bsize uint32 - F_iosize uint32 - Pad_cgo_0 [4]byte - F_blocks uint64 - F_bfree uint64 - F_bavail int64 - F_files uint64 - F_ffree uint64 - F_favail int64 - F_syncwrites uint64 - F_syncreads uint64 - F_asyncwrites uint64 - F_asyncreads uint64 - F_fsid Fsid - F_namemax uint32 - F_owner uint32 - F_ctime uint64 - F_fstypename [16]int8 - F_mntonname [90]int8 - F_mntfromname [90]int8 - F_mntfromspec [90]int8 - Pad_cgo_1 [2]byte - Mount_info [160]byte -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [24]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint32 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x20 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint32 - Filter int16 - Flags uint16 - Fflags uint32 - Pad_cgo_0 [4]byte - Data int64 - Udata *byte - Pad_cgo_1 [4]byte -} - -type FdSet struct { - Bits [32]uint32 -} - -const ( - SizeofIfMsghdr = 0xa8 - SizeofIfData = 0x90 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x60 - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Xflags int32 - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Mtu uint32 - Metric uint32 - Rdomain uint32 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Oqdrops uint64 - Noproto uint64 - Capabilities uint32 - Pad_cgo_0 [4]byte - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Metric int32 -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - What uint16 - Name [16]int8 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Priority uint8 - Mpls uint8 - Addrs int32 - Flags int32 - Fmask int32 - Pid int32 - Seq int32 - Errno int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Pksent uint64 - Expire int64 - Locks uint32 - Mtu uint32 - Refcnt uint32 - Hopcount uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pad uint32 -} - -type Mclpool struct{} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x8 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec uint32 - Usec uint32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} diff --git a/c/syscall/ztypes_openbsd_arm64.go b/c/syscall/ztypes_openbsd_arm64.go deleted file mode 100644 index 778bee14..00000000 --- a/c/syscall/ztypes_openbsd_arm64.go +++ /dev/null @@ -1,443 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -fsigned-char types_openbsd.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint32 - X__st_birthtim Timespec -} - -type Statfs_t struct { - F_flags uint32 - F_bsize uint32 - F_iosize uint32 - F_blocks uint64 - F_bfree uint64 - F_bavail int64 - F_files uint64 - F_ffree uint64 - F_favail int64 - F_syncwrites uint64 - F_syncreads uint64 - F_asyncwrites uint64 - F_asyncreads uint64 - F_fsid Fsid - F_namemax uint32 - F_owner uint32 - F_ctime uint64 - F_fstypename [16]int8 - F_mntonname [90]int8 - F_mntfromname [90]int8 - F_mntfromspec [90]int8 - Pad_cgo_0 [2]byte - Mount_info [160]byte -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [24]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x20 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [32]uint32 -} - -const ( - SizeofIfMsghdr = 0xa8 - SizeofIfData = 0x90 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x60 - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Xflags int32 - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Mtu uint32 - Metric uint32 - Rdomain uint32 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Oqdrops uint64 - Noproto uint64 - Capabilities uint32 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Metric int32 -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - What uint16 - Name [16]int8 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Priority uint8 - Mpls uint8 - Addrs int32 - Flags int32 - Fmask int32 - Pid int32 - Seq int32 - Errno int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Pksent uint64 - Expire int64 - Locks uint32 - Mtu uint32 - Refcnt uint32 - Hopcount uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pad uint32 -} - -type Mclpool struct{} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec uint32 - Usec uint32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} diff --git a/c/syscall/ztypes_openbsd_mips64.go b/c/syscall/ztypes_openbsd_mips64.go deleted file mode 100644 index 778bee14..00000000 --- a/c/syscall/ztypes_openbsd_mips64.go +++ /dev/null @@ -1,443 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs -- -fsigned-char types_openbsd.go - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize int32 - Flags uint32 - Gen uint32 - X__st_birthtim Timespec -} - -type Statfs_t struct { - F_flags uint32 - F_bsize uint32 - F_iosize uint32 - F_blocks uint64 - F_bfree uint64 - F_bavail int64 - F_files uint64 - F_ffree uint64 - F_favail int64 - F_syncwrites uint64 - F_syncreads uint64 - F_asyncwrites uint64 - F_asyncreads uint64 - F_fsid Fsid - F_namemax uint32 - F_owner uint32 - F_ctime uint64 - F_fstypename [16]int8 - F_mntonname [90]int8 - F_mntfromname [90]int8 - F_mntfromspec [90]int8 - Pad_cgo_0 [2]byte - Mount_info [160]byte -} - -type Flock_t struct { - Start int64 - Len int64 - Pid int32 - Type int16 - Whence int16 -} - -type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 -} - -type Fsid struct { - Val [2]int32 -} - -const ( - pathMax = 0x400 -) - -type RawSockaddrInet4 struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Len uint8 - Family uint8 - Path [104]int8 -} - -type RawSockaddrDatalink struct { - Len uint8 - Family uint8 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [24]int8 -} - -type RawSockaddr struct { - Len uint8 - Family uint8 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [92]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *byte - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Iov *Iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x6c - SizeofSockaddrUnix = 0x6a - SizeofSockaddrDatalink = 0x20 - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 -) - -const ( - PTRACE_TRACEME = 0x0 - PTRACE_CONT = 0x7 - PTRACE_KILL = 0x8 -) - -type Kevent_t struct { - Ident uint64 - Filter int16 - Flags uint16 - Fflags uint32 - Data int64 - Udata *byte -} - -type FdSet struct { - Bits [32]uint32 -} - -const ( - SizeofIfMsghdr = 0xa8 - SizeofIfData = 0x90 - SizeofIfaMsghdr = 0x18 - SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x60 - SizeofRtMetrics = 0x38 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Xflags int32 - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Mtu uint32 - Metric uint32 - Rdomain uint32 - Baudrate uint64 - Ipackets uint64 - Ierrors uint64 - Opackets uint64 - Oerrors uint64 - Collisions uint64 - Ibytes uint64 - Obytes uint64 - Imcasts uint64 - Omcasts uint64 - Iqdrops uint64 - Oqdrops uint64 - Noproto uint64 - Capabilities uint32 - Lastchange Timeval -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Pad1 uint8 - Pad2 uint8 - Addrs int32 - Flags int32 - Metric int32 -} - -type IfAnnounceMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - What uint16 - Name [16]int8 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Hdrlen uint16 - Index uint16 - Tableid uint16 - Priority uint8 - Mpls uint8 - Addrs int32 - Flags int32 - Fmask int32 - Pid int32 - Seq int32 - Errno int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Pksent uint64 - Expire int64 - Locks uint32 - Mtu uint32 - Refcnt uint32 - Hopcount uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pad uint32 -} - -type Mclpool struct{} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x8 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint32 - Drop uint32 -} - -type BpfProgram struct { - Len uint32 - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -type BpfTimeval struct { - Sec uint32 - Usec uint32 -} - -const ( - _AT_FDCWD = -0x64 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [20]uint8 - Ispeed int32 - Ospeed int32 -} diff --git a/c/syscall/ztypes_solaris_amd64.go b/c/syscall/ztypes_solaris_amd64.go deleted file mode 100644 index d486cd00..00000000 --- a/c/syscall/ztypes_solaris_amd64.go +++ /dev/null @@ -1,376 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_solaris.go - -//go:build amd64 && solaris - -package syscall - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 - PathMax = 0x400 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Timeval32 struct { - Sec int32 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Pid_t int32 - -type _Gid_t uint32 - -const ( - S_IFMT = 0xf000 - S_IFIFO = 0x1000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFBLK = 0x6000 - S_IFREG = 0x8000 - S_IFLNK = 0xa000 - S_IFSOCK = 0xc000 - S_ISUID = 0x800 - S_ISGID = 0x400 - S_ISVTX = 0x200 - S_IRUSR = 0x100 - S_IWUSR = 0x80 - S_IXUSR = 0x40 - S_IRWXG = 0x38 - S_IRWXO = 0x7 -) - -type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - Size int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - Blksize int32 - Pad_cgo_0 [4]byte - Blocks int64 - Fstype [16]int8 -} - -type Flock_t struct { - Type int16 - Whence int16 - Pad_cgo_0 [4]byte - Start int64 - Len int64 - Sysid int32 - Pid int32 - Pad [4]int64 -} - -type Dirent struct { - Ino uint64 - Off int64 - Reclen uint16 - Name [1]int8 - Pad_cgo_0 [5]byte -} - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 - X__sin6_src_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrDatalink struct { - Family uint16 - Index uint16 - Type uint8 - Nlen uint8 - Alen uint8 - Slen uint8 - Data [244]int8 -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -type RawSockaddrAny struct { - Addr RawSockaddr - Pad [236]int8 -} - -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - -type Iovec struct { - Base *int8 - Len uint64 -} - -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type Msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *Iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Accrights *int8 - Accrightslen int32 - Pad_cgo_2 [4]byte -} - -type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - X__icmp6_filt [8]uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x20 - SizeofSockaddrAny = 0xfc - SizeofSockaddrUnix = 0x6e - SizeofSockaddrDatalink = 0xfc - SizeofLinger = 0x8 - SizeofIPMreq = 0x8 - SizeofIPv6Mreq = 0x14 - SizeofMsghdr = 0x30 - SizeofCmsghdr = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x24 - SizeofICMPv6Filter = 0x20 -) - -type FdSet struct { - Bits [1024]int64 -} - -const ( - SizeofIfMsghdr = 0x54 - SizeofIfData = 0x44 - SizeofIfaMsghdr = 0x14 - SizeofRtMsghdr = 0x4c - SizeofRtMetrics = 0x28 -) - -type IfMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Data IfData -} - -type IfData struct { - Type uint8 - Addrlen uint8 - Hdrlen uint8 - Pad_cgo_0 [1]byte - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Lastchange Timeval32 -} - -type IfaMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Addrs int32 - Flags int32 - Index uint16 - Pad_cgo_0 [2]byte - Metric int32 -} - -type RtMsghdr struct { - Msglen uint16 - Version uint8 - Type uint8 - Index uint16 - Pad_cgo_0 [2]byte - Flags int32 - Addrs int32 - Pid int32 - Seq int32 - Errno int32 - Use int32 - Inits uint32 - Rmx RtMetrics -} - -type RtMetrics struct { - Locks uint32 - Mtu uint32 - Hopcount uint32 - Expire uint32 - Recvpipe uint32 - Sendpipe uint32 - Ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Pksent uint32 -} - -const ( - SizeofBpfVersion = 0x4 - SizeofBpfStat = 0x80 - SizeofBpfProgram = 0x10 - SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 -) - -type BpfVersion struct { - Major uint16 - Minor uint16 -} - -type BpfStat struct { - Recv uint64 - Drop uint64 - Capt uint64 - Padding [13]uint64 -} - -type BpfProgram struct { - Len uint32 - Pad_cgo_0 [4]byte - Insns *BpfInsn -} - -type BpfInsn struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type BpfTimeval struct { - Sec int32 - Usec int32 -} - -type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte -} - -const ( - _AT_FDCWD = 0xffd19553 -) - -type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Cc [19]uint8 - Pad_cgo_0 [1]byte -} diff --git a/c/time/llcppg.pub b/c/time/llcppg.pub deleted file mode 100644 index e6470466..00000000 --- a/c/time/llcppg.pub +++ /dev/null @@ -1,5 +0,0 @@ -time_t TimeT -tm Tm -clock_t ClockT -clockid_t ClockidT -timespec Timespec diff --git a/c/time/time.go b/c/time/time.go deleted file mode 100644 index 99c6471b..00000000 --- a/c/time/time.go +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package time - -// #include -import "C" - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "decl" -) - -// ----------------------------------------------------------------------------- - -type TimeT C.time_t - -//go:linkname Time C.time -func Time(timer *TimeT) TimeT - -//go:linkname Mktime C.mktime -func Mktime(timer *Tm) TimeT - -//go:linkname Ctime C.ctime -func Ctime(timer *TimeT) string - -//go:linkname Difftime C.difftime -func Difftime(end, start TimeT) float64 - -// ----------------------------------------------------------------------------- - -type Tm struct { - Sec c.Int - Min c.Int - Hour c.Int - Mday c.Int - Mon c.Int - Year c.Int - Wday c.Int - Yday c.Int - Isdst c.Int - Gmtoff c.Long - Zone *c.Char -} - -//go:linkname Gmtime C.gmtime -func Gmtime(timer *TimeT) *Tm - -//go:linkname Localtime C.localtime -func Localtime(timer *TimeT) *Tm - -//go:linkname Strftime C.strftime -func Strftime(buf *c.Char, bufSize uintptr, format *c.Char, timeptr *Tm) uintptr - -// ----------------------------------------------------------------------------- - -type ClockT C.clock_t - -//go:linkname Clock C.clock -func Clock() ClockT - -// ----------------------------------------------------------------------------- - -type ClockidT C.clockid_t - -const ( - // the system's real time (i.e. wall time) clock, expressed as the amount of time since the Epoch. - // This is the same as the value returned by gettimeofday - CLOCK_REALTIME = ClockidT(C.CLOCK_REALTIME) - - // clock that increments monotonically, tracking the time since an arbitrary point, and will continue - // to increment while the system is asleep. - CLOCK_MONOTONIC = ClockidT(C.CLOCK_MONOTONIC) - - // clock that increments monotonically, tracking the time since an arbitrary point like CLOCK_MONOTONIC. - // However, this clock is unaffected by frequency or time adjustments. It should not be compared to - // other system time sources. - CLOCK_MONOTONIC_RAW = ClockidT(C.CLOCK_MONOTONIC_RAW) - - // like CLOCK_MONOTONIC_RAW, but reads a value cached by the system at context switch. This can be - // read faster, but at a loss of accuracy as it may return values that are milliseconds old. - // CLOCK_MONOTONIC_RAW_APPROX = ClockidT(C.CLOCK_MONOTONIC_RAW_APPROX) - - // clock that increments monotonically, in the same manner as CLOCK_MONOTONIC_RAW, but that does - // not increment while the system is asleep. The returned value is identical to the result of - // mach_absolute_time() after the appropriate mach_timebase conversion is applied. - // CLOCK_UPTIME_RAW = ClockidT(C.CLOCK_UPTIME_RAW) - - // like CLOCK_UPTIME_RAW, but reads a value cached by the system at context switch. This can be read - // faster, but at a loss of accuracy as it may return values that are milliseconds old. - // CLOCK_UPTIME_RAW_APPROX = ClockidT(C.CLOCK_UPTIME_RAW_APPROX) - - // clock that tracks the amount of CPU (in user- or kernel-mode) used by the calling process. - CLOCK_PROCESS_CPUTIME_ID = ClockidT(C.CLOCK_PROCESS_CPUTIME_ID) - - // clock that tracks the amount of CPU (in user- or kernel-mode) used by the calling thread. - CLOCK_THREAD_CPUTIME_ID = ClockidT(C.CLOCK_THREAD_CPUTIME_ID) -) - -type Timespec struct { - Sec TimeT // seconds - Nsec c.Long // and nanoseconds -} - -//go:linkname ClockGettime C.clock_gettime -func ClockGettime(clkId ClockidT, tp *Timespec) c.Int - -//go:linkname ClockSettime C.clock_settime -func ClockSettime(clkId ClockidT, tp *Timespec) c.Int - -//go:linkname ClockGetres C.clock_getres -func ClockGetres(clkId ClockidT, res *Timespec) c.Int - -// ----------------------------------------------------------------------------- diff --git a/c/zlib/README.md b/c/zlib/README.md deleted file mode 100644 index 7b6d32c4..00000000 --- a/c/zlib/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# LLGo wrapper of madler/zlib - -## How to install - -### on macOS (Homebrew) - -```sh -brew install zlib -``` - -### on Linux (Debian/Ubuntu) - -```sh -TODO -``` - -## Demos - -The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it): - -- [normal](_demo/normal/compress.go): a basic zlib demo - -### How to run demos - -To run the demos in directory `_demo`: - -```sh -cd # eg. cd _demo/normal -llgo run . -``` diff --git a/c/zlib/_demo/crc32demo/crc.go b/c/zlib/_demo/crc32demo/crc.go deleted file mode 100644 index 0d0c6843..00000000 --- a/c/zlib/_demo/crc32demo/crc.go +++ /dev/null @@ -1,11 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/goplus/llgo/c/zlib" -) - -func main() { - fmt.Printf("%08x\n", zlib.Crc32ZString(0, "Hello world")) -} diff --git a/c/zlib/_demo/efficiency/compress.go b/c/zlib/_demo/efficiency/compress.go deleted file mode 100644 index 6a912084..00000000 --- a/c/zlib/_demo/efficiency/compress.go +++ /dev/null @@ -1,35 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/zlib" -) - -func main() { - txt := []byte("zlib is a software library used for data compression. It was created by Jean-loup Gailly and Mark Adler and first released in 1995. zlib is designed to be a free, legally unencumbered—that is, not covered by any patents—alternative to the proprietary DEFLATE compression algorithm, which is often used in software applications for data compression.The library provides functions to compress and decompress data using the DEFLATE algorithm, which is a combination of the LZ77 algorithm and Huffman coding. zlib is notable for its versatility; it can be used in a wide range of applications, from web servers and web clients compressing HTTP data, to the compression of data for storage or transmission in various file formats, such as PNG, ZIP, and GZIP.") - txtLen := c.Ulong(len(txt)) - - for level := 0; level <= 9; level++ { - cmpSize := zlib.CompressBound(txtLen) - cmpData := make([]byte, int(cmpSize)) - - res := zlib.Compress2(unsafe.SliceData(cmpData), &cmpSize, unsafe.SliceData(txt), txtLen, c.Int(level)) - if res != zlib.OK { - c.Printf(c.Str("\nCompression failed at level %d: %d\n"), level, res) - continue - } - - c.Printf(c.Str("Compression level %d: Text length = %d, Compressed size = %d\n"), level, txtLen, cmpSize) - - ucmpSize := txtLen - ucmpData := make([]byte, int(ucmpSize)) - - unRes := zlib.Uncompress(unsafe.SliceData(ucmpData), &ucmpSize, unsafe.SliceData(cmpData), cmpSize) - if unRes != zlib.OK { - c.Printf(c.Str("\nDecompression failed at level %d: %d\n"), level, unRes) - continue - } - } -} diff --git a/c/zlib/_demo/normal/compress.go b/c/zlib/_demo/normal/compress.go deleted file mode 100644 index baf12fc4..00000000 --- a/c/zlib/_demo/normal/compress.go +++ /dev/null @@ -1,46 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/zlib" -) - -func main() { - txt := []byte("zlib is a software library used for data compression. It was created by Jean-loup Gailly and Mark Adler and first released in 1995. zlib is designed to be a free, legally unencumbered—that is, not covered by any patents—alternative to the proprietary DEFLATE compression algorithm, which is often used in software applications for data compression.The library provides functions to compress and decompress data using the DEFLATE algorithm, which is a combination of the LZ77 algorithm and Huffman coding. zlib is notable for its versatility; it can be used in a wide range of applications, from web servers and web clients compressing HTTP data, to the compression of data for storage or transmission in various file formats, such as PNG, ZIP, and GZIP.") - txtLen := c.Ulong(len(txt)) - - cmpSize := zlib.CompressBound(txtLen) - cmpData := make([]byte, int(cmpSize)) - - res := zlib.Compress(unsafe.SliceData(cmpData), &cmpSize, unsafe.SliceData(txt), txtLen) - if res != zlib.OK { - c.Printf(c.Str("\nCompression failed: %d\n"), res) - return - } - - c.Printf(c.Str("Text length = %d, Compressed size = %d\n"), txtLen, cmpSize) - - ucmpSize := txtLen - ucmpData := make([]byte, int(ucmpSize)) - - unRes := zlib.Uncompress(unsafe.SliceData(ucmpData), &ucmpSize, unsafe.SliceData(cmpData), cmpSize) - c.Printf(c.Str("Decompression result = %d, Decompressed size %d\n"), unRes, ucmpSize) - - if unRes != zlib.OK { - c.Printf(c.Str("\nDecompression failed: %d\n"), unRes) - return - } - - c.Printf(c.Str("Decompressed data: \n")) - for i := 0; i < int(ucmpSize); i++ { - c.Printf(c.Str("%c"), ucmpData[i]) - } -} - -/* Expected output: -origin textLen = 73 compressed_size = 36 -uncompress result = 0 uncompress result size 73 -after uncompressed data: Hello, zlib compression!Hello, zlib compression!Hello, zlib compression! -*/ diff --git a/c/zlib/zlib.go b/c/zlib/zlib.go deleted file mode 100644 index 0aa1aaad..00000000 --- a/c/zlib/zlib.go +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package zlib - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoPackage = "link: $(pkg-config --libs zlib); -lz" -) - -/* errno */ -const ( - OK = 0 - STREAM_END = 1 - NEED_DICT = 2 - ERRNO = -1 - STREAM_ERROR = -2 - DATA_ERROR = -3 - MEM_ERROR = -4 - BUF_ERROR = -5 - VERSION_ERROR = -6 -) - -/* compression levels */ -const ( - NO_COMPRESSION = 0 - BEST_SPEED = 1 - BEST_COMPRESSION = 9 - DEFAULT_COMPRESSION = -1 -) - -const ( - NO_FLUSH = 0 - PARTIAL_FLUSH = 1 - SYNC_FLUSH = 2 - FULL_FLUSH = 3 - FINISH = 4 - BLOCK = 5 - TREES = 6 -) - -const ( - FILTERED = 1 - HUFFMAN_ONLY = 2 - RLE = 3 - FIXED = 4 - DEFAULT_STRATEGY = 0 -) - -const ( - BINARY = 0 - TEXT = 1 - ASCII = TEXT - UNKNOWN = 2 -) - -const ( - DEFLATED = 8 -) - -// ----------------------------------------------------------------------------- - -/* -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); - -compressBound() returns an upper bound on the compressed size after -compress() or compress2() on sourceLen bytes. It would be used before a -compress() or compress2() call to allocate the destination buffer. -*/ -//go:linkname CompressBound C.compressBound -func CompressBound(sourceLen c.Ulong) c.Ulong - -/* -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); - -Compresses the source buffer into the destination buffer. sourceLen is -the byte length of the source buffer. Upon entry, destLen is the total size -of the destination buffer, which must be at least the value returned by -compressBound(sourceLen). Upon exit, destLen is the actual size of the -compressed data. compress() is equivalent to compress2() with a level -parameter of Z_DEFAULT_COMPRESSION. - -compress returns Z_OK if success, Z_MEM_ERROR if there was not -enough memory, Z_BUF_ERROR if there was not enough room in the output -buffer. -*/ -//go:linkname Compress C.compress -func Compress(dest *byte, destLen *c.Ulong, source *byte, sourceLen c.Ulong) c.Int - -/* -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, int level)); - -Compresses the source buffer into the destination buffer. The level -parameter has the same meaning as in deflateInit. sourceLen is the byte -length of the source buffer. Upon entry, destLen is the total size of the -destination buffer, which must be at least the value returned by -compressBound(sourceLen). Upon exit, destLen is the actual size of the -compressed data. - -compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough -memory, Z_BUF_ERROR if there was not enough room in the output buffer, -Z_STREAM_ERROR if the level parameter is invalid. -*/ -//go:linkname Compress2 C.compress2 -func Compress2(dest *byte, destLen *c.Ulong, source *byte, sourceLen c.Ulong, level c.Int) c.Int - -/* -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); - -Decompresses the source buffer into the destination buffer. sourceLen is -the byte length of the source buffer. Upon entry, destLen is the total size -of the destination buffer, which must be large enough to hold the entire -uncompressed data. (The size of the uncompressed data must have been saved -previously by the compressor and transmitted to the decompressor by some -mechanism outside the scope of this compression library.) Upon exit, destLen -is the actual size of the uncompressed data. - -uncompress returns Z_OK if success, Z_MEM_ERROR if there was not -enough memory, Z_BUF_ERROR if there was not enough room in the output -buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In -the case where there is not enough room, uncompress() will fill the output -buffer with the uncompressed data up to that point. -*/ -//go:linkname Uncompress C.uncompress -func Uncompress(dest *byte, destLen *c.Ulong, source *byte, sourceLen c.Ulong) c.Int - -/* -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); - -Same as uncompress, except that sourceLen is a pointer, where the -length of the source is *sourceLen. On return, *sourceLen is the number of -source bytes consumed. -*/ -//go:linkname Uncompress2 C.uncompress2 -func Uncompress2(dest *byte, destLen *c.Ulong, source *byte, sourceLen *c.Ulong) c.Int - -// ----------------------------------------------------------------------------- - -/* -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); - -Update a running CRC-32 with the bytes buf[0..len-1] and return the -updated CRC-32. If buf is Z_NULL, this function returns the required -initial value for the crc. Pre- and post-conditioning (one's complement) is -performed within this function so it shouldn't be done by the application. - -Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ -//go:linkname Crc32 C.crc32 -func Crc32(crc c.Ulong, buf *byte, len c.Uint) c.Ulong - -/* -ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, z_size_t len)); - -Same as crc32(), but with a size_t length. -*/ -//go:linkname Crc32Z C.crc32_z -func Crc32Z(crc c.Ulong, buf *byte, len uintptr) c.Ulong - -func Crc32ZBytes(crc c.Ulong, buf []byte) c.Ulong { - return Crc32Z(crc, unsafe.SliceData(buf), uintptr(len(buf))) -} - -func Crc32ZString(crc c.Ulong, buf string) c.Ulong { - return Crc32Z(crc, unsafe.StringData(buf), uintptr(len(buf))) -} - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - -Combine two CRC-32 check values into one. For two sequences of bytes, -seq1 and seq2 with lengths len1 and len2, CRC-32 check values were -calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 -check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and -len2. -*/ -//go:linkname Crc32Combine C.crc32_combine -func Crc32Combine(crc1 c.Ulong, crc2 c.Ulong, len2 int64) c.Ulong - -/* -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); - -Update a running Adler-32 checksum with the bytes buf[0..len-1] and -return the updated checksum. If buf is Z_NULL, this function returns the -required initial value for the checksum. - -An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed -much faster. - -Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ -//go:linkname Adler32 C.adler32 -func Adler32(adler c.Ulong, buf *byte, len c.Uint) c.Ulong - -/* -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, z_size_t len)); - -Same as adler32(), but with a size_t length. -*/ -//go:linkname Adler32Z C.adler32_z -func Adler32Z(adler c.Ulong, buf *byte, len uintptr) c.Ulong - -func Adler32ZBytes(adler c.Ulong, buf []byte) c.Ulong { - return Adler32Z(adler, unsafe.SliceData(buf), uintptr(len(buf))) -} - -func Adler32ZString(adler c.Ulong, buf string) c.Ulong { - return Adler32Z(adler, unsafe.StringData(buf), uintptr(len(buf))) -} - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, z_off_t len2)); - -Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 -and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for -each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of -seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note -that the z_off_t type (like off_t) is a signed integer. If len2 is -negative, the result has no meaning or utility. -*/ -//go:linkname Adler32Combine C.adler32_combine -func Adler32Combine(adler1 c.Ulong, adler2 c.Ulong, len2 int64) c.Ulong - -// ----------------------------------------------------------------------------- diff --git a/compiler/chore/_deprecated/ar/ar.go b/chore/_deprecated/ar/ar.go similarity index 100% rename from compiler/chore/_deprecated/ar/ar.go rename to chore/_deprecated/ar/ar.go diff --git a/compiler/chore/_deprecated/clang/parser/pages.go b/chore/_deprecated/clang/parser/pages.go similarity index 100% rename from compiler/chore/_deprecated/clang/parser/pages.go rename to chore/_deprecated/clang/parser/pages.go diff --git a/compiler/chore/_deprecated/clang/parser/parse.go b/chore/_deprecated/clang/parser/parse.go similarity index 100% rename from compiler/chore/_deprecated/clang/parser/parse.go rename to chore/_deprecated/clang/parser/parse.go diff --git a/compiler/chore/_deprecated/clangast/clangast.go b/chore/_deprecated/clangast/clangast.go similarity index 100% rename from compiler/chore/_deprecated/clangast/clangast.go rename to chore/_deprecated/clangast/clangast.go diff --git a/compiler/chore/_deprecated/go.mod b/chore/_deprecated/go.mod similarity index 100% rename from compiler/chore/_deprecated/go.mod rename to chore/_deprecated/go.mod diff --git a/compiler/chore/_deprecated/go.sum b/chore/_deprecated/go.sum similarity index 100% rename from compiler/chore/_deprecated/go.sum rename to chore/_deprecated/go.sum diff --git a/compiler/chore/ardump/ardump.go b/chore/ardump/ardump.go similarity index 100% rename from compiler/chore/ardump/ardump.go rename to chore/ardump/ardump.go diff --git a/compiler/chore/clangpp/clangpp.go b/chore/clangpp/clangpp.go similarity index 100% rename from compiler/chore/clangpp/clangpp.go rename to chore/clangpp/clangpp.go diff --git a/compiler/chore/dylibdeps/dylibdeps.go b/chore/dylibdeps/dylibdeps.go similarity index 100% rename from compiler/chore/dylibdeps/dylibdeps.go rename to chore/dylibdeps/dylibdeps.go diff --git a/compiler/chore/gentests/gentests.go b/chore/gentests/gentests.go similarity index 96% rename from compiler/chore/gentests/gentests.go rename to chore/gentests/gentests.go index 617209e9..6cd06ba5 100644 --- a/compiler/chore/gentests/gentests.go +++ b/chore/gentests/gentests.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/goplus/llgo/compiler/internal/llgen" + "github.com/goplus/llgo/internal/llgen" "github.com/goplus/mod" ) diff --git a/compiler/chore/llgen/llgen.go b/chore/llgen/llgen.go similarity index 94% rename from compiler/chore/llgen/llgen.go rename to chore/llgen/llgen.go index d7090a1b..50e9a89e 100644 --- a/compiler/chore/llgen/llgen.go +++ b/chore/llgen/llgen.go @@ -21,7 +21,7 @@ import ( "fmt" "os" - "github.com/goplus/llgo/compiler/internal/llgen" + "github.com/goplus/llgo/internal/llgen" ) func main() { diff --git a/compiler/chore/llgen/llgen_test.go b/chore/llgen/llgen_test.go similarity index 100% rename from compiler/chore/llgen/llgen_test.go rename to chore/llgen/llgen_test.go diff --git a/compiler/chore/llpyg/llpyg.go b/chore/llpyg/llpyg.go similarity index 96% rename from compiler/chore/llpyg/llpyg.go rename to chore/llpyg/llpyg.go index bdeaa0b6..68fec845 100644 --- a/compiler/chore/llpyg/llpyg.go +++ b/chore/llpyg/llpyg.go @@ -29,8 +29,8 @@ import ( "strings" "github.com/goplus/gogen" - "github.com/goplus/llgo/compiler/chore/llpyg/pysig" - "github.com/goplus/llgo/compiler/ssa" + "github.com/goplus/llgo/chore/llpyg/pysig" + "github.com/goplus/llgo/ssa" ) type symbol struct { @@ -82,8 +82,8 @@ func main() { os.Exit(1) } pkg := gogen.NewPackage("", pkgName(pyLib), nil) - pkg.Import("unsafe").MarkForceUsed(pkg) // import _ "unsafe" - py := pkg.Import("github.com/goplus/llgo/py") // import "github.com/goplus/llgo/py" + pkg.Import("unsafe").MarkForceUsed(pkg) // import _ "unsafe" + py := pkg.Import("github.com/goplus/lib/py") // import "github.com/goplus/lib/py" f := func(cb *gogen.CodeBuilder) int { cb.Val("py." + mod.Name) diff --git a/compiler/chore/llpyg/pysig/parse.go b/chore/llpyg/pysig/parse.go similarity index 100% rename from compiler/chore/llpyg/pysig/parse.go rename to chore/llpyg/pysig/parse.go diff --git a/compiler/chore/llpyg/pysig/parse_test.go b/chore/llpyg/pysig/parse_test.go similarity index 100% rename from compiler/chore/llpyg/pysig/parse_test.go rename to chore/llpyg/pysig/parse_test.go diff --git a/compiler/chore/llvmtargets/llvm_targets.go b/chore/llvmtargets/llvm_targets.go similarity index 100% rename from compiler/chore/llvmtargets/llvm_targets.go rename to chore/llvmtargets/llvm_targets.go diff --git a/compiler/chore/nmdump/nmdump.go b/chore/nmdump/nmdump.go similarity index 100% rename from compiler/chore/nmdump/nmdump.go rename to chore/nmdump/nmdump.go diff --git a/compiler/chore/nmindex/nmindex.go b/chore/nmindex/nmindex.go similarity index 100% rename from compiler/chore/nmindex/nmindex.go rename to chore/nmindex/nmindex.go diff --git a/compiler/chore/ssadump/ssadump.go b/chore/ssadump/ssadump.go similarity index 100% rename from compiler/chore/ssadump/ssadump.go rename to chore/ssadump/ssadump.go diff --git a/compiler/cl/_testdata/apkg/in.go b/cl/_testdata/apkg/in.go similarity index 100% rename from compiler/cl/_testdata/apkg/in.go rename to cl/_testdata/apkg/in.go diff --git a/cl/_testdata/apkg/out.ll b/cl/_testdata/apkg/out.ll new file mode 100644 index 00000000..adaa6e28 --- /dev/null +++ b/cl/_testdata/apkg/out.ll @@ -0,0 +1,29 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/apkg' +source_filename = "github.com/goplus/llgo/cl/_testdata/apkg" + +@"github.com/goplus/llgo/cl/_testdata/apkg.init$guard" = global i1 false, align 1 + +define double @"github.com/goplus/llgo/cl/_testdata/apkg.Max"(double %0, double %1) { +_llgo_0: + %2 = fcmp ogt double %0, %1 + br i1 %2, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + ret double %0 + +_llgo_2: ; preds = %_llgo_0 + ret double %1 +} + +define void @"github.com/goplus/llgo/cl/_testdata/apkg.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/apkg.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/apkg.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} diff --git a/compiler/cl/_testdata/debug/flags.txt b/cl/_testdata/debug/flags.txt similarity index 100% rename from compiler/cl/_testdata/debug/flags.txt rename to cl/_testdata/debug/flags.txt diff --git a/compiler/cl/_testdata/debug/in.go b/cl/_testdata/debug/in.go similarity index 93% rename from compiler/cl/_testdata/debug/in.go rename to cl/_testdata/debug/in.go index dc3e07dd..5840a92e 100644 --- a/compiler/cl/_testdata/debug/in.go +++ b/cl/_testdata/debug/in.go @@ -73,9 +73,9 @@ func FuncWithAllTypeStructParam(s StructWithAllTypeFields) { // s.c128: complex128{real = 15, imag = 16} // s.slice: []int{21, 22, 23} // s.arr: [3]int{24, 25, 26} - // s.arr2: [3]github.com/goplus/llgo/compiler/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}} + // s.arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}} // s.s: "hello" - // s.e: github.com/goplus/llgo/compiler/cl/_testdata/debug.E{i = 30} + // s.e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 30} // s.pad1: 100 // s.pad2: 200 s.i8 = '\b' @@ -128,7 +128,7 @@ func FuncWithAllTypeParams( // f64: 12 // slice: []int{21, 22, 23} // arr: [3]int{24, 25, 26} - // arr2: [3]github.com/goplus/llgo/compiler/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}} + // arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}} // slice[0]: 21 // slice[1]: 22 // slice[2]: 23 @@ -138,7 +138,7 @@ func FuncWithAllTypeParams( // arr2[0].i: 27 // arr2[1].i: 28 // arr2[2].i: 29 - // e: github.com/goplus/llgo/compiler/cl/_testdata/debug.E{i = 30} + // e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 30} // Expected(skip): // i8: '\b' @@ -207,9 +207,9 @@ func FuncWithAllTypeParams( // c64: complex64{real = 21, imag = 22} // c128: complex128{real = 23, imag = 24} // slice: []int{31, 32, 33} - // arr2: [3]github.com/goplus/llgo/compiler/cl/_testdata/debug.E{{i = 37}, {i = 38}, {i = 39}} + // arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 37}, {i = 38}, {i = 39}} // s: "world" - // e: github.com/goplus/llgo/compiler/cl/_testdata/debug.E{i = 40} + // e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 40} // Expected(skip): // arr: [3]int{34, 35, 36} @@ -512,9 +512,9 @@ func main() { // s.c128: complex128{real = 15, imag = 16} // s.slice: []int{21, 22, 23} // s.arr: [3]int{24, 25, 26} - // s.arr2: [3]github.com/goplus/llgo/compiler/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}} + // s.arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}} // s.s: "hello" - // s.e: github.com/goplus/llgo/compiler/cl/_testdata/debug.E{i = 30} + // s.e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 30} // s.pf.i16: 100 // *(s.pf).i16: 100 // *(s.pi): 100 diff --git a/compiler/cl/_testdata/debug/out.ll b/cl/_testdata/debug/out.ll similarity index 100% rename from compiler/cl/_testdata/debug/out.ll rename to cl/_testdata/debug/out.ll diff --git a/compiler/cl/_testdata/fncall/in.go b/cl/_testdata/fncall/in.go similarity index 100% rename from compiler/cl/_testdata/fncall/in.go rename to cl/_testdata/fncall/in.go diff --git a/cl/_testdata/fncall/out.ll b/cl/_testdata/fncall/out.ll new file mode 100644 index 00000000..e06c96e4 --- /dev/null +++ b/cl/_testdata/fncall/out.ll @@ -0,0 +1,35 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/fncall' +source_filename = "github.com/goplus/llgo/cl/_testdata/fncall" + +@"github.com/goplus/llgo/cl/_testdata/fncall.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/fncall.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/fncall.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/fncall.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/fncall.main"() { +_llgo_0: + %0 = call i64 @"github.com/goplus/llgo/cl/_testdata/fncall.max"(i64 1, i64 2) + ret void +} + +define i64 @"github.com/goplus/llgo/cl/_testdata/fncall.max"(i64 %0, i64 %1) { +_llgo_0: + %2 = icmp sgt i64 %0, %1 + br i1 %2, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + ret i64 %0 + +_llgo_2: ; preds = %_llgo_0 + ret i64 %1 +} diff --git a/compiler/cl/_testdata/foo/foo.go b/cl/_testdata/foo/foo.go similarity index 100% rename from compiler/cl/_testdata/foo/foo.go rename to cl/_testdata/foo/foo.go diff --git a/compiler/cl/_testdata/foo/out.ll b/cl/_testdata/foo/out.ll similarity index 73% rename from compiler/cl/_testdata/foo/out.ll rename to cl/_testdata/foo/out.ll index 1d078de0..d6342b00 100644 --- a/compiler/cl/_testdata/foo/out.ll +++ b/cl/_testdata/foo/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/foo' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/foo" +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/foo' +source_filename = "github.com/goplus/llgo/cl/_testdata/foo" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" = type { ptr, float } +%"github.com/goplus/llgo/cl/_testdata/foo.Foo" = type { ptr, float } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testdata/foo.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testdata/foo.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [1 x i8] c"V", align 1 -@1 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo", align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 +@1 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testdata/foo", align 1 +@"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [1 x i8] c"v", align 1 @3 = private unnamed_addr constant [4 x i8] c"load", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Bar"() { +define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.Bar"() { _llgo_0: %0 = alloca { i64 }, align 8 call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) @@ -32,14 +32,14 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8 } -define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.F"() { +define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.F"() { _llgo_0: %0 = alloca { i64 }, align 8 call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) %1 = getelementptr inbounds { i64 }, ptr %0, i32 0, i32 0 store i64 1, ptr %1, align 4 %2 = load { i64 }, ptr %0, align 4 - %3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %3 = load ptr, ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %4 = extractvalue { i64 } %2, 0 %5 = inttoptr i64 %4 to ptr %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0 @@ -47,43 +47,43 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7 } -define ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %0) { +define ptr @"github.com/goplus/llgo/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/cl/_testdata/foo.Foo" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testdata/foo.Foo", align 8 call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testdata/foo.Foo" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/foo.Foo", ptr %1, i32 0, i32 0 %3 = load ptr, ptr %2, align 8 ret ptr %3 } -define ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Foo).Pb"(ptr %0) { +define ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Foo).Pb"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %0, align 8 - %2 = call ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %1) + %1 = load %"github.com/goplus/llgo/cl/_testdata/foo.Foo", ptr %0, align 8 + %2 = call ptr @"github.com/goplus/llgo/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/cl/_testdata/foo.Foo" %1) ret ptr %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load"(ptr %0) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame"(ptr %0) { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() { +define void @"github.com/goplus/llgo/cl/_testdata/foo.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/foo.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/foo.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/foo.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -93,7 +93,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 -define void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init$after"() { +define void @"github.com/goplus/llgo/cl/_testdata/foo.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -113,7 +113,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %5, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 1, 1 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 1, 2 - %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) store ptr %10, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %12 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %11, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) @@ -123,8 +123,8 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %13, 0 %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 1, 1 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 2 - %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17) - store ptr %18, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17) + store ptr %18, ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 ret void } diff --git a/compiler/cl/_testdata/importpkg/in.go b/cl/_testdata/importpkg/in.go similarity index 66% rename from compiler/cl/_testdata/importpkg/in.go rename to cl/_testdata/importpkg/in.go index 60d4ad62..561e4556 100644 --- a/compiler/cl/_testdata/importpkg/in.go +++ b/cl/_testdata/importpkg/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio" +import "github.com/goplus/llgo/cl/_testdata/importpkg/stdio" var hello = [...]int8{'H', 'e', 'l', 'l', 'o', '\n', 0} diff --git a/cl/_testdata/importpkg/out.ll b/cl/_testdata/importpkg/out.ll new file mode 100644 index 00000000..1567703d --- /dev/null +++ b/cl/_testdata/importpkg/out.ll @@ -0,0 +1,39 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/importpkg' +source_filename = "github.com/goplus/llgo/cl/_testdata/importpkg" + +@"github.com/goplus/llgo/cl/_testdata/importpkg.hello" = global [7 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testdata/importpkg.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/importpkg.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/importpkg/stdio.init"() + store i8 72, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", i64 4), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", i64 5), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello", i64 6), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/importpkg.main"() { +_llgo_0: + %0 = call i64 @"github.com/goplus/llgo/cl/_testdata/importpkg/stdio.Max"(i64 2, i64 100) + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testdata/importpkg.hello") + ret void +} + +declare void @"github.com/goplus/llgo/cl/_testdata/importpkg/stdio.init"() + +declare i64 @"github.com/goplus/llgo/cl/_testdata/importpkg/stdio.Max"(i64, i64) + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/importpkg/stdio/printf.go b/cl/_testdata/importpkg/stdio/printf.go similarity index 100% rename from compiler/cl/_testdata/importpkg/stdio/printf.go rename to cl/_testdata/importpkg/stdio/printf.go diff --git a/compiler/cl/_testdata/llgotag/in.go b/cl/_testdata/llgotag/in.go similarity index 100% rename from compiler/cl/_testdata/llgotag/in.go rename to cl/_testdata/llgotag/in.go diff --git a/cl/_testdata/llgotag/out.ll b/cl/_testdata/llgotag/out.ll new file mode 100644 index 00000000..568edce1 --- /dev/null +++ b/cl/_testdata/llgotag/out.ll @@ -0,0 +1,22 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/llgotag' +source_filename = "github.com/goplus/llgo/cl/_testdata/llgotag" + +@"github.com/goplus/llgo/cl/_testdata/llgotag.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/llgotag.Foo"() { +_llgo_0: + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/llgotag.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/llgotag.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/llgotag.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} diff --git a/compiler/cl/_testdata/method/in.go b/cl/_testdata/method/in.go similarity index 100% rename from compiler/cl/_testdata/method/in.go rename to cl/_testdata/method/in.go diff --git a/cl/_testdata/method/out.ll b/cl/_testdata/method/out.ll new file mode 100644 index 00000000..08487951 --- /dev/null +++ b/cl/_testdata/method/out.ll @@ -0,0 +1,50 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/method' +source_filename = "github.com/goplus/llgo/cl/_testdata/method" + +@"github.com/goplus/llgo/cl/_testdata/method.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testdata/method.init$guard" = global i1 false, align 1 + +define i64 @"github.com/goplus/llgo/cl/_testdata/method.T.Add"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +define i64 @"github.com/goplus/llgo/cl/_testdata/method.(*T).Add"(ptr %0, i64 %1) { +_llgo_0: + %2 = load i64, ptr %0, align 4 + %3 = call i64 @"github.com/goplus/llgo/cl/_testdata/method.T.Add"(i64 %2, i64 %1) + ret i64 %3 +} + +define void @"github.com/goplus/llgo/cl/_testdata/method.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/method.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/method.init$guard", align 1 + store i8 72, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 9), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/method.main"() { +_llgo_0: + %0 = call i64 @"github.com/goplus/llgo/cl/_testdata/method.T.Add"(i64 1, i64 2) + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testdata/method.format", i64 %0) + ret void +} + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/print/in.go b/cl/_testdata/print/in.go similarity index 99% rename from compiler/cl/_testdata/print/in.go rename to cl/_testdata/print/in.go index d86a9309..95c0a180 100644 --- a/compiler/cl/_testdata/print/in.go +++ b/cl/_testdata/print/in.go @@ -3,7 +3,7 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func gwrite(b []byte) { diff --git a/compiler/cl/_testdata/print/out.ll b/cl/_testdata/print/out.ll similarity index 83% rename from compiler/cl/_testdata/print/out.ll rename to cl/_testdata/print/out.ll index 910b3f5d..603f3661 100644 --- a/compiler/cl/_testdata/print/out.ll +++ b/cl/_testdata/print/out.ll @@ -1,14 +1,14 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/print' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/print" +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/print' +source_filename = "github.com/goplus/llgo/cl/_testdata/print" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testdata/print.stringStruct" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testdata/print.slice" = type { ptr, i64, i64 } +%"github.com/goplus/llgo/cl/_testdata/print.stringStruct" = type { ptr, i64 } +%"github.com/goplus/llgo/cl/_testdata/print.slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testdata/print.init$guard" = global i1 false, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/print.minhexdigits" = global i64 0, align 8 +@"github.com/goplus/llgo/cl/_testdata/print.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testdata/print.minhexdigits" = global i64 0, align 8 @0 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @1 = private unnamed_addr constant [4 x i8] c"llgo", align 1 @_llgo_float32 = linkonce global ptr null, align 8 @@ -42,29 +42,29 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/print" @13 = private unnamed_addr constant [1 x i8] c" ", align 1 @14 = private unnamed_addr constant [1 x i8] c"\0A", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testdata/print.bytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testdata/print.bytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %1, align 8 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %3 = call ptr @"github.com/goplus/llgo/compiler/cl/_testdata/print.stringStructOf"(ptr %1) - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/print.stringStruct", ptr %3, i32 0, i32 0 + %3 = call ptr @"github.com/goplus/llgo/cl/_testdata/print.stringStructOf"(ptr %1) + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/print.stringStruct", ptr %3, i32 0, i32 0 %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/print.slice", ptr %2, i32 0, i32 0 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/print.slice", ptr %2, i32 0, i32 0 store ptr %5, ptr %6, align 8 - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/print.stringStruct", ptr %3, i32 0, i32 1 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/print.stringStruct", ptr %3, i32 0, i32 1 %8 = load i64, ptr %7, align 4 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/print.slice", ptr %2, i32 0, i32 1 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/print.slice", ptr %2, i32 0, i32 1 store i64 %8, ptr %9, align 4 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/print.stringStruct", ptr %3, i32 0, i32 1 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/print.stringStruct", ptr %3, i32 0, i32 1 %11 = load i64, ptr %10, align 4 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/print.slice", ptr %2, i32 0, i32 2 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/print.slice", ptr %2, i32 0, i32 2 store i64 %11, ptr %12, align 4 %13 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 %2 = icmp eq i64 %1, 0 @@ -99,47 +99,47 @@ _llgo_5: ; preds = %_llgo_3 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.init"() { +define void @"github.com/goplus/llgo/cl/_testdata/print.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/print.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/print.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/print.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.init$after"() - store i64 0, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/print.minhexdigits", align 4 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/print.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/print.init$after"() + store i64 0, ptr @"github.com/goplus/llgo/cl/_testdata/print.minhexdigits", align 4 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.main"() { +define void @"github.com/goplus/llgo/cl/_testdata/print.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 1024) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printhex"(i64 305441743) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinxor"(i64 1) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinsub"(i64 100) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinusub"(i64 -1) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinfsub"(double 1.001000e+02) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 1024) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.printhex"(i64 305441743) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.prinxor"(i64 1) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.prinsub"(i64 100) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.prinusub"(i64 -1) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.prinfsub"(double 1.001000e+02) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() %0 = load ptr, ptr @_llgo_float32, align 8 %1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %1, ptr inttoptr (i32 1315859240 to ptr), 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() %3 = load ptr, ptr @_llgo_float64, align 8 %4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr inttoptr (i64 4746175415993761792 to ptr), 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5) + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() br i1 true, label %_llgo_3, label %_llgo_2 _llgo_1: ; preds = %_llgo_3 @@ -159,7 +159,7 @@ _llgo_1: ; preds = %_llgo_3 %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 2, 1 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 2, 2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18) + call void @"github.com/goplus/llgo/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18) br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_3, %_llgo_0 @@ -184,7 +184,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_3, %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %19, 0 %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 3, 1 %35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 3, 2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35) + call void @"github.com/goplus/llgo/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35) %36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 256) %37 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %36, i64 0 %38 = load ptr, ptr @_llgo_bool, align 8 @@ -271,7 +271,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_3, %102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %36, 0 %103 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %102, i64 16, 1 %104 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %103, i64 16, 2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %104) + call void @"github.com/goplus/llgo/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %104) %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) %106 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %105, i64 0 %107 = load ptr, ptr @_llgo_complex128, align 8 @@ -283,28 +283,28 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_3, %111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %105, 0 %112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %111, i64 1, 1 %113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %112, i64 1, 2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113) + call void @"github.com/goplus/llgo/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113) ret void _llgo_3: ; preds = %_llgo_0 br i1 true, label %_llgo_1, label %_llgo_2 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinfsub"(double %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.prinfsub"(double %0) { _llgo_0: %1 = fneg double %0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %1) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinsub"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.prinsub"(i64 %0) { _llgo_0: %1 = sub i64 0, %0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %1) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 %2 = load ptr, ptr @_llgo_bool, align 8 @@ -315,7 +315,7 @@ _llgo_1: ; preds = %_llgo_34, %_llgo_85 ret void _llgo_2: ; preds = %_llgo_37 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printbool"(i1 %71) + call void @"github.com/goplus/llgo/cl/_testdata/print.printbool"(i1 %71) br label %_llgo_1 _llgo_3: ; preds = %_llgo_37 @@ -325,7 +325,7 @@ _llgo_3: ; preds = %_llgo_37 br i1 %6, label %_llgo_38, label %_llgo_39 _llgo_4: ; preds = %_llgo_40 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %78) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %78) br label %_llgo_1 _llgo_5: ; preds = %_llgo_40 @@ -336,7 +336,7 @@ _llgo_5: ; preds = %_llgo_40 _llgo_6: ; preds = %_llgo_43 %10 = sext i8 %86 to i64 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %10) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %10) br label %_llgo_1 _llgo_7: ; preds = %_llgo_43 @@ -347,7 +347,7 @@ _llgo_7: ; preds = %_llgo_43 _llgo_8: ; preds = %_llgo_46 %14 = sext i16 %94 to i64 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %14) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %14) br label %_llgo_1 _llgo_9: ; preds = %_llgo_46 @@ -358,7 +358,7 @@ _llgo_9: ; preds = %_llgo_46 _llgo_10: ; preds = %_llgo_49 %18 = sext i32 %102 to i64 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %18) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %18) br label %_llgo_1 _llgo_11: ; preds = %_llgo_49 @@ -368,7 +368,7 @@ _llgo_11: ; preds = %_llgo_49 br i1 %21, label %_llgo_50, label %_llgo_51 _llgo_12: ; preds = %_llgo_52 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %109) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %109) br label %_llgo_1 _llgo_13: ; preds = %_llgo_52 @@ -378,7 +378,7 @@ _llgo_13: ; preds = %_llgo_52 br i1 %24, label %_llgo_53, label %_llgo_54 _llgo_14: ; preds = %_llgo_55 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %116) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %116) br label %_llgo_1 _llgo_15: ; preds = %_llgo_55 @@ -389,7 +389,7 @@ _llgo_15: ; preds = %_llgo_55 _llgo_16: ; preds = %_llgo_58 %28 = zext i8 %124 to i64 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %28) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %28) br label %_llgo_1 _llgo_17: ; preds = %_llgo_58 @@ -400,7 +400,7 @@ _llgo_17: ; preds = %_llgo_58 _llgo_18: ; preds = %_llgo_61 %32 = zext i16 %132 to i64 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %32) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %32) br label %_llgo_1 _llgo_19: ; preds = %_llgo_61 @@ -411,7 +411,7 @@ _llgo_19: ; preds = %_llgo_61 _llgo_20: ; preds = %_llgo_64 %36 = zext i32 %140 to i64 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %36) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %36) br label %_llgo_1 _llgo_21: ; preds = %_llgo_64 @@ -421,7 +421,7 @@ _llgo_21: ; preds = %_llgo_64 br i1 %39, label %_llgo_65, label %_llgo_66 _llgo_22: ; preds = %_llgo_67 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %147) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %147) br label %_llgo_1 _llgo_23: ; preds = %_llgo_67 @@ -431,7 +431,7 @@ _llgo_23: ; preds = %_llgo_67 br i1 %42, label %_llgo_68, label %_llgo_69 _llgo_24: ; preds = %_llgo_70 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %154) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %154) br label %_llgo_1 _llgo_25: ; preds = %_llgo_70 @@ -442,7 +442,7 @@ _llgo_25: ; preds = %_llgo_70 _llgo_26: ; preds = %_llgo_73 %46 = fpext float %163 to double - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %46) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %46) br label %_llgo_1 _llgo_27: ; preds = %_llgo_73 @@ -452,7 +452,7 @@ _llgo_27: ; preds = %_llgo_73 br i1 %49, label %_llgo_74, label %_llgo_75 _llgo_28: ; preds = %_llgo_76 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %171) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %171) br label %_llgo_1 _llgo_29: ; preds = %_llgo_76 @@ -462,14 +462,14 @@ _llgo_29: ; preds = %_llgo_76 br i1 %52, label %_llgo_77, label %_llgo_78 _llgo_30: ; preds = %_llgo_79 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }) %53 = extractvalue { float, float } %178, 0 %54 = fpext float %53 to double - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %54) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %54) %55 = extractvalue { float, float } %178, 1 %56 = fpext float %55 to double - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %56) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 2 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %56) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 2 }) br label %_llgo_1 _llgo_31: ; preds = %_llgo_79 @@ -479,12 +479,12 @@ _llgo_31: ; preds = %_llgo_79 br i1 %59, label %_llgo_80, label %_llgo_81 _llgo_32: ; preds = %_llgo_82 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }) %60 = extractvalue { double, double } %185, 0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %60) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %60) %61 = extractvalue { double, double } %185, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %61) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 2 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %61) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 2 }) br label %_llgo_1 _llgo_33: ; preds = %_llgo_82 @@ -494,7 +494,7 @@ _llgo_33: ; preds = %_llgo_82 br i1 %64, label %_llgo_83, label %_llgo_84 _llgo_34: ; preds = %_llgo_85 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %192) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %192) br label %_llgo_1 _llgo_35: ; preds = %_llgo_0 @@ -780,33 +780,33 @@ _llgo_85: ; preds = %_llgo_84, %_llgo_83 br i1 %193, label %_llgo_34, label %_llgo_1 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printbool"(i1 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printbool"(i1 %0) { _llgo_0: br i1 %0, label %_llgo_1, label %_llgo_3 _llgo_1: ; preds = %_llgo_0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }) br label %_llgo_2 _llgo_2: ; preds = %_llgo_3, %_llgo_1 ret void _llgo_3: ; preds = %_llgo_0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }) br label %_llgo_2 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printfloat"(double %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printfloat"(double %0) { _llgo_0: %1 = fcmp une double %0, %0 br i1 %1, label %_llgo_1, label %_llgo_3 _llgo_1: ; preds = %_llgo_0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 3 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 3 }) ret void _llgo_2: ; preds = %_llgo_7 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }) ret void _llgo_3: ; preds = %_llgo_0 @@ -815,7 +815,7 @@ _llgo_3: ; preds = %_llgo_0 br i1 %3, label %_llgo_6, label %_llgo_7 _llgo_4: ; preds = %_llgo_10 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 4 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 4 }) ret void _llgo_5: ; preds = %_llgo_7 @@ -981,11 +981,11 @@ _llgo_29: ; preds = %_llgo_28, %_llgo_27 %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %8, 0 %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78, i64 14, 1 %80 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, i64 14, 2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80) + call void @"github.com/goplus/llgo/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printhex"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printhex"(i64 %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 100) br label %_llgo_3 @@ -1021,7 +1021,7 @@ _llgo_2: ; preds = %_llgo_5, %_llgo_3 %20 = getelementptr inbounds i8, ptr %1, i64 %16 store i8 48, ptr %20, align 1 %21 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %1, i64 1, i64 100, i64 %16, i64 100, i64 100) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21) + call void @"github.com/goplus/llgo/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21) ret void _llgo_3: ; preds = %_llgo_4, %_llgo_0 @@ -1037,28 +1037,28 @@ _llgo_4: ; preds = %_llgo_5, %_llgo_1 _llgo_5: ; preds = %_llgo_1 %27 = sub i64 100, %23 - %28 = load i64, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/print.minhexdigits", align 4 + %28 = load i64, ptr @"github.com/goplus/llgo/cl/_testdata/print.minhexdigits", align 4 %29 = icmp sge i64 %27, %28 br i1 %29, label %_llgo_2, label %_llgo_4 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %0) { _llgo_0: %1 = icmp slt i64 %0, 0 br i1 %1, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 1 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 1 }) %2 = sub i64 0, %0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 %3 = phi i64 [ %0, %_llgo_0 ], [ %2, %_llgo_1 ] - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %3) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %3) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.println"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 br label %_llgo_1 @@ -1082,38 +1082,38 @@ _llgo_2: ; preds = %_llgo_1 br i1 %12, label %_llgo_4, label %_llgo_5 _llgo_3: ; preds = %_llgo_1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() + call void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() ret void _llgo_4: ; preds = %_llgo_2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 1 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 1 }) br label %_llgo_5 _llgo_5: ; preds = %_llgo_4, %_llgo_2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) + call void @"github.com/goplus/llgo/cl/_testdata/print.printany"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) br label %_llgo_1 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printnl"() { +define void @"github.com/goplus/llgo/cl/_testdata/print.printnl"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 1 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 1 }) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printsp"() { +define void @"github.com/goplus/llgo/cl/_testdata/print.printsp"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 1 }) + call void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 1 }) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printstring"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: - %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testdata/print.bytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) + %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testdata/print.bytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) + call void @"github.com/goplus/llgo/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 100) br label %_llgo_3 @@ -1133,7 +1133,7 @@ _llgo_1: ; preds = %_llgo_3 _llgo_2: ; preds = %_llgo_1, %_llgo_3 %10 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %1, i64 1, i64 100, i64 %12, i64 100, i64 100) - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) + call void @"github.com/goplus/llgo/cl/_testdata/print.gwrite"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) ret void _llgo_3: ; preds = %_llgo_4, %_llgo_0 @@ -1148,21 +1148,21 @@ _llgo_4: ; preds = %_llgo_1 br label %_llgo_3 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinusub"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.prinusub"(i64 %0) { _llgo_0: %1 = sub i64 0, %0 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printuint"(i64 %1) + call void @"github.com/goplus/llgo/cl/_testdata/print.printuint"(i64 %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.prinxor"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testdata/print.prinxor"(i64 %0) { _llgo_0: %1 = xor i64 %0, -1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/print.printint"(i64 %1) + call void @"github.com/goplus/llgo/cl/_testdata/print.printint"(i64 %1) ret void } -define ptr @"github.com/goplus/llgo/compiler/cl/_testdata/print.stringStructOf"(ptr %0) { +define ptr @"github.com/goplus/llgo/cl/_testdata/print.stringStructOf"(ptr %0) { _llgo_0: ret ptr %0 } @@ -1173,7 +1173,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange" declare i32 @printf(ptr, ...) -define void @"github.com/goplus/llgo/compiler/cl/_testdata/print.init$after"() { +define void @"github.com/goplus/llgo/cl/_testdata/print.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_float32, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testdata/printf/in.go b/cl/_testdata/printf/in.go similarity index 100% rename from compiler/cl/_testdata/printf/in.go rename to cl/_testdata/printf/in.go diff --git a/cl/_testdata/printf/out.ll b/cl/_testdata/printf/out.ll new file mode 100644 index 00000000..b54151d4 --- /dev/null +++ b/cl/_testdata/printf/out.ll @@ -0,0 +1,33 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/printf' +source_filename = "github.com/goplus/llgo/cl/_testdata/printf" + +@"github.com/goplus/llgo/cl/_testdata/printf.hello" = global [7 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testdata/printf.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/printf.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/printf.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/printf.init$guard", align 1 + store i8 72, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", i64 4), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", i64 5), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello", i64 6), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/printf.main"() { +_llgo_0: + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testdata/printf.hello") + ret void +} + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/printval/in.go b/cl/_testdata/printval/in.go similarity index 100% rename from compiler/cl/_testdata/printval/in.go rename to cl/_testdata/printval/in.go diff --git a/cl/_testdata/printval/out.ll b/cl/_testdata/printval/out.ll new file mode 100644 index 00000000..549b0809 --- /dev/null +++ b/cl/_testdata/printval/out.ll @@ -0,0 +1,36 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/printval' +source_filename = "github.com/goplus/llgo/cl/_testdata/printval" + +@"github.com/goplus/llgo/cl/_testdata/printval.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testdata/printval.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/printval.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/printval.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/printval.init$guard", align 1 + store i8 72, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 9), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/printval.main"() { +_llgo_0: + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testdata/printval.format", i64 100) + ret void +} + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/ptrmthd/in.go b/cl/_testdata/ptrmthd/in.go similarity index 100% rename from compiler/cl/_testdata/ptrmthd/in.go rename to cl/_testdata/ptrmthd/in.go diff --git a/cl/_testdata/ptrmthd/out.ll b/cl/_testdata/ptrmthd/out.ll new file mode 100644 index 00000000..8ea0af9a --- /dev/null +++ b/cl/_testdata/ptrmthd/out.ll @@ -0,0 +1,42 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/ptrmthd' +source_filename = "github.com/goplus/llgo/cl/_testdata/ptrmthd" + +@"github.com/goplus/llgo/cl/_testdata/ptrmthd.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testdata/ptrmthd.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/ptrmthd.(*T).Print"(ptr %0, i64 %1) { +_llgo_0: + call void (ptr, ...) @printf(ptr %0, i64 %1) + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/ptrmthd.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.init$guard", align 1 + store i8 72, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 9), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/ptrmthd.main"() { +_llgo_0: + call void @"github.com/goplus/llgo/cl/_testdata/ptrmthd.(*T).Print"(ptr @"github.com/goplus/llgo/cl/_testdata/ptrmthd.format", i64 100) + ret void +} + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/uint/in.go b/cl/_testdata/uint/in.go similarity index 79% rename from compiler/cl/_testdata/uint/in.go rename to cl/_testdata/uint/in.go index a2244160..d897c3c5 100644 --- a/compiler/cl/_testdata/uint/in.go +++ b/cl/_testdata/uint/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" func f(a c.Uint) c.Uint { a++ diff --git a/cl/_testdata/uint/out.ll b/cl/_testdata/uint/out.ll new file mode 100644 index 00000000..8570be6e --- /dev/null +++ b/cl/_testdata/uint/out.ll @@ -0,0 +1,33 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/uint' +source_filename = "github.com/goplus/llgo/cl/_testdata/uint" + +@"github.com/goplus/llgo/cl/_testdata/uint.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [11 x i8] c"Hello, %u\0A\00", align 1 + +define i32 @"github.com/goplus/llgo/cl/_testdata/uint.f"(i32 %0) { +_llgo_0: + %1 = add i32 %0, 1 + ret i32 %1 +} + +define void @"github.com/goplus/llgo/cl/_testdata/uint.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/uint.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/uint.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/uint.main"() { +_llgo_0: + %0 = call i32 @"github.com/goplus/llgo/cl/_testdata/uint.f"(i32 100) + %1 = call i32 (ptr, ...) @printf(ptr @0, i32 %0) + ret void +} + +declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testdata/untyped/in.go b/cl/_testdata/untyped/in.go similarity index 100% rename from compiler/cl/_testdata/untyped/in.go rename to cl/_testdata/untyped/in.go diff --git a/cl/_testdata/untyped/out.ll b/cl/_testdata/untyped/out.ll new file mode 100644 index 00000000..a439600b --- /dev/null +++ b/cl/_testdata/untyped/out.ll @@ -0,0 +1,31 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/untyped' +source_filename = "github.com/goplus/llgo/cl/_testdata/untyped" + +@"github.com/goplus/llgo/cl/_testdata/untyped.a" = global double 0.000000e+00, align 8 +@"github.com/goplus/llgo/cl/_testdata/untyped.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/untyped.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/untyped.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/untyped.init$guard", align 1 + store double 1.000000e+00, ptr @"github.com/goplus/llgo/cl/_testdata/untyped.a", align 8 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/untyped.main"() { +_llgo_0: + br i1 false, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + store double 0.000000e+00, ptr @"github.com/goplus/llgo/cl/_testdata/untyped.a", align 8 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} diff --git a/compiler/cl/_testdata/utf8/in.go b/cl/_testdata/utf8/in.go similarity index 100% rename from compiler/cl/_testdata/utf8/in.go rename to cl/_testdata/utf8/in.go diff --git a/compiler/cl/_testdata/utf8/out.ll b/cl/_testdata/utf8/out.ll similarity index 68% rename from compiler/cl/_testdata/utf8/out.ll rename to cl/_testdata/utf8/out.ll index c611bff2..9c1379ad 100644 --- a/compiler/cl/_testdata/utf8/out.ll +++ b/cl/_testdata/utf8/out.ll @@ -1,47 +1,47 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/utf8' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/utf8" +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/utf8' +source_filename = "github.com/goplus/llgo/cl/_testdata/utf8" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array" = global [8 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/utf8.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testdata/utf8.array" = global [8 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testdata/utf8.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [7 x i8] c"\E4\B8\ADabcd", align 1 -define i8 @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.index"(i8 %0) { +define i8 @"github.com/goplus/llgo/cl/_testdata/utf8.index"(i8 %0) { _llgo_0: %1 = sext i8 %0 to i64 %2 = icmp slt i64 %1, 0 %3 = icmp sge i64 %1, 8 %4 = or i1 %3, %2 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %4) - %5 = getelementptr inbounds i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 %1 + %5 = getelementptr inbounds i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 %1 %6 = load i8, ptr %5, align 1 ret i8 %6 } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.init"() { +define void @"github.com/goplus/llgo/cl/_testdata/utf8.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.init$guard", align 1 call void @"unicode/utf8.init"() - store i8 1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", align 1 - store i8 2, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 1), align 1 - store i8 3, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 2), align 1 - store i8 4, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 3), align 1 - store i8 5, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 4), align 1 - store i8 6, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 5), align 1 - store i8 7, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 6), align 1 - store i8 8, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.array", i64 7), align 1 + store i8 1, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", align 1 + store i8 2, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 1), align 1 + store i8 3, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 2), align 1 + store i8 4, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 3), align 1 + store i8 5, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 4), align 1 + store i8 6, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 5), align 1 + store i8 7, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 6), align 1 + store i8 8, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testdata/utf8.array", i64 7), align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.main"() { +define void @"github.com/goplus/llgo/cl/_testdata/utf8.main"() { _llgo_0: br label %_llgo_1 @@ -62,7 +62,7 @@ _llgo_2: ; preds = %_llgo_1 br label %_llgo_1 _llgo_3: ; preds = %_llgo_1 - %8 = call i8 @"github.com/goplus/llgo/compiler/cl/_testdata/utf8.index"(i8 2) + %8 = call i8 @"github.com/goplus/llgo/cl/_testdata/utf8.index"(i8 2) %9 = icmp eq i8 %8, 3 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %9) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) diff --git a/compiler/cl/_testdata/vargs/in.go b/cl/_testdata/vargs/in.go similarity index 79% rename from compiler/cl/_testdata/vargs/in.go rename to cl/_testdata/vargs/in.go index 8f7c3ac4..4c966d39 100644 --- a/compiler/cl/_testdata/vargs/in.go +++ b/cl/_testdata/vargs/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" func test(a ...any) { for _, v := range a { diff --git a/compiler/cl/_testdata/vargs/out.ll b/cl/_testdata/vargs/out.ll similarity index 85% rename from compiler/cl/_testdata/vargs/out.ll rename to cl/_testdata/vargs/out.ll index 98f04e58..2d4a4d62 100644 --- a/compiler/cl/_testdata/vargs/out.ll +++ b/cl/_testdata/vargs/out.ll @@ -1,31 +1,31 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/vargs' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/vargs" +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/vargs' +source_filename = "github.com/goplus/llgo/cl/_testdata/vargs" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testdata/vargs.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testdata/vargs.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @1 = private unnamed_addr constant [40 x i8] c"type assertion interface{} -> int failed", align 1 @_llgo_string = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.init"() { +define void @"github.com/goplus/llgo/cl/_testdata/vargs.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/vargs.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/vargs.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/vargs.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.main"() { +define void @"github.com/goplus/llgo/cl/_testdata/vargs.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48) %1 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %0, i64 0 @@ -46,11 +46,11 @@ _llgo_0: %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0 %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13, i64 3, 1 %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %14, i64 3, 2 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.test"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15) + call void @"github.com/goplus/llgo/cl/_testdata/vargs.test"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.test"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { +define void @"github.com/goplus/llgo/cl/_testdata/vargs.test"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 br label %_llgo_1 @@ -96,7 +96,7 @@ _llgo_5: ; preds = %_llgo_2 declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testdata/vargs.init$after"() { +define void @"github.com/goplus/llgo/cl/_testdata/vargs.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testdata/varinit/in.go b/cl/_testdata/varinit/in.go similarity index 100% rename from compiler/cl/_testdata/varinit/in.go rename to cl/_testdata/varinit/in.go diff --git a/cl/_testdata/varinit/out.ll b/cl/_testdata/varinit/out.ll new file mode 100644 index 00000000..6629ee21 --- /dev/null +++ b/cl/_testdata/varinit/out.ll @@ -0,0 +1,28 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/varinit' +source_filename = "github.com/goplus/llgo/cl/_testdata/varinit" + +@"github.com/goplus/llgo/cl/_testdata/varinit.a" = global i64 0, align 8 +@"github.com/goplus/llgo/cl/_testdata/varinit.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testdata/varinit.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/varinit.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/varinit.init$guard", align 1 + store i64 100, ptr @"github.com/goplus/llgo/cl/_testdata/varinit.a", align 4 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/varinit.main"() { +_llgo_0: + %0 = load i64, ptr @"github.com/goplus/llgo/cl/_testdata/varinit.a", align 4 + %1 = add i64 %0, 1 + store i64 %1, ptr @"github.com/goplus/llgo/cl/_testdata/varinit.a", align 4 + %2 = load i64, ptr @"github.com/goplus/llgo/cl/_testdata/varinit.a", align 4 + ret void +} diff --git a/compiler/cl/_testdefer/firstloop1/in.go b/cl/_testdefer/firstloop1/in.go similarity index 100% rename from compiler/cl/_testdefer/firstloop1/in.go rename to cl/_testdefer/firstloop1/in.go diff --git a/compiler/cl/_testdefer/firstloop1/out.txt b/cl/_testdefer/firstloop1/out.txt similarity index 100% rename from compiler/cl/_testdefer/firstloop1/out.txt rename to cl/_testdefer/firstloop1/out.txt diff --git a/compiler/cl/_testdefer/firstloop2/in.go b/cl/_testdefer/firstloop2/in.go similarity index 100% rename from compiler/cl/_testdefer/firstloop2/in.go rename to cl/_testdefer/firstloop2/in.go diff --git a/compiler/cl/_testdefer/firstloop2/out.txt b/cl/_testdefer/firstloop2/out.txt similarity index 100% rename from compiler/cl/_testdefer/firstloop2/out.txt rename to cl/_testdefer/firstloop2/out.txt diff --git a/compiler/cl/_testdefer/loop/in.go b/cl/_testdefer/loop/in.go similarity index 100% rename from compiler/cl/_testdefer/loop/in.go rename to cl/_testdefer/loop/in.go diff --git a/compiler/cl/_testdefer/loop/out.txt b/cl/_testdefer/loop/out.txt similarity index 100% rename from compiler/cl/_testdefer/loop/out.txt rename to cl/_testdefer/loop/out.txt diff --git a/compiler/cl/_testdefer/multiret/in.go b/cl/_testdefer/multiret/in.go similarity index 100% rename from compiler/cl/_testdefer/multiret/in.go rename to cl/_testdefer/multiret/in.go diff --git a/compiler/cl/_testdefer/multiret/out.txt b/cl/_testdefer/multiret/out.txt similarity index 100% rename from compiler/cl/_testdefer/multiret/out.txt rename to cl/_testdefer/multiret/out.txt diff --git a/compiler/cl/_testdefer/print/in.go b/cl/_testdefer/print/in.go similarity index 100% rename from compiler/cl/_testdefer/print/in.go rename to cl/_testdefer/print/in.go diff --git a/compiler/cl/_testdefer/print/out.txt b/cl/_testdefer/print/out.txt similarity index 100% rename from compiler/cl/_testdefer/print/out.txt rename to cl/_testdefer/print/out.txt diff --git a/compiler/cl/_testdefer/singleret/in.go b/cl/_testdefer/singleret/in.go similarity index 100% rename from compiler/cl/_testdefer/singleret/in.go rename to cl/_testdefer/singleret/in.go diff --git a/compiler/cl/_testdefer/singleret/out.txt b/cl/_testdefer/singleret/out.txt similarity index 100% rename from compiler/cl/_testdefer/singleret/out.txt rename to cl/_testdefer/singleret/out.txt diff --git a/compiler/cl/_testgo/allocinloop/in.go b/cl/_testgo/allocinloop/in.go similarity index 100% rename from compiler/cl/_testgo/allocinloop/in.go rename to cl/_testgo/allocinloop/in.go diff --git a/compiler/cl/_testgo/allocinloop/out.ll b/cl/_testgo/allocinloop/out.ll similarity index 55% rename from compiler/cl/_testgo/allocinloop/out.ll rename to cl/_testgo/allocinloop/out.ll index 39b84701..c5c62438 100644 --- a/compiler/cl/_testgo/allocinloop/out.ll +++ b/cl/_testgo/allocinloop/out.ll @@ -1,18 +1,18 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/allocinloop' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/allocinloop" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/allocinloop' +source_filename = "github.com/goplus/llgo/cl/_testgo/allocinloop" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/allocinloop.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"hello", align 1 -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/allocinloop.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, 1 ret i64 %1 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Test"() { +define void @"github.com/goplus/llgo/cl/_testgo/allocinloop.Test"() { _llgo_0: br label %_llgo_1 @@ -23,7 +23,7 @@ _llgo_1: ; preds = %_llgo_2, %_llgo_0 br i1 %2, label %_llgo_2, label %_llgo_3 _llgo_2: ; preds = %_llgo_1 - %3 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }) + %3 = call i64 @"github.com/goplus/llgo/cl/_testgo/allocinloop.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }) %4 = add i64 %0, %3 %5 = add i64 %1, 1 br label %_llgo_1 @@ -34,22 +34,22 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/allocinloop.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/allocinloop.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/allocinloop.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/allocinloop.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Test"() + call void @"github.com/goplus/llgo/cl/_testgo/allocinloop.Test"() ret void } diff --git a/compiler/cl/_testgo/cgobasic/cgobasic.go b/cl/_testgo/cgobasic/cgobasic.go similarity index 100% rename from compiler/cl/_testgo/cgobasic/cgobasic.go rename to cl/_testgo/cgobasic/cgobasic.go diff --git a/compiler/cl/_testgo/cgobasic/out.ll b/cl/_testgo/cgobasic/out.ll similarity index 100% rename from compiler/cl/_testgo/cgobasic/out.ll rename to cl/_testgo/cgobasic/out.ll diff --git a/compiler/cl/_testgo/cgocfiles/cgocfiles.go b/cl/_testgo/cgocfiles/cgocfiles.go similarity index 100% rename from compiler/cl/_testgo/cgocfiles/cgocfiles.go rename to cl/_testgo/cgocfiles/cgocfiles.go diff --git a/compiler/cl/_testgo/cgocfiles/in.c b/cl/_testgo/cgocfiles/in.c similarity index 100% rename from compiler/cl/_testgo/cgocfiles/in.c rename to cl/_testgo/cgocfiles/in.c diff --git a/compiler/cl/_testgo/cgocfiles/in.h b/cl/_testgo/cgocfiles/in.h similarity index 100% rename from compiler/cl/_testgo/cgocfiles/in.h rename to cl/_testgo/cgocfiles/in.h diff --git a/compiler/cl/_testgo/cgocfiles/out.ll b/cl/_testgo/cgocfiles/out.ll similarity index 100% rename from compiler/cl/_testgo/cgocfiles/out.ll rename to cl/_testgo/cgocfiles/out.ll diff --git a/compiler/cl/_testgo/cgodefer/cgodefer.go b/cl/_testgo/cgodefer/cgodefer.go similarity index 100% rename from compiler/cl/_testgo/cgodefer/cgodefer.go rename to cl/_testgo/cgodefer/cgodefer.go diff --git a/compiler/cl/_testgo/cgodefer/out.ll b/cl/_testgo/cgodefer/out.ll similarity index 100% rename from compiler/cl/_testgo/cgodefer/out.ll rename to cl/_testgo/cgodefer/out.ll diff --git a/compiler/cl/_testgo/cgofull/bar.go b/cl/_testgo/cgofull/bar.go similarity index 100% rename from compiler/cl/_testgo/cgofull/bar.go rename to cl/_testgo/cgofull/bar.go diff --git a/compiler/cl/_testgo/cgofull/cgofull.go b/cl/_testgo/cgofull/cgofull.go similarity index 96% rename from compiler/cl/_testgo/cgofull/cgofull.go rename to cl/_testgo/cgofull/cgofull.go index cdd56336..7d5fa45c 100644 --- a/compiler/cl/_testgo/cgofull/cgofull.go +++ b/cl/_testgo/cgofull/cgofull.go @@ -106,8 +106,8 @@ import ( "fmt" "unsafe" - "github.com/goplus/llgo/compiler/cl/_testgo/cgofull/pymod1" - "github.com/goplus/llgo/compiler/cl/_testgo/cgofull/pymod2" + "github.com/goplus/llgo/cl/_testgo/cgofull/pymod1" + "github.com/goplus/llgo/cl/_testgo/cgofull/pymod2" ) //export go_callback_not_use_in_go diff --git a/compiler/cl/_testgo/cgofull/foo.c b/cl/_testgo/cgofull/foo.c similarity index 100% rename from compiler/cl/_testgo/cgofull/foo.c rename to cl/_testgo/cgofull/foo.c diff --git a/compiler/cl/_testgo/cgofull/foo.go b/cl/_testgo/cgofull/foo.go similarity index 100% rename from compiler/cl/_testgo/cgofull/foo.go rename to cl/_testgo/cgofull/foo.go diff --git a/compiler/cl/_testgo/cgofull/foo.h b/cl/_testgo/cgofull/foo.h similarity index 100% rename from compiler/cl/_testgo/cgofull/foo.h rename to cl/_testgo/cgofull/foo.h diff --git a/compiler/cl/_testgo/cgofull/out.ll b/cl/_testgo/cgofull/out.ll similarity index 100% rename from compiler/cl/_testgo/cgofull/out.ll rename to cl/_testgo/cgofull/out.ll diff --git a/compiler/cl/_testgo/cgofull/py.go b/cl/_testgo/cgofull/py.go similarity index 100% rename from compiler/cl/_testgo/cgofull/py.go rename to cl/_testgo/cgofull/py.go diff --git a/compiler/cl/_testgo/cgofull/pymod1/pymod1.go b/cl/_testgo/cgofull/pymod1/pymod1.go similarity index 100% rename from compiler/cl/_testgo/cgofull/pymod1/pymod1.go rename to cl/_testgo/cgofull/pymod1/pymod1.go diff --git a/compiler/cl/_testgo/cgofull/pymod2/pymod2.go b/cl/_testgo/cgofull/pymod2/pymod2.go similarity index 100% rename from compiler/cl/_testgo/cgofull/pymod2/pymod2.go rename to cl/_testgo/cgofull/pymod2/pymod2.go diff --git a/compiler/cl/_testgo/cgomacro/cgomacro.go b/cl/_testgo/cgomacro/cgomacro.go similarity index 95% rename from compiler/cl/_testgo/cgomacro/cgomacro.go rename to cl/_testgo/cgomacro/cgomacro.go index 21bb8737..c71b269f 100644 --- a/compiler/cl/_testgo/cgomacro/cgomacro.go +++ b/cl/_testgo/cgomacro/cgomacro.go @@ -14,7 +14,7 @@ import "C" import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/compiler/cl/_testgo/cgomacro/out.ll b/cl/_testgo/cgomacro/out.ll similarity index 100% rename from compiler/cl/_testgo/cgomacro/out.ll rename to cl/_testgo/cgomacro/out.ll diff --git a/compiler/cl/_testgo/cgopython/cgopython.go b/cl/_testgo/cgopython/cgopython.go similarity index 100% rename from compiler/cl/_testgo/cgopython/cgopython.go rename to cl/_testgo/cgopython/cgopython.go diff --git a/compiler/cl/_testgo/cgopython/out.ll b/cl/_testgo/cgopython/out.ll similarity index 100% rename from compiler/cl/_testgo/cgopython/out.ll rename to cl/_testgo/cgopython/out.ll diff --git a/compiler/cl/_testgo/chan/in.go b/cl/_testgo/chan/in.go similarity index 100% rename from compiler/cl/_testgo/chan/in.go rename to cl/_testgo/chan/in.go diff --git a/compiler/cl/_testgo/chan/out.ll b/cl/_testgo/chan/out.ll similarity index 100% rename from compiler/cl/_testgo/chan/out.ll rename to cl/_testgo/chan/out.ll diff --git a/compiler/cl/_testgo/closure/in.go b/cl/_testgo/closure/in.go similarity index 100% rename from compiler/cl/_testgo/closure/in.go rename to cl/_testgo/closure/in.go diff --git a/compiler/cl/_testgo/closure/out.ll b/cl/_testgo/closure/out.ll similarity index 64% rename from compiler/cl/_testgo/closure/out.ll rename to cl/_testgo/closure/out.ll index 9969376d..229ab59b 100644 --- a/compiler/cl/_testgo/closure/out.ll +++ b/cl/_testgo/closure/out.ll @@ -1,46 +1,46 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/closure' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/closure" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/closure' +source_filename = "github.com/goplus/llgo/cl/_testgo/closure" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/closure.T" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testgo/closure.T" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/closure.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/closure.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [3 x i8] c"env", align 1 @1 = private unnamed_addr constant [4 x i8] c"func", align 1 @2 = private unnamed_addr constant [7 x i8] c"closure", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/closure.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/closure.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/closure.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/closure.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }, ptr %0, align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$2", ptr undef }, ptr %1, 1 - %4 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T", align 8 + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/closure.main$2", ptr undef }, ptr %1, 1 + %4 = alloca %"github.com/goplus/llgo/cl/_testgo/closure.T", align 8 store { ptr, ptr } %3, ptr %4, align 8 - %5 = load %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T", ptr %4, align 8 - call void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(ptr null, i64 100) - %6 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T" %5, 1 - %7 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T" %5, 0 + %5 = load %"github.com/goplus/llgo/cl/_testgo/closure.T", ptr %4, align 8 + call void @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/closure.main$1"(ptr null, i64 100) + %6 = extractvalue %"github.com/goplus/llgo/cl/_testgo/closure.T" %5, 1 + %7 = extractvalue %"github.com/goplus/llgo/cl/_testgo/closure.T" %5, 0 call void %7(ptr %6, i64 200) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(i64 %0) { +define void @"github.com/goplus/llgo/cl/_testgo/closure.main$1"(i64 %0) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -49,7 +49,7 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$2"(ptr %0, i64 %1) { +define void @"github.com/goplus/llgo/cl/_testgo/closure.main$2"(ptr %0, i64 %1) { _llgo_0: %2 = load { ptr }, ptr %0, align 8 %3 = extractvalue { ptr } %2, 0 @@ -65,9 +65,9 @@ _llgo_0: declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(ptr %0, i64 %1) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/closure.main$1"(ptr %0, i64 %1) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(i64 %1) + tail call void @"github.com/goplus/llgo/cl/_testgo/closure.main$1"(i64 %1) ret void } diff --git a/compiler/cl/_testgo/closure2/in.go b/cl/_testgo/closure2/in.go similarity index 100% rename from compiler/cl/_testgo/closure2/in.go rename to cl/_testgo/closure2/in.go diff --git a/compiler/cl/_testgo/closure2/out.ll b/cl/_testgo/closure2/out.ll similarity index 73% rename from compiler/cl/_testgo/closure2/out.ll rename to cl/_testgo/closure2/out.ll index d99956d5..bdb333b0 100644 --- a/compiler/cl/_testgo/closure2/out.ll +++ b/cl/_testgo/closure2/out.ll @@ -1,32 +1,32 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/closure2' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/closure2" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/closure2' +source_filename = "github.com/goplus/llgo/cl/_testgo/closure2" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testgo/closure2.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/closure2.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [7 x i8] c"closure", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/closure2.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/closure2.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/closure2.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/closure2.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store i64 1, ptr %0, align 4 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1", ptr undef }, ptr %1, 1 + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/closure2.main$1", ptr undef }, ptr %1, 1 %4 = extractvalue { ptr, ptr } %3, 1 %5 = extractvalue { ptr, ptr } %3, 0 %6 = call { ptr, ptr } %5(ptr %4, i64 1) @@ -36,18 +36,18 @@ _llgo_0: ret void } -define { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1"(ptr %0, i64 %1) { +define { ptr, ptr } @"github.com/goplus/llgo/cl/_testgo/closure2.main$1"(ptr %0, i64 %1) { _llgo_0: %2 = load { ptr }, ptr %0, align 8 %3 = extractvalue { ptr } %2, 0 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %5 = getelementptr inbounds { ptr }, ptr %4, i32 0, i32 0 store ptr %3, ptr %5, align 8 - %6 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1$1", ptr undef }, ptr %4, 1 + %6 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/closure2.main$1$1", ptr undef }, ptr %4, 1 ret { ptr, ptr } %6 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1$1"(ptr %0, i64 %1) { +define void @"github.com/goplus/llgo/cl/_testgo/closure2.main$1$1"(ptr %0, i64 %1) { _llgo_0: %2 = load { ptr }, ptr %0, align 8 %3 = extractvalue { ptr } %2, 0 diff --git a/compiler/cl/_testgo/constconv/in.go b/cl/_testgo/constconv/in.go similarity index 100% rename from compiler/cl/_testgo/constconv/in.go rename to cl/_testgo/constconv/in.go diff --git a/compiler/cl/_testgo/constconv/out.ll b/cl/_testgo/constconv/out.ll similarity index 66% rename from compiler/cl/_testgo/constconv/out.ll rename to cl/_testgo/constconv/out.ll index d2e9cea8..4b4f2b46 100644 --- a/compiler/cl/_testgo/constconv/out.ll +++ b/cl/_testgo/constconv/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/constconv' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/constconv" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/constconv' +source_filename = "github.com/goplus/llgo/cl/_testgo/constconv" -@"github.com/goplus/llgo/compiler/cl/_testgo/constconv.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/constconv.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/constconv.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/constconv.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/constconv.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/constconv.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/constconv.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/constconv.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/constconv.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/constconv.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 1) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) diff --git a/compiler/cl/_testgo/defer1/in.go b/cl/_testgo/defer1/in.go similarity index 100% rename from compiler/cl/_testgo/defer1/in.go rename to cl/_testgo/defer1/in.go diff --git a/compiler/cl/_testgo/defer1/out.ll b/cl/_testgo/defer1/out.ll similarity index 100% rename from compiler/cl/_testgo/defer1/out.ll rename to cl/_testgo/defer1/out.ll diff --git a/compiler/cl/_testgo/defer2/in.go b/cl/_testgo/defer2/in.go similarity index 100% rename from compiler/cl/_testgo/defer2/in.go rename to cl/_testgo/defer2/in.go diff --git a/compiler/cl/_testgo/defer2/out.ll b/cl/_testgo/defer2/out.ll similarity index 100% rename from compiler/cl/_testgo/defer2/out.ll rename to cl/_testgo/defer2/out.ll diff --git a/compiler/cl/_testgo/defer3/in.go b/cl/_testgo/defer3/in.go similarity index 100% rename from compiler/cl/_testgo/defer3/in.go rename to cl/_testgo/defer3/in.go diff --git a/compiler/cl/_testgo/defer3/out.ll b/cl/_testgo/defer3/out.ll similarity index 100% rename from compiler/cl/_testgo/defer3/out.ll rename to cl/_testgo/defer3/out.ll diff --git a/compiler/cl/_testgo/defer4/in.go b/cl/_testgo/defer4/in.go similarity index 100% rename from compiler/cl/_testgo/defer4/in.go rename to cl/_testgo/defer4/in.go diff --git a/compiler/cl/_testgo/defer4/out.ll b/cl/_testgo/defer4/out.ll similarity index 100% rename from compiler/cl/_testgo/defer4/out.ll rename to cl/_testgo/defer4/out.ll diff --git a/compiler/cl/_testgo/defer5/in.go b/cl/_testgo/defer5/in.go similarity index 100% rename from compiler/cl/_testgo/defer5/in.go rename to cl/_testgo/defer5/in.go diff --git a/compiler/cl/_testgo/defer5/out.ll b/cl/_testgo/defer5/out.ll similarity index 100% rename from compiler/cl/_testgo/defer5/out.ll rename to cl/_testgo/defer5/out.ll diff --git a/compiler/cl/_testgo/equal/in.go b/cl/_testgo/equal/in.go similarity index 100% rename from compiler/cl/_testgo/equal/in.go rename to cl/_testgo/equal/in.go diff --git a/compiler/cl/_testgo/equal/out.ll b/cl/_testgo/equal/out.ll similarity index 70% rename from compiler/cl/_testgo/equal/out.ll rename to cl/_testgo/equal/out.ll index e4da061a..918093d8 100644 --- a/compiler/cl/_testgo/equal/out.ll +++ b/cl/_testgo/equal/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/equal' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/equal" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/equal' +source_filename = "github.com/goplus/llgo/cl/_testgo/equal" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" = type { i64, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.eface" } +%"github.com/goplus/llgo/cl/_testgo/equal.T" = type { i64, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.eface" } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/equal.N" = type {} +%"github.com/goplus/llgo/cl/_testgo/equal.N" = type {} %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } -@"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/equal.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"failed", align 1 @_llgo_string = linkonce global ptr null, align 8 @1 = private unnamed_addr constant [5 x i8] c"hello", align 1 @_llgo_int = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [2 x i8] c"ok", align 1 @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 -@3 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/equal", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T" = linkonce global ptr null, align 8 +@3 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testgo/equal", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/equal.T" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [1 x i8] c"T", align 1 @_llgo_any = linkonce global ptr null, align 8 @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk" = linkonce global ptr null, align 8 @@ -24,7 +24,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/equal" @6 = private unnamed_addr constant [1 x i8] c"Y", align 1 @7 = private unnamed_addr constant [1 x i8] c"Z", align 1 @8 = private unnamed_addr constant [1 x i8] c"V", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/equal.N" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [1 x i8] c"N", align 1 @"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [7 x i8] c"topbits", align 1 @@ -32,7 +32,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/equal" @12 = private unnamed_addr constant [5 x i8] c"elems", align 1 @13 = private unnamed_addr constant [8 x i8] c"overflow", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %0) { +define void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %0) { _llgo_0: br i1 %0, label %_llgo_2, label %_llgo_1 @@ -49,58 +49,58 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/equal.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$after"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#2"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#3"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#4"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#5"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#6"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#7"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/equal.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/equal.init$after"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#1"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#2"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#3"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#4"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#5"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#6"() + call void @"github.com/goplus/llgo/cl/_testgo/equal.init#7"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#1"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1$2", ptr undef }, ptr %1, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/equal.init#1$2", ptr undef }, ptr %1, 1 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) %4 = extractvalue { ptr, ptr } %3, 0 %5 = icmp ne ptr %4, null - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %5) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %5) %6 = extractvalue { ptr, ptr } %3, 0 %7 = icmp ne ptr null, %6 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %7) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %7) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) ret void } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1$1"(i64 %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testgo/equal.init#1$1"(i64 %0, i64 %1) { _llgo_0: %2 = add i64 %0, %1 ret i64 %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1$2"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#1$2"(ptr %0) { _llgo_0: %1 = load { ptr }, ptr %0, align 8 %2 = extractvalue { ptr } %1, 0 @@ -110,9 +110,9 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#2"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#2"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) %0 = alloca [3 x i64], align 8 call void @llvm.memset(ptr %0, i8 0, i64 24, i1 false) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -143,7 +143,7 @@ _llgo_0: %19 = extractvalue [3 x i64] %9, 2 %20 = icmp eq i64 %18, %19 %21 = and i1 %17, %20 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %21) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %21) %22 = getelementptr inbounds i64, ptr %4, i64 1 store i64 1, ptr %22, align 4 %23 = load [3 x i64], ptr %0, align 4 @@ -161,18 +161,18 @@ _llgo_0: %35 = icmp eq i64 %33, %34 %36 = and i1 %32, %35 %37 = xor i1 %36, true - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %37) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %37) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#3"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#3"() { _llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %0 = alloca %"github.com/goplus/llgo/cl/_testgo/equal.T", align 8 call void @llvm.memset(ptr %0, i8 0, i64 48, i1 false) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 0 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 1 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 2 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 3 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %0, i32 0, i32 1 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %0, i32 0, i32 2 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %0, i32 0, i32 3 store i64 10, ptr %1, align 4 store i64 20, ptr %2, align 4 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %3, align 8 @@ -180,12 +180,12 @@ _llgo_0: %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr inttoptr (i64 1 to ptr), 1 store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %4, align 8 - %8 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %8 = alloca %"github.com/goplus/llgo/cl/_testgo/equal.T", align 8 call void @llvm.memset(ptr %8, i8 0, i64 48, i1 false) - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 0 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 1 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 2 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 3 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %8, i32 0, i32 0 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %8, i32 0, i32 1 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %8, i32 0, i32 2 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %8, i32 0, i32 3 store i64 10, ptr %9, align 4 store i64 20, ptr %10, align 4 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %11, align 8 @@ -193,12 +193,12 @@ _llgo_0: %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %13, 0 %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr inttoptr (i64 1 to ptr), 1 store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, ptr %12, align 8 - %16 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %16 = alloca %"github.com/goplus/llgo/cl/_testgo/equal.T", align 8 call void @llvm.memset(ptr %16, i8 0, i64 48, i1 false) - %17 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 0 - %18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 1 - %19 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 2 - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 3 + %17 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %16, i32 0, i32 0 + %18 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %16, i32 0, i32 1 + %19 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %16, i32 0, i32 2 + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %16, i32 0, i32 3 store i64 10, ptr %17, align 4 store i64 20, ptr %18, align 4 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %19, align 8 @@ -208,75 +208,75 @@ _llgo_0: %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %21, 0 %24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %23, ptr %22, 1 store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %24, ptr %20, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) %25 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer) %26 = and i1 true, %25 %27 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer) %28 = and i1 %26, %27 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %28) - %29 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, align 8 - %30 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, align 8 - %31 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 0 - %32 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 0 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %28) + %29 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %0, align 8 + %30 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %8, align 8 + %31 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %29, 0 + %32 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %30, 0 %33 = icmp eq i64 %31, %32 %34 = and i1 true, %33 - %35 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 1 - %36 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 1 + %35 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %29, 1 + %36 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %30, 1 %37 = icmp eq i64 %35, %36 %38 = and i1 %34, %37 - %39 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 2 - %40 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 2 + %39 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %29, 2 + %40 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %30, 2 %41 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %39, %"github.com/goplus/llgo/runtime/internal/runtime.String" %40) %42 = and i1 %38, %41 - %43 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 3 - %44 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 3 + %43 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %29, 3 + %44 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %30, 3 %45 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %43, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44) %46 = and i1 %42, %45 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %46) - %47 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, align 8 - %48 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, align 8 - %49 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 0 - %50 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 0 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %46) + %47 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %0, align 8 + %48 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %16, align 8 + %49 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %47, 0 + %50 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %48, 0 %51 = icmp eq i64 %49, %50 %52 = and i1 true, %51 - %53 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 1 - %54 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 1 + %53 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %47, 1 + %54 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %48, 1 %55 = icmp eq i64 %53, %54 %56 = and i1 %52, %55 - %57 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 2 - %58 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 2 + %57 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %47, 2 + %58 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %48, 2 %59 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %57, %"github.com/goplus/llgo/runtime/internal/runtime.String" %58) %60 = and i1 %56, %59 - %61 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 3 - %62 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 3 + %61 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %47, 3 + %62 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %48, 3 %63 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %61, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %62) %64 = and i1 %60, %63 %65 = xor i1 %64, true - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %65) - %66 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, align 8 - %67 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, align 8 - %68 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 0 - %69 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 0 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %65) + %66 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %8, align 8 + %67 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %16, align 8 + %68 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %66, 0 + %69 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %67, 0 %70 = icmp eq i64 %68, %69 %71 = and i1 true, %70 - %72 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 1 - %73 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 1 + %72 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %66, 1 + %73 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %67, 1 %74 = icmp eq i64 %72, %73 %75 = and i1 %71, %74 - %76 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 2 - %77 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 2 + %76 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %66, 2 + %77 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %67, 2 %78 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %76, %"github.com/goplus/llgo/runtime/internal/runtime.String" %77) %79 = and i1 %75, %78 - %80 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 3 - %81 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 3 + %80 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %66, 3 + %81 = extractvalue %"github.com/goplus/llgo/cl/_testgo/equal.T" %67, 3 %82 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %80, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %81) %83 = and i1 %79, %82 %84 = xor i1 %83, true - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %84) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %84) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#4"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#4"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -292,21 +292,21 @@ _llgo_0: %8 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %7, i64 8, i64 2, i64 0, i64 2, i64 2) %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) %10 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %9, i64 8, i64 2, i64 0, i64 0, i64 2) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) %11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, 0 %12 = icmp ne ptr %11, null - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %12) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %12) %13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, 0 %14 = icmp ne ptr %13, null - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %14) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %14) %15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, 0 %16 = icmp ne ptr %15, null - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %16) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %16) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#5"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#5"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 @@ -316,12 +316,12 @@ _llgo_0: store {} zeroinitializer, ptr %4, align 1 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr %4, 1 - %7 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %7 = alloca %"github.com/goplus/llgo/cl/_testgo/equal.T", align 8 call void @llvm.memset(ptr %7, i8 0, i64 48, i1 false) - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 0 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 1 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 2 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 3 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %7, i32 0, i32 0 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %7, i32 0, i32 1 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %7, i32 0, i32 2 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %7, i32 0, i32 3 store i64 10, ptr %8, align 4 store i64 20, ptr %9, align 4 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %10, align 8 @@ -329,18 +329,18 @@ _llgo_0: %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0 %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, ptr inttoptr (i64 1 to ptr), 1 store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %11, align 8 - %15 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, align 8 - %16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %15 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %7, align 8 + %16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.T", align 8 %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %15, ptr %17, align 8 + store %"github.com/goplus/llgo/cl/_testgo/equal.T" %15, ptr %17, align 8 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %16, 0 %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr %17, 1 - %20 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %20 = alloca %"github.com/goplus/llgo/cl/_testgo/equal.T", align 8 call void @llvm.memset(ptr %20, i8 0, i64 48, i1 false) - %21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 0 - %22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 1 - %23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 2 - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 3 + %21 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %20, i32 0, i32 0 + %22 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %20, i32 0, i32 1 + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %20, i32 0, i32 2 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %20, i32 0, i32 3 store i64 10, ptr %21, align 4 store i64 20, ptr %22, align 4 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %23, align 8 @@ -348,12 +348,12 @@ _llgo_0: %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %25, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr inttoptr (i64 1 to ptr), 1 store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %27, ptr %24, align 8 - %28 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %28 = alloca %"github.com/goplus/llgo/cl/_testgo/equal.T", align 8 call void @llvm.memset(ptr %28, i8 0, i64 48, i1 false) - %29 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 0 - %30 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 1 - %31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 2 - %32 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 3 + %29 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %28, i32 0, i32 0 + %30 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %28, i32 0, i32 1 + %31 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %28, i32 0, i32 2 + %32 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %28, i32 0, i32 3 store i64 10, ptr %29, align 4 store i64 20, ptr %30, align 4 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %31, align 8 @@ -367,76 +367,76 @@ _llgo_0: %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %37, 0 %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %38, ptr inttoptr (i64 100 to ptr), 1 %40 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %40) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %40) %41 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 %42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) store {} zeroinitializer, ptr %42, align 1 %43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %41, 0 %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %43, ptr %42, 1 %45 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %45) - %46 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %45) + %46 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.N", align 8 %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.N" zeroinitializer, ptr %47, align 1 + store %"github.com/goplus/llgo/cl/_testgo/equal.N" zeroinitializer, ptr %47, align 1 %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %46, 0 %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %48, ptr %47, 1 %50 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49) %51 = xor i1 %50, true - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %51) - %52 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, align 8 - %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %51) + %52 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %20, align 8 + %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.T", align 8 %54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %52, ptr %54, align 8 + store %"github.com/goplus/llgo/cl/_testgo/equal.T" %52, ptr %54, align 8 %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %53, 0 %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %55, ptr %54, 1 %57 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %56) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %57) - %58 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, align 8 - %59 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %57) + %58 = load %"github.com/goplus/llgo/cl/_testgo/equal.T", ptr %28, align 8 + %59 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.T", align 8 %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %58, ptr %60, align 8 + store %"github.com/goplus/llgo/cl/_testgo/equal.T" %58, ptr %60, align 8 %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %59, 0 %62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %61, ptr %60, 1 %63 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %62) %64 = xor i1 %63, true - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %64) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %64) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#6"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#6"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 0) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 0) %2 = icmp eq ptr %0, %0 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %2) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %2) %3 = icmp ne ptr %0, %1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %3) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %3) %4 = icmp ne ptr %0, null - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %4) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %4) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#7"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init#7"() { _llgo_0: %0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %0, i64 0) %2 = icmp ne ptr %1, null - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %2) - call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 %2) + call void @"github.com/goplus/llgo/cl/_testgo/equal.assert"(i1 true) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.main"() { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.test"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.test"() { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/equal.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null @@ -462,15 +462,15 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 0, 1 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 0, 2 - %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) store ptr %10, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0) - %12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0) + %12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.T", align 8 %13 = icmp eq ptr %12, null br i1 %13, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - store ptr %11, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8 + store ptr %11, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.T", align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 @@ -483,7 +483,7 @@ _llgo_7: ; preds = %_llgo_6 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %16, 0 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 0, 1 %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 0, 2 - %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19) + %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19) store ptr %20, ptr @_llgo_any, align 8 br label %_llgo_8 @@ -499,7 +499,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %28, 0 %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 0, 1 %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 0, 2 - %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31) + %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31) %33 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 1 }, ptr %32, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224) %35 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %34, i64 0 @@ -513,7 +513,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %34, 0 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 4, 1 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 4, 2 - %42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41) + %42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41) store ptr %42, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8 %43 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8 br i1 %13, label %_llgo_9, label %_llgo_10 @@ -523,13 +523,13 @@ _llgo_9: ; preds = %_llgo_8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0) - %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N", align 8 + %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0) + %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.N", align 8 %46 = icmp eq ptr %45, null br i1 %46, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - store ptr %44, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N", align 8 + store ptr %44, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/equal.N", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 @@ -571,7 +571,7 @@ _llgo_15: ; preds = %_llgo_14 %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %63, 0 %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 4, 1 %70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69, i64 4, 2 - %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70) + %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 39 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70) %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %50, ptr %51, ptr %71, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %72) store ptr %72, ptr @"map[_llgo_int]_llgo_string", align 8 diff --git a/compiler/cl/_testgo/errors/in.go b/cl/_testgo/errors/in.go similarity index 100% rename from compiler/cl/_testgo/errors/in.go rename to cl/_testgo/errors/in.go diff --git a/compiler/cl/_testgo/errors/out.ll b/cl/_testgo/errors/out.ll similarity index 79% rename from compiler/cl/_testgo/errors/out.ll rename to cl/_testgo/errors/out.ll index d3f7d604..c6868c79 100644 --- a/compiler/cl/_testgo/errors/out.ll +++ b/cl/_testgo/errors/out.ll @@ -1,34 +1,34 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/errors' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/errors" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/errors' +source_filename = "github.com/goplus/llgo/cl/_testgo/errors" %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } +%"github.com/goplus/llgo/cl/_testgo/errors.errorString" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/errors.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [49 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/errors", align 1 +@"github.com/goplus/llgo/cl/_testgo/errors.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [40 x i8] c"github.com/goplus/llgo/cl/_testgo/errors", align 1 @1 = private unnamed_addr constant [11 x i8] c"errorString", align 1 @_llgo_string = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [1 x i8] c"s", align 1 @3 = private unnamed_addr constant [5 x i8] c"Error", align 1 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8 @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [8 x i8] c"an error", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", ptr %1, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/errors.errorString", ptr %1, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %2, align 8 - %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8 - %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 + %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 %5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 %6 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %6, ptr %4) @@ -37,30 +37,30 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/errors.(*errorString).Error"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/errors.(*errorString).Error"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/errors.errorString", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/errors.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/errors.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/errors.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/errors.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/errors.main"() { _llgo_0: - %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }) + %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) @@ -79,10 +79,10 @@ _llgo_0: declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/errors.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1) - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1) + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 %1 = load ptr, ptr @_llgo_string, align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 @@ -102,9 +102,9 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %7, 0 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, i64 1, 1 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 1, 2 - %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11) - store ptr %12, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %13 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11) + store ptr %12, ptr @"github.com/goplus/llgo/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %13 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 %14 = load ptr, ptr @_llgo_string, align 8 %15 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 %16 = icmp eq ptr %15, null @@ -129,8 +129,8 @@ _llgo_3: ; preds = %_llgo_2 _llgo_4: ; preds = %_llgo_3, %_llgo_2 %27 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 %28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %27, 1 - %29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.(*errorString).Error", 2 - %30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.(*errorString).Error", 3 + %29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/cl/_testgo/errors.(*errorString).Error", 2 + %30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/cl/_testgo/errors.(*errorString).Error", 3 %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %32 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %31, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %32, align 8 @@ -138,10 +138,10 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 1, 1 %35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %13, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35) - %36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1) + %36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1) %37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %36) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %37) - store ptr %37, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8 + store ptr %37, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 %38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 %39 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 %40 = icmp eq ptr %39, null @@ -155,7 +155,7 @@ _llgo_5: ; preds = %_llgo_4 %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %42, 0 %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 1, 1 %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 1, 2 - %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46) + %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46) store ptr %47, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 br label %_llgo_6 diff --git a/compiler/cl/_testgo/goexit/in.go b/cl/_testgo/goexit/in.go similarity index 100% rename from compiler/cl/_testgo/goexit/in.go rename to cl/_testgo/goexit/in.go diff --git a/compiler/cl/_testgo/goexit/out.ll b/cl/_testgo/goexit/out.ll similarity index 100% rename from compiler/cl/_testgo/goexit/out.ll rename to cl/_testgo/goexit/out.ll diff --git a/compiler/cl/_testgo/goroutine/in.go b/cl/_testgo/goroutine/in.go similarity index 100% rename from compiler/cl/_testgo/goroutine/in.go rename to cl/_testgo/goroutine/in.go diff --git a/compiler/cl/_testgo/goroutine/out.ll b/cl/_testgo/goroutine/out.ll similarity index 79% rename from compiler/cl/_testgo/goroutine/out.ll rename to cl/_testgo/goroutine/out.ll index 5a9dcc1a..f47ac2c3 100644 --- a/compiler/cl/_testgo/goroutine/out.ll +++ b/cl/_testgo/goroutine/out.ll @@ -1,27 +1,27 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/goroutine' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/goroutine" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/goroutine' +source_filename = "github.com/goplus/llgo/cl/_testgo/goroutine" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/goroutine.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"hello", align 1 @1 = private unnamed_addr constant [16 x i8] c"Hello, goroutine", align 1 @2 = private unnamed_addr constant [1 x i8] c".", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/goroutine.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/goroutine.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/goroutine.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/goroutine.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 1) store i1 false, ptr %0, align 1 @@ -29,18 +29,18 @@ _llgo_0: %2 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %1, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %2, align 8 %3 = alloca i8, i64 8, align 1 - %4 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %3, ptr null, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$1", ptr %1) + %4 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %3, ptr null, ptr @"github.com/goplus/llgo/cl/_testgo/goroutine._llgo_routine$1", ptr %1) %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %6 = getelementptr inbounds { ptr }, ptr %5, i32 0, i32 0 store ptr %0, ptr %6, align 8 - %7 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.main$1", ptr undef }, ptr %5, 1 + %7 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/goroutine.main$1", ptr undef }, ptr %5, 1 %8 = call ptr @malloc(i64 32) %9 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %8, i32 0, i32 0 store { ptr, ptr } %7, ptr %9, align 8 %10 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %8, i32 0, i32 1 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 16 }, ptr %10, align 8 %11 = alloca i8, i64 8, align 1 - %12 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %11, ptr null, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$2", ptr %8) + %12 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %11, ptr null, ptr @"github.com/goplus/llgo/cl/_testgo/goroutine._llgo_routine$2", ptr %8) br label %_llgo_3 _llgo_1: ; preds = %_llgo_3 @@ -55,7 +55,7 @@ _llgo_3: ; preds = %_llgo_1, %_llgo_0 br i1 %13, label %_llgo_2, label %_llgo_1 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.main$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { +define void @"github.com/goplus/llgo/cl/_testgo/goroutine.main$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) @@ -69,7 +69,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) declare ptr @malloc(i64) -define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$1"(ptr %0) { +define ptr @"github.com/goplus/llgo/cl/_testgo/goroutine._llgo_routine$1"(ptr %0) { _llgo_0: %1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %0, align 8 %2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String" } %1, 0 @@ -89,7 +89,7 @@ declare i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr, declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) -define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$2"(ptr %0) { +define ptr @"github.com/goplus/llgo/cl/_testgo/goroutine._llgo_routine$2"(ptr %0) { _llgo_0: %1 = load { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %0, align 8 %2 = extractvalue { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" } %1, 0 diff --git a/compiler/cl/_testgo/ifaceconv/in.go b/cl/_testgo/ifaceconv/in.go similarity index 100% rename from compiler/cl/_testgo/ifaceconv/in.go rename to cl/_testgo/ifaceconv/in.go diff --git a/compiler/cl/_testgo/ifaceconv/out.ll b/cl/_testgo/ifaceconv/out.ll similarity index 82% rename from compiler/cl/_testgo/ifaceconv/out.ll rename to cl/_testgo/ifaceconv/out.ll index 87965612..adce156d 100644 --- a/compiler/cl/_testgo/ifaceconv/out.ll +++ b/cl/_testgo/ifaceconv/out.ll @@ -1,8 +1,8 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/ifaceconv' +source_filename = "github.com/goplus/llgo/cl/_testgo/ifaceconv" -%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" = type {} -%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" = type {} +%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" = type {} +%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" = type {} %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } @@ -11,31 +11,31 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv" %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } -@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv", align 1 +@"github.com/goplus/llgo/cl/_testgo/ifaceconv.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I0" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceconv", align 1 @1 = private unnamed_addr constant [2 x i8] c"I0", align 1 @2 = private unnamed_addr constant [21 x i8] c"nil i0.(I0) succeeded", align 1 @_llgo_string = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [2 x i8] c"I1", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 -@4 = private unnamed_addr constant [54 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.f", align 1 +@4 = private unnamed_addr constant [45 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceconv.f", align 1 @5 = private unnamed_addr constant [21 x i8] c"nil i1.(I1) succeeded", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [2 x i8] c"I2", align 1 -@7 = private unnamed_addr constant [54 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.g", align 1 +@7 = private unnamed_addr constant [45 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceconv.g", align 1 @8 = private unnamed_addr constant [21 x i8] c"nil i2.(I2) succeeded", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [2 x i8] c"C1", align 1 @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [1 x i8] c"f", align 1 @11 = private unnamed_addr constant [17 x i8] c"C1 i1.(I0) failed", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [17 x i8] c"C1 i1.(I1) failed", align 1 @13 = private unnamed_addr constant [20 x i8] c"C1 i1.(I2) succeeded", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" = linkonce global ptr null, align 8 @14 = private unnamed_addr constant [2 x i8] c"C2", align 1 @15 = private unnamed_addr constant [1 x i8] c"g", align 1 @16 = private unnamed_addr constant [17 x i8] c"C2 i1.(I0) failed", align 1 @@ -45,59 +45,59 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv" @20 = private unnamed_addr constant [17 x i8] c"C1 I1(i1) was nil", align 1 @21 = private unnamed_addr constant [4 x i8] c"pass", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" %0) { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1.f"(%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" %0) { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", ptr %0, align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", ptr %0, align 1 + call void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1.f"(%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %0) { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.f"(%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" %0) { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.g"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %0) { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.g"(%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" %0) { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", ptr %0, align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", ptr %0, align 1 + call void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.f"(%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", ptr %0, align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.g"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", ptr %0, align 1 + call void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.g"(%"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.main"() { _llgo_0: - %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8 + %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I0", align 8 br i1 true, label %_llgo_23, label %_llgo_24 _llgo_1: ; preds = %_llgo_25 @@ -111,7 +111,7 @@ _llgo_1: ; preds = %_llgo_25 _llgo_2: ; preds = %_llgo_25 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) - %6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8 + %6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 br i1 true, label %_llgo_26, label %_llgo_27 _llgo_3: ; preds = %_llgo_28 @@ -125,7 +125,7 @@ _llgo_3: ; preds = %_llgo_28 _llgo_4: ; preds = %_llgo_28 %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) - %12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8 + %12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 br i1 true, label %_llgo_29, label %_llgo_30 _llgo_5: ; preds = %_llgo_31 @@ -145,19 +145,19 @@ _llgo_6: ; preds = %_llgo_31 %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0 %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %21, ptr null, 1 %23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) - %24 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + %24 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %24, ptr %23) %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %25, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %26, ptr null, 1 - %28 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8 + %28 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %29, align 1 - %30 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + store %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %29, align 1 + %30 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %30, ptr %28) %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %31, 0 %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %32, ptr %29, 1 %34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %33) - %35 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8 + %35 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I0", align 8 %36 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %35, ptr %34) br i1 %36, label %_llgo_32, label %_llgo_33 @@ -172,7 +172,7 @@ _llgo_7: ; preds = %_llgo_34 _llgo_8: ; preds = %_llgo_34 %41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %33) - %42 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8 + %42 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 br i1 true, label %_llgo_35, label %_llgo_36 _llgo_9: ; preds = %_llgo_37 @@ -186,7 +186,7 @@ _llgo_9: ; preds = %_llgo_37 _llgo_10: ; preds = %_llgo_37 %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %33) - %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8 + %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 %49 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %48, ptr %47) br i1 %49, label %_llgo_38, label %_llgo_39 @@ -200,15 +200,15 @@ _llgo_11: ; preds = %_llgo_40 unreachable _llgo_12: ; preds = %_llgo_40 - %54 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", align 8 + %54 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" zeroinitializer, ptr %55, align 1 - %56 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + store %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" zeroinitializer, ptr %55, align 1 + %56 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 %57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %56, ptr %54) %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %57, 0 %59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %58, ptr %55, 1 %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %59) - %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8 + %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I0", align 8 %62 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %61, ptr %60) br i1 %62, label %_llgo_41, label %_llgo_42 @@ -223,7 +223,7 @@ _llgo_13: ; preds = %_llgo_43 _llgo_14: ; preds = %_llgo_43 %67 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %59) - %68 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8 + %68 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 br i1 true, label %_llgo_44, label %_llgo_45 _llgo_15: ; preds = %_llgo_46 @@ -237,7 +237,7 @@ _llgo_15: ; preds = %_llgo_46 _llgo_16: ; preds = %_llgo_46 %73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %59) - %74 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8 + %74 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 %75 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %74, ptr %73) br i1 %75, label %_llgo_47, label %_llgo_48 @@ -251,10 +251,10 @@ _llgo_17: ; preds = %_llgo_49 unreachable _llgo_18: ; preds = %_llgo_49 - %80 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8 + %80 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %81, align 1 - %82 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + store %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %81, align 1 + %82 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 %83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %82, ptr %80) %84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %83, 0 %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %84, ptr %81, 1 @@ -368,7 +368,7 @@ _llgo_37: ; preds = %_llgo_36, %_llgo_35 _llgo_38: ; preds = %_llgo_10 %129 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %33, 1 - %130 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 + %130 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 %131 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %130, ptr %47) %132 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %131, 0 %133 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %132, ptr %129, 1 @@ -418,7 +418,7 @@ _llgo_46: ; preds = %_llgo_45, %_llgo_44 _llgo_47: ; preds = %_llgo_16 %152 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %59, 1 - %153 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 + %153 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 %154 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %153, ptr %73) %155 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %154, 0 %156 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %155, ptr %152, 1 @@ -436,15 +436,15 @@ _llgo_49: ; preds = %_llgo_48, %_llgo_47 br i1 %161, label %_llgo_18, label %_llgo_17 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceconv.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 2 }) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 2 }) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I0", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I0", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -469,13 +469,13 @@ _llgo_5: ; preds = %_llgo_4 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }) - %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8 + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }) + %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 %12 = icmp eq ptr %11, null br i1 %12, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - store ptr %10, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8 + store ptr %10, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 @@ -502,7 +502,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 br i1 %12, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %24, 1 + %25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef }, ptr %24, 1 %26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) %27 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %26, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %25, ptr %27, align 8 @@ -513,13 +513,13 @@ _llgo_11: ; preds = %_llgo_10 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 }) - %32 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8 + %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 }) + %32 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 %33 = icmp eq ptr %32, null br i1 %33, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - store ptr %31, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8 + store ptr %31, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 @@ -528,8 +528,8 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12 br i1 %33, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %36 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %34, 1 - %37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef }, ptr %35, 1 + %36 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef }, ptr %34, 1 + %37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef }, ptr %35, 1 %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) %39 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %38, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %36, ptr %39, align 8 @@ -543,22 +543,22 @@ _llgo_15: ; preds = %_llgo_14 _llgo_16: ; preds = %_llgo_15, %_llgo_14 %44 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %44, 1 + %45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef }, ptr %44, 1 %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) %47 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %46, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %45, ptr %47, align 8 %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0 %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 1, 1 %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 1, 2 - %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50) - store ptr %51, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 - %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 2 }, i64 25, i64 0, i64 1, i64 1) - %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8 + %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50) + store ptr %51, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 2 }, i64 25, i64 0, i64 1, i64 1) + %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 %54 = icmp eq ptr %53, null br i1 %54, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - store ptr %52, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8 + store ptr %52, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 @@ -566,19 +566,19 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0 %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 0, 1 %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, i64 0, 2 - %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58) + %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58) store ptr %59, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 %60 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 br i1 %54, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 %61 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %61, 1 - %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f", 2 - %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f", 3 - %65 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %61, 1 - %66 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %65, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f", 2 - %67 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %66, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1.f", 3 + %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %61, 1 + %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 2 + %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 3 + %65 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %61, 1 + %66 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %65, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 2 + %67 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %66, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1.f", 3 %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %69 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %68, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %67, ptr %69, align 8 @@ -597,8 +597,8 @@ _llgo_19: ; preds = %_llgo_18 _llgo_20: ; preds = %_llgo_19, %_llgo_18 %78 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %79 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %80 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %78, 1 - %81 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef }, ptr %79, 1 + %80 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef }, ptr %78, 1 + %81 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef }, ptr %79, 1 %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) %83 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %82, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %80, ptr %83, align 8 @@ -607,15 +607,15 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %82, 0 %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, i64 2, 1 %87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 2, 2 - %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87) - store ptr %88, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 - %89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2) - %90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", align 8 + %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87) + store ptr %88, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 + %89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2) + %90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 %91 = icmp eq ptr %90, null br i1 %91, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - store ptr %89, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", align 8 + store ptr %89, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 @@ -624,19 +624,19 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20 _llgo_23: ; preds = %_llgo_22 %93 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1 - %95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f", 2 - %96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f", 3 - %97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1 - %98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f", 2 - %99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.f", 3 + %94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1 + %95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 2 + %96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 3 + %97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1 + %98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 2 + %99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.f", 3 %100 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1 - %102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g", 2 - %103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %102, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g", 3 - %104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1 - %105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g", 2 - %106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.g", 3 + %101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1 + %102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 2 + %103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %102, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 3 + %104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1 + %105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 2 + %106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.g", 3 %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) %108 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %107, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %99, ptr %108, align 8 diff --git a/compiler/cl/_testgo/ifaceprom/in.go b/cl/_testgo/ifaceprom/in.go similarity index 100% rename from compiler/cl/_testgo/ifaceprom/in.go rename to cl/_testgo/ifaceprom/in.go diff --git a/compiler/cl/_testgo/ifaceprom/out.ll b/cl/_testgo/ifaceprom/out.ll similarity index 81% rename from compiler/cl/_testgo/ifaceprom/out.ll rename to cl/_testgo/ifaceprom/out.ll index f593c396..35f08aa1 100644 --- a/compiler/cl/_testgo/ifaceprom/out.ll +++ b/cl/_testgo/ifaceprom/out.ll @@ -1,41 +1,41 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/ifaceprom' +source_filename = "github.com/goplus/llgo/cl/_testgo/ifaceprom" -%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } +%"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" = type {} +%"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" = type {} %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } -@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/ifaceprom.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [3 x i8] c"two", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" = linkonce global ptr null, align 8 -@1 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" = linkonce global ptr null, align 8 +@1 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceprom", align 1 @2 = private unnamed_addr constant [4 x i8] c"impl", align 1 @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [3 x i8] c"one", align 1 -@4 = private unnamed_addr constant [56 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one", align 1 +@4 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceprom.one", align 1 @_llgo_int = linkonce global ptr null, align 8 @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 -@5 = private unnamed_addr constant [56 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two", align 1 +@5 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceprom.two", align 1 @_llgo_string = linkonce global ptr null, align 8 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [1 x i8] c"I", align 1 -@7 = private unnamed_addr constant [134 x i8] c"type assertion github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I -> github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I failed", align 1 +@7 = private unnamed_addr constant [116 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/ifaceprom.I -> github.com/goplus/llgo/cl/_testgo/ifaceprom.I failed", align 1 @8 = private unnamed_addr constant [4 x i8] c"pass", align 1 -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S.one"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.S.one"(%"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", align 8 call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %1, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3) %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3, 0 @@ -49,12 +49,12 @@ _llgo_0: ret i64 %12 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S.two"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/ifaceprom.S.two"(%"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", align 8 call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %1, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3) %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3, 0 @@ -68,9 +68,9 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %12 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*S).one"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*S).one"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %1, align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2) %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, 0 @@ -84,9 +84,9 @@ _llgo_0: ret i64 %11 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*S).two"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*S).two"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %1, align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2) %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, 0 @@ -100,60 +100,60 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %11 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.one"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl.one"(%"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" %0) { _llgo_0: ret i64 1 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.two"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl.two"(%"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" %0) { _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 } } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).one"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", ptr %0, align 1 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.one"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl", ptr %0, align 1 + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl.one"(%"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" %1) ret i64 %2 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).two"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", ptr %0, align 1 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.two"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl", ptr %0, align 1 + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl.two"(%"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" %1) ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceprom.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/ifaceprom.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceprom.main"() { _llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", align 8 + %0 = alloca %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", align 8 call void @llvm.memset(ptr %0, i8 0, i64 16, i1 false) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", align 8 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.impl", align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" zeroinitializer, ptr %3, align 1 + store %"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" zeroinitializer, ptr %3, align 1 %4 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %6 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %6 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %6, ptr %2) %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %7, 0 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, ptr %3, 1 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9, ptr %1, align 8 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 %11 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %10, align 8 %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %11) %13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, 0 @@ -176,8 +176,8 @@ _llgo_1: ; preds = %_llgo_0 unreachable _llgo_2: ; preds = %_llgo_0 - %26 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %27 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %26, 0 + %26 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %27 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %26, 0 %28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %27) %29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %27, 0 %30 = getelementptr ptr, ptr %29, i64 3 @@ -199,10 +199,10 @@ _llgo_3: ; preds = %_llgo_2 unreachable _llgo_4: ; preds = %_llgo_2 - %42 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %42 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 %43 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %42, align 8 %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %43) - %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8 + %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 br i1 true, label %_llgo_17, label %_llgo_18 _llgo_5: ; preds = %_llgo_17 @@ -214,10 +214,10 @@ _llgo_5: ; preds = %_llgo_17 unreachable _llgo_6: ; preds = %_llgo_17 - %50 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %51 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %50, 0 + %50 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %51 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %50, 0 %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %51) - %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8 + %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 br i1 true, label %_llgo_19, label %_llgo_20 _llgo_7: ; preds = %_llgo_19 @@ -229,7 +229,7 @@ _llgo_7: ; preds = %_llgo_19 unreachable _llgo_8: ; preds = %_llgo_19 - %58 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %58 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 %59 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %58, align 8 %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %59) %61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %59, 0 @@ -254,8 +254,8 @@ _llgo_9: ; preds = %_llgo_8 unreachable _llgo_10: ; preds = %_llgo_8 - %75 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %76 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %75, 0 + %75 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %76 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %75, 0 %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %76) %78 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %76, 0 %79 = getelementptr ptr, ptr %78, i64 4 @@ -279,10 +279,10 @@ _llgo_11: ; preds = %_llgo_10 unreachable _llgo_12: ; preds = %_llgo_10 - %92 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %92 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 %93 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %92, align 8 %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %93) - %95 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8 + %95 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 br i1 true, label %_llgo_21, label %_llgo_22 _llgo_13: ; preds = %_llgo_21 @@ -295,10 +295,10 @@ _llgo_13: ; preds = %_llgo_21 unreachable _llgo_14: ; preds = %_llgo_21 - %100 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %101 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %100, 0 + %100 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %101 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %100, 0 %102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %101) - %103 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8 + %103 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 br i1 true, label %_llgo_23, label %_llgo_24 _llgo_15: ; preds = %_llgo_23 @@ -319,7 +319,7 @@ _llgo_17: ; preds = %_llgo_4 %108 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) %109 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %108, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %43, ptr %109, align 8 - %110 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one$bound", ptr undef }, ptr %108, 1 + %110 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.one$bound", ptr undef }, ptr %108, 1 %111 = extractvalue { ptr, ptr } %110, 1 %112 = extractvalue { ptr, ptr } %110, 0 %113 = call i64 %112(ptr %111) @@ -329,7 +329,7 @@ _llgo_17: ; preds = %_llgo_4 _llgo_18: ; preds = %_llgo_4 %115 = load ptr, ptr @_llgo_string, align 8 %116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 134 }, ptr %116, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %116, align 8 %117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %115, 0 %118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %117, ptr %116, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %118) @@ -339,7 +339,7 @@ _llgo_19: ; preds = %_llgo_6 %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) %120 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %119, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %51, ptr %120, align 8 - %121 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one$bound", ptr undef }, ptr %119, 1 + %121 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.one$bound", ptr undef }, ptr %119, 1 %122 = extractvalue { ptr, ptr } %121, 1 %123 = extractvalue { ptr, ptr } %121, 0 %124 = call i64 %123(ptr %122) @@ -349,7 +349,7 @@ _llgo_19: ; preds = %_llgo_6 _llgo_20: ; preds = %_llgo_6 %126 = load ptr, ptr @_llgo_string, align 8 %127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 134 }, ptr %127, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %127, align 8 %128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %126, 0 %129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %128, ptr %127, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %129) @@ -359,7 +359,7 @@ _llgo_21: ; preds = %_llgo_12 %130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) %131 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %130, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %93, ptr %131, align 8 - %132 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two$bound", ptr undef }, ptr %130, 1 + %132 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.two$bound", ptr undef }, ptr %130, 1 %133 = extractvalue { ptr, ptr } %132, 1 %134 = extractvalue { ptr, ptr } %132, 0 %135 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %134(ptr %133) @@ -370,7 +370,7 @@ _llgo_21: ; preds = %_llgo_12 _llgo_22: ; preds = %_llgo_12 %138 = load ptr, ptr @_llgo_string, align 8 %139 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 134 }, ptr %139, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %139, align 8 %140 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %138, 0 %141 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %140, ptr %139, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %141) @@ -380,7 +380,7 @@ _llgo_23: ; preds = %_llgo_14 %142 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) %143 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %142, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %101, ptr %143, align 8 - %144 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two$bound", ptr undef }, ptr %142, 1 + %144 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.two$bound", ptr undef }, ptr %142, 1 %145 = extractvalue { ptr, ptr } %144, 1 %146 = extractvalue { ptr, ptr } %144, 0 %147 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %146(ptr %145) @@ -391,7 +391,7 @@ _llgo_23: ; preds = %_llgo_14 _llgo_24: ; preds = %_llgo_14 %150 = load ptr, ptr @_llgo_string, align 8 %151 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 134 }, ptr %151, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %151, align 8 %152 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %150, 0 %153 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %152, ptr %151, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %153) @@ -403,15 +403,15 @@ declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") -define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/ifaceprom.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 }, i64 25, i64 0, i64 2, i64 2) - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 }, i64 25, i64 0, i64 2, i64 2) + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.impl", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1, 0 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, i64 0, 1 %4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, i64 0, 2 - %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4) + %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4) store ptr %5, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 %6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 %7 = load ptr, ptr @_llgo_int, align 8 @@ -448,12 +448,12 @@ _llgo_3: ; preds = %_llgo_2 _llgo_4: ; preds = %_llgo_3, %_llgo_2 %24 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1 - %26 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %25, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one", 2 - %27 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %26, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one", 3 - %28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1 - %29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one", 2 - %30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.one", 3 + %25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1 + %26 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %25, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).one", 2 + %27 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %26, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).one", 3 + %28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1 + %29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).one", 2 + %30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl.one", 3 %31 = load ptr, ptr @_llgo_string, align 8 %32 = icmp eq ptr %31, null br i1 %32, label %_llgo_5, label %_llgo_6 @@ -488,12 +488,12 @@ _llgo_7: ; preds = %_llgo_6 _llgo_8: ; preds = %_llgo_7, %_llgo_6 %48 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %49 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1 - %50 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %49, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two", 2 - %51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %50, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two", 3 - %52 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1 - %53 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %52, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two", 2 - %54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %53, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.two", 3 + %49 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1 + %50 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %49, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).two", 2 + %51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %50, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).two", 3 + %52 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1 + %53 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %52, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.(*impl).two", 2 + %54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %53, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl.two", 3 %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) %56 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %55, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %56, align 8 @@ -513,8 +513,8 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %6, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66) %67 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %68 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef }, ptr %67, 1 - %70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef }, ptr %68, 1 + %69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef }, ptr %67, 1 + %70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef }, ptr %68, 1 %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) %72 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %69, ptr %72, align 8 @@ -523,15 +523,15 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %71, 0 %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 2, 1 %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 2 - %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76) - store ptr %77, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }) - %79 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8 + %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76) + store ptr %77, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }) + %79 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 %80 = icmp eq ptr %79, null br i1 %80, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - store ptr %78, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8 + store ptr %78, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 @@ -540,8 +540,8 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 br i1 %80, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef }, ptr %81, 1 - %84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef }, ptr %82, 1 + %83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef }, ptr %81, 1 + %84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef }, ptr %82, 1 %85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) %86 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %85, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %83, ptr %86, align 8 @@ -585,7 +585,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface" declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one$bound"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.one$bound"(ptr %0) { _llgo_0: %1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %0, align 8 %2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %1, 0 @@ -603,7 +603,7 @@ _llgo_0: declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two$bound"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/ifaceprom.two$bound"(ptr %0) { _llgo_0: %1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %0, align 8 %2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %1, 0 diff --git a/compiler/cl/_testgo/indexerr/in.go b/cl/_testgo/indexerr/in.go similarity index 100% rename from compiler/cl/_testgo/indexerr/in.go rename to cl/_testgo/indexerr/in.go diff --git a/compiler/cl/_testgo/indexerr/out.ll b/cl/_testgo/indexerr/out.ll similarity index 100% rename from compiler/cl/_testgo/indexerr/out.ll rename to cl/_testgo/indexerr/out.ll diff --git a/compiler/cl/_testgo/interface/in.go b/cl/_testgo/interface/in.go similarity index 85% rename from compiler/cl/_testgo/interface/in.go rename to cl/_testgo/interface/in.go index 600008ce..ccfeb4c3 100644 --- a/compiler/cl/_testgo/interface/in.go +++ b/cl/_testgo/interface/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/compiler/cl/_testdata/foo" + "github.com/goplus/llgo/cl/_testdata/foo" ) type Game1 struct { diff --git a/compiler/cl/_testgo/interface/out.ll b/cl/_testgo/interface/out.ll similarity index 74% rename from compiler/cl/_testgo/interface/out.ll rename to cl/_testgo/interface/out.ll index 39597c8e..6effe6db 100644 --- a/compiler/cl/_testgo/interface/out.ll +++ b/cl/_testgo/interface/out.ll @@ -1,7 +1,7 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/interface' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/interface" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/interface' +source_filename = "github.com/goplus/llgo/cl/_testgo/interface" -%"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" = type { ptr } +%"github.com/goplus/llgo/cl/_testgo/interface.Game1" = type { ptr } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } @@ -10,106 +10,106 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/interface" %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/interface.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/interface", align 1 +@"github.com/goplus/llgo/cl/_testgo/interface.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/_testgo/interface", align 1 @1 = private unnamed_addr constant [5 x i8] c"Game1", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game" = linkonce global ptr null, align 8 -@2 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game" = linkonce global ptr null, align 8 +@2 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testdata/foo", align 1 @3 = private unnamed_addr constant [4 x i8] c"Game", align 1 @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [4 x i8] c"Load", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [8 x i8] c"initGame", align 1 -@6 = private unnamed_addr constant [57 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo.initGame", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game" = linkonce global ptr null, align 8 -@"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8 +@6 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/cl/_testdata/foo.initGame", align 1 +@"*_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game" = linkonce global ptr null, align 8 +@"_llgo_struct$4-TjwxozfgwR2wiuWBRPbxjG2hQENVAzi2bsR9iH62Q" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [5 x i8] c"Game2", align 1 -@8 = private unnamed_addr constant [61 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/interface.initGame", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer" = linkonce global ptr null, align 8 +@8 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/cl/_testgo/interface.initGame", align 1 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [5 x i8] c"Gamer", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [2 x i8] c"OK", align 1 @11 = private unnamed_addr constant [4 x i8] c"FAIL", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1.Load"(%"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0) { +define void @"github.com/goplus/llgo/cl/_testgo/interface.Game1.Load"(%"github.com/goplus/llgo/cl/_testgo/interface.Game1" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/interface.Game1" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/interface.Game1", ptr %1, i32 0, i32 0 %3 = load ptr, ptr %2, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load"(ptr %3) + call void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load"(ptr %3) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1.initGame"(%"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0) { +define void @"github.com/goplus/llgo/cl/_testgo/interface.Game1.initGame"(%"github.com/goplus/llgo/cl/_testgo/interface.Game1" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/interface.Game1" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/interface.Game1", ptr %1, i32 0, i32 0 %3 = load ptr, ptr %2, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame"(ptr %3) + call void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame"(ptr %3) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/interface.(*Game1).Load"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0 %2 = load ptr, ptr %1, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load"(ptr %2) + call void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load"(ptr %2) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).initGame"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/interface.(*Game1).initGame"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0 %2 = load ptr, ptr %1, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame"(ptr %2) + call void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame"(ptr %2) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game2).initGame"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/interface.(*Game2).initGame"(ptr %0) { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/interface.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/interface.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/interface.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/foo.init"() + call void @"github.com/goplus/llgo/cl/_testgo/interface.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/interface.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0) store ptr %2, ptr %1, align 8 - %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 - %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 + %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr %0, 1 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0) - %8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8 - %9 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8 + %8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2", align 8 + %9 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2", align 8 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %7, 1 %12 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 0 - %13 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8 + %13 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer", align 8 %14 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %13, ptr %12) br i1 %14, label %_llgo_3, label %_llgo_4 @@ -127,13 +127,13 @@ _llgo_1: ; preds = %_llgo_5 _llgo_2: ; preds = %_llgo_1, %_llgo_5 %23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 0 - %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8 + %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer", align 8 %25 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %24, ptr %23) br i1 %25, label %_llgo_6, label %_llgo_7 _llgo_3: ; preds = %_llgo_0 %26 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 1 - %27 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 + %27 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 %28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %27, ptr %12) %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %28, 0 %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %29, ptr %26, 1 @@ -158,7 +158,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 _llgo_6: ; preds = %_llgo_2 %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 1 - %37 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 + %37 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %37, ptr %23) %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %38, 0 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %39, ptr %36, 1 @@ -185,34 +185,34 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 -declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load"(ptr) +declare void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load"(ptr) -declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame"(ptr) +declare void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame"(ptr) -declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() +declare void @"github.com/goplus/llgo/cl/_testdata/foo.init"() declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/interface.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %0) - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2) - %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8 + %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2) + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game", align 8 %5 = icmp eq ptr %4, null br i1 %5, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - store ptr %3, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8 + store ptr %3, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game", align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 @@ -220,7 +220,7 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 0, 1 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 0, 2 - %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) store ptr %10, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 %11 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 br i1 %5, label %_llgo_5, label %_llgo_6 @@ -231,9 +231,9 @@ _llgo_5: ; preds = %_llgo_4 br i1 %13, label %_llgo_7, label %_llgo_8 _llgo_6: ; preds = %_llgo_8, %_llgo_4 - %14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8 - %15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2) - %16 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8 + %14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game", align 8 + %15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2) + %16 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game", align 8 %17 = icmp eq ptr %16, null br i1 %17, label %_llgo_9, label %_llgo_10 @@ -254,12 +254,12 @@ _llgo_7: ; preds = %_llgo_5 _llgo_8: ; preds = %_llgo_7, %_llgo_5 %27 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %27, 1 - %29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load", 2 - %30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load", 3 + %29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load", 2 + %30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load", 3 %31 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %31, 1 - %33 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %32, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2 - %34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 3 + %32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 48 }, ptr undef, ptr undef, ptr undef }, ptr %31, 1 + %33 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %32, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame", 2 + %34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame", 3 %35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) %36 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %35, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %36, align 8 @@ -274,12 +274,12 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_5 _llgo_9: ; preds = %_llgo_6 %41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %15) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %41) - store ptr %41, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8 + store ptr %41, ptr @"*_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_6 - %42 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8 - %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2) + %42 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testdata/foo.Game", align 8 + %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2) %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %43) %45 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, ptr %44, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true) %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) @@ -288,24 +288,24 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_6 %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0 %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 1, 1 %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 1, 2 - %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50) + %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %51) - store ptr %51, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8 - %52 = load ptr, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8 + store ptr %51, ptr @"_llgo_struct$4-TjwxozfgwR2wiuWBRPbxjG2hQENVAzi2bsR9iH62Q", align 8 + %52 = load ptr, ptr @"_llgo_struct$4-TjwxozfgwR2wiuWBRPbxjG2hQENVAzi2bsR9iH62Q", align 8 br i1 %2, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 %53 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1 - %55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load", 2 - %56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load", 3 + %55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"github.com/goplus/llgo/cl/_testgo/interface.(*Game1).Load", 2 + %56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"github.com/goplus/llgo/cl/_testgo/interface.(*Game1).Load", 3 %57 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1 - %58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %57, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load", 2 - %59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1.Load", 3 + %58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %57, ptr @"github.com/goplus/llgo/cl/_testgo/interface.(*Game1).Load", 2 + %59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @"github.com/goplus/llgo/cl/_testgo/interface.Game1.Load", 3 %60 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %60, 1 - %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2 - %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 3 + %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 48 }, ptr undef, ptr undef, ptr undef }, ptr %60, 1 + %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame", 2 + %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).initGame", 3 %64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %65 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %64, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr %65, align 8 @@ -324,25 +324,25 @@ _llgo_11: ; preds = %_llgo_10 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2) - %76 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + %75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2) + %76 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 %77 = icmp eq ptr %76, null br i1 %77, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %75) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %78) - store ptr %78, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8 + store ptr %78, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game1", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1) - %80 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8 + %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1) + %80 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2", align 8 %81 = icmp eq ptr %80, null br i1 %81, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - store ptr %79, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8 + store ptr %79, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2", align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 @@ -351,9 +351,9 @@ _llgo_16: ; preds = %_llgo_15, %_llgo_14 _llgo_17: ; preds = %_llgo_16 %83 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 61 }, ptr undef, ptr undef, ptr undef }, ptr %83, 1 - %85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %84, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game2).initGame", 2 - %86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game2).initGame", 3 + %84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 52 }, ptr undef, ptr undef, ptr undef }, ptr %83, 1 + %85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %84, ptr @"github.com/goplus/llgo/cl/_testgo/interface.(*Game2).initGame", 2 + %86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/cl/_testgo/interface.(*Game2).initGame", 3 %87 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %88 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %87, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %86, ptr %88, align 8 @@ -364,25 +364,25 @@ _llgo_17: ; preds = %_llgo_16 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1) - %93 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8 + %92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1) + %93 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2", align 8 %94 = icmp eq ptr %93, null br i1 %94, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 %95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %92) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %95) - store ptr %95, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8 + store ptr %95, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2", align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 5 }) - %97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8 + %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 5 }) + %97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer", align 8 %98 = icmp eq ptr %97, null br i1 %98, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - store ptr %96, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8 + store ptr %96, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 @@ -392,7 +392,7 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20 _llgo_23: ; preds = %_llgo_22 %101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %99, 1 - %102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef }, ptr %100, 1 + %102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 48 }, ptr undef }, ptr %100, 1 %103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) %104 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %103, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %101, ptr %104, align 8 @@ -408,7 +408,7 @@ _llgo_24: ; preds = %_llgo_23, %_llgo_22 %109 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %110 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %109, 1 - %112 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef }, ptr %110, 1 + %112 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 48 }, ptr undef }, ptr %110, 1 %113 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) %114 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %113, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %111, ptr %114, align 8 @@ -417,8 +417,8 @@ _llgo_24: ; preds = %_llgo_23, %_llgo_22 %116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %113, 0 %117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116, i64 2, 1 %118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %117, i64 2, 2 - %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118) - store ptr %119, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 + %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118) + store ptr %119, ptr @"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 ret void } diff --git a/compiler/cl/_testgo/invoke/in.go b/cl/_testgo/invoke/in.go similarity index 100% rename from compiler/cl/_testgo/invoke/in.go rename to cl/_testgo/invoke/in.go diff --git a/compiler/cl/_testgo/invoke/out.ll b/cl/_testgo/invoke/out.ll similarity index 77% rename from compiler/cl/_testgo/invoke/out.ll rename to cl/_testgo/invoke/out.ll index 567ea6cf..3ae5d673 100644 --- a/compiler/cl/_testgo/invoke/out.ll +++ b/cl/_testgo/invoke/out.ll @@ -1,10 +1,10 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/invoke' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/invoke" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/invoke' +source_filename = "github.com/goplus/llgo/cl/_testgo/invoke" -%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } +%"github.com/goplus/llgo/cl/_testgo/invoke.T" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" = type { i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testgo/invoke.T5" = type { i64 } +%"github.com/goplus/llgo/cl/_testgo/invoke.T6" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } @@ -12,7 +12,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/invoke" %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/invoke.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/invoke.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"invoke", align 1 @1 = private unnamed_addr constant [7 x i8] c"invoke1", align 1 @2 = private unnamed_addr constant [7 x i8] c"invoke2", align 1 @@ -21,11 +21,11 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/invoke" @5 = private unnamed_addr constant [7 x i8] c"invoke5", align 1 @6 = private unnamed_addr constant [7 x i8] c"invoke6", align 1 @7 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" = linkonce global ptr null, align 8 -@8 = private unnamed_addr constant [49 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/invoke", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T" = linkonce global ptr null, align 8 +@8 = private unnamed_addr constant [40 x i8] c"github.com/goplus/llgo/cl/_testgo/invoke", align 1 @9 = private unnamed_addr constant [1 x i8] c"T", align 1 @_llgo_string = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/invoke.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [1 x i8] c"s", align 1 @11 = private unnamed_addr constant [6 x i8] c"Invoke", align 1 @_llgo_int = linkonce global ptr null, align 8 @@ -33,49 +33,49 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/invoke" @12 = private unnamed_addr constant [6 x i8] c"Method", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1" = linkonce global ptr null, align 8 @13 = private unnamed_addr constant [2 x i8] c"T1", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2" = linkonce global ptr null, align 8 @14 = private unnamed_addr constant [2 x i8] c"T2", align 1 @_llgo_float64 = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3" = linkonce global ptr null, align 8 @15 = private unnamed_addr constant [2 x i8] c"T3", align 1 @_llgo_int8 = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4" = linkonce global ptr null, align 8 @16 = private unnamed_addr constant [2 x i8] c"T4", align 1 @"[1]_llgo_int" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5" = linkonce global ptr null, align 8 @17 = private unnamed_addr constant [2 x i8] c"T5", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8 @18 = private unnamed_addr constant [1 x i8] c"n", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6" = linkonce global ptr null, align 8 @19 = private unnamed_addr constant [2 x i8] c"T6", align 1 @_llgo_Pointer = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s" = linkonce global ptr null, align 8 @20 = private unnamed_addr constant [2 x i8] c"$f", align 1 @21 = private unnamed_addr constant [5 x i8] c"$data", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6" = linkonce global ptr null, align 8 @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI" = linkonce global ptr null, align 8 @22 = private unnamed_addr constant [5 x i8] c"world", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.I" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I" = linkonce global ptr null, align 8 @23 = private unnamed_addr constant [1 x i8] c"I", align 1 -@24 = private unnamed_addr constant [80 x i8] c"type assertion any -> github.com/goplus/llgo/compiler/cl/_testgo/invoke.I failed", align 1 +@24 = private unnamed_addr constant [71 x i8] c"type assertion any -> github.com/goplus/llgo/cl/_testgo/invoke.I failed", align 1 @_llgo_any = linkonce global ptr null, align 8 @25 = private unnamed_addr constant [32 x i8] c"type assertion any -> any failed", align 1 @26 = private unnamed_addr constant [52 x i8] c"type assertion any -> interface{Invoke() int} failed", align 1 -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T.Invoke"(%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/invoke.T" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %1, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, align 8 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -84,19 +84,19 @@ _llgo_0: ret i64 0 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Invoke"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", ptr %0, align 8 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T.Invoke"(%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %0, align 8 + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T" %1) ret i64 %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Method"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Method"(ptr %0) { _llgo_0: ret void } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1.Invoke"(i64 %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T1.Invoke"(i64 %0) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -105,14 +105,14 @@ _llgo_0: ret i64 1 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T1).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T1).Invoke"(ptr %0) { _llgo_0: %1 = load i64, ptr %0, align 4 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1.Invoke"(i64 %1) + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T1.Invoke"(i64 %1) ret i64 %2 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2.Invoke"(double %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T2.Invoke"(double %0) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 7 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -121,14 +121,14 @@ _llgo_0: ret i64 2 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T2).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T2).Invoke"(ptr %0) { _llgo_0: %1 = load double, ptr %0, align 8 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2.Invoke"(double %1) + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T2.Invoke"(double %1) ret i64 %2 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T3).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T3).Invoke"(ptr %0) { _llgo_0: %1 = load i8, ptr %0, align 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 }) @@ -139,7 +139,7 @@ _llgo_0: ret i64 3 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4.Invoke"([1 x i64] %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T4.Invoke"([1 x i64] %0) { _llgo_0: %1 = alloca [1 x i64], align 8 call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) @@ -153,19 +153,19 @@ _llgo_0: ret i64 4 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T4).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T4).Invoke"(ptr %0) { _llgo_0: %1 = load [1 x i64], ptr %0, align 4 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4.Invoke"([1 x i64] %1) + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T4.Invoke"([1 x i64] %1) ret i64 %2 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5.Invoke"(%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T5.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T5" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" %0, ptr %1, align 4 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/invoke.T5" %0, ptr %1, align 4 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T5", ptr %1, i32 0, i32 0 %3 = load i64, ptr %2, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -174,17 +174,17 @@ _llgo_0: ret i64 5 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T5).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T5).Invoke"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", ptr %0, align 4 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5.Invoke"(%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T5", ptr %0, align 4 + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T5.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T5" %1) ret i64 %2 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6.Invoke"(%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T6.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T6" %0) { _llgo_0: - %1 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" %0, 1 - %2 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" %0, 0 + %1 = extractvalue %"github.com/goplus/llgo/cl/_testgo/invoke.T6" %0, 1 + %2 = extractvalue %"github.com/goplus/llgo/cl/_testgo/invoke.T6" %0, 0 %3 = call i64 %2(ptr %1) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -193,28 +193,28 @@ _llgo_0: ret i64 6 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T6).Invoke"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.(*T6).Invoke"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", ptr %0, align 8 - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6.Invoke"(%"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T6", ptr %0, align 8 + %2 = call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T6.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T6" %1) ret i64 %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/invoke.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { +define void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) %2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 0 @@ -230,10 +230,10 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/invoke.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %0, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, ptr %1, align 8 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store i64 100, ptr %2, align 4 @@ -245,107 +245,107 @@ _llgo_0: %6 = getelementptr inbounds i64, ptr %5, i64 0 store i64 200, ptr %6, align 4 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", ptr %7, i32 0, i32 0 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T5", ptr %7, i32 0, i32 0 store i64 300, ptr %8, align 4 %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/invoke.main$1", ptr null }, ptr %9, align 8 - %10 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", ptr %0, align 8 - %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + store %"github.com/goplus/llgo/cl/_testgo/invoke.T6" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/invoke.main$1", ptr null }, ptr %9, align 8 + %10 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %0, align 8 + %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" %10, ptr %12, align 8 + store %"github.com/goplus/llgo/cl/_testgo/invoke.T" %10, ptr %12, align 8 %13 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %14 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %14, ptr %11) %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %15, 0 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %16, ptr %12, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %17) - %18 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %17) + %18 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %19 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %18) %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %20, 0 %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21, ptr %0, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %22) + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %22) %23 = load i64, ptr %2, align 4 - %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1", align 8 + %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 %25 = inttoptr i64 %23 to ptr %26 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %26, ptr %24) %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %27, 0 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %28, ptr %25, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %29) - %30 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %29) + %30 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 %31 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %31, ptr %30) %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %32, 0 %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %33, ptr %2, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %34) + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %34) %35 = load double, ptr %3, align 8 - %36 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2", align 8 + %36 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 %37 = bitcast double %35 to i64 %38 = inttoptr i64 %37 to ptr %39 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %39, ptr %36) %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %40, 0 %42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %41, ptr %38, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %42) - %43 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %42) + %43 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 %44 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %45 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %44, ptr %43) %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %45, 0 %47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %46, ptr %3, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %47) - %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3", align 8 - %49 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %47) + %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 + %49 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 %50 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %50, ptr %49) %52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %51, 0 %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %52, ptr %4, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %53) + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %53) %54 = load [1 x i64], ptr %5, align 4 - %55 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4", align 8 + %55 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 %56 = extractvalue [1 x i64] %54, 0 %57 = inttoptr i64 %56 to ptr %58 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %58, ptr %55) %60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %59, 0 %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %60, ptr %57, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %61) - %62 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %61) + %62 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 %63 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %63, ptr %62) %65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %64, 0 %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %65, ptr %5, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %66) - %67 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", ptr %7, align 4 - %68 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 - %69 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5" %67, 0 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %66) + %67 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T5", ptr %7, align 4 + %68 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + %69 = extractvalue %"github.com/goplus/llgo/cl/_testgo/invoke.T5" %67, 0 %70 = inttoptr i64 %69 to ptr %71 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %71, ptr %68) %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %72, 0 %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %73, ptr %70, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %74) - %75 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %74) + %75 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 %76 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %76, ptr %75) %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %77, 0 %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %78, ptr %7, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %79) - %80 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", ptr %9, align 8 - %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %79) + %80 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T6", ptr %9, align 8 + %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6" %80, ptr %82, align 8 + store %"github.com/goplus/llgo/cl/_testgo/invoke.T6" %80, ptr %82, align 8 %83 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %83, ptr %81) %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %84, 0 %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %85, ptr %82, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %86) - %87 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %86) + %87 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 %88 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %88, ptr %87) %90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %89, 0 %91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %90, ptr %9, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %91) + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %91) %92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) %93 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %93, ptr %92) @@ -355,7 +355,7 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %97 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + %97 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %98 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %99 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %100 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 @@ -368,19 +368,19 @@ _llgo_0: %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %106, ptr %104) %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %107, 0 %109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %108, ptr %105, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %109) - %110 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %109) + %110 = alloca %"github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 call void @llvm.memset(ptr %110, i8 0, i64 16, i1 false) - %111 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", ptr %110, i32 0, i32 0 + %111 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %110, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }, ptr %111, align 8 - %112 = load %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", ptr %110, align 8 - %113 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + %112 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %110, align 8 + %113 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %114 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T" %112, ptr %114, align 8 + store %"github.com/goplus/llgo/cl/_testgo/invoke.T" %112, ptr %114, align 8 %115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %113, 0 %116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %115, ptr %114, 1 %117 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 0 - %118 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.I", align 8 + %118 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 %119 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %118, ptr %117) br i1 %119, label %_llgo_1, label %_llgo_2 @@ -390,7 +390,7 @@ _llgo_1: ; preds = %_llgo_0 %122 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %121, ptr %117) %123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %122, 0 %124 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %123, ptr %120, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %124) + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %124) %125 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 0 %126 = load ptr, ptr @_llgo_any, align 8 br i1 true, label %_llgo_3, label %_llgo_4 @@ -398,7 +398,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %127 = load ptr, ptr @_llgo_string, align 8 %128 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 80 }, ptr %128, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 71 }, ptr %128, align 8 %129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %127, 0 %130 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %129, ptr %128, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %130) @@ -425,7 +425,7 @@ _llgo_5: ; preds = %_llgo_3 %140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %139, ptr %131) %141 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %140, 0 %142 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %141, ptr %138, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %142) + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %142) ret void _llgo_6: ; preds = %_llgo_3 @@ -438,7 +438,7 @@ _llgo_6: ; preds = %_llgo_3 unreachable } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.main$1"() { +define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.main$1"() { _llgo_0: ret i64 400 } @@ -458,21 +458,21 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"gi declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/invoke.main$1"(ptr %0) { +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/invoke.main$1"(ptr %0) { _llgo_0: - %1 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.main$1"() + %1 = tail call i64 @"github.com/goplus/llgo/cl/_testgo/invoke.main$1"() ret i64 %1 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/invoke.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 16, i64 1, i64 2) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 16, i64 1, i64 2) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -495,9 +495,9 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %9, 0 %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11, i64 1, 1 %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %12, i64 1, 2 - %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13) - store ptr %14, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %15 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13) + store ptr %14, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %15 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 br i1 %2, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 @@ -542,11 +542,11 @@ _llgo_9: ; preds = %_llgo_8 _llgo_10: ; preds = %_llgo_9, %_llgo_8 %36 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %36, 1 - %38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %37, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Invoke", 2 - %39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Invoke", 3 + %38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %37, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Invoke", 2 + %39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Invoke", 3 %40 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %36, 1 - %41 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %40, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Invoke", 2 - %42 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %41, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T.Invoke", 3 + %41 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %40, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Invoke", 2 + %42 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %41, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.T.Invoke", 3 %43 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %44 = icmp eq ptr %43, null br i1 %44, label %_llgo_11, label %_llgo_12 @@ -568,8 +568,8 @@ _llgo_11: ; preds = %_llgo_10 _llgo_12: ; preds = %_llgo_11, %_llgo_10 %54 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %54, 1 - %56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Method", 2 - %57 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %56, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T).Method", 3 + %56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Method", 2 + %57 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %56, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T).Method", 3 %58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %59 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %58, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %42, ptr %59, align 8 @@ -595,30 +595,30 @@ _llgo_13: ; preds = %_llgo_6 %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %70, 0 %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 1, 1 %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 1, 2 - %75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74) + %75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74) store ptr %75, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_6 - %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 16, i64 1, i64 2) - %77 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 16, i64 1, i64 2) + %77 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %78 = icmp eq ptr %77, null br i1 %78, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %76) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %79) - store ptr %79, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T", align 8 + store ptr %79, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %80 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 2 }, i64 2, i64 8, i64 1, i64 1) - %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1", align 8 + %80 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 2 }, i64 2, i64 8, i64 1, i64 1) + %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 %82 = icmp eq ptr %81, null br i1 %82, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - store ptr %80, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1", align 8 + store ptr %80, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 @@ -628,11 +628,11 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 _llgo_19: ; preds = %_llgo_18 %84 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %84, 1 - %86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T1).Invoke", 2 - %87 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %86, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T1).Invoke", 3 + %86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T1).Invoke", 2 + %87 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %86, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T1).Invoke", 3 %88 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %84, 1 - %89 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %88, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T1).Invoke", 2 - %90 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %89, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1.Invoke", 3 + %89 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %88, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T1).Invoke", 2 + %90 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %89, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.T1.Invoke", 3 %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %92 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %91, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %90, ptr %92, align 8 @@ -649,25 +649,25 @@ _llgo_19: ; preds = %_llgo_18 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 2 }, i64 2, i64 8, i64 1, i64 1) - %102 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1", align 8 + %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 2 }, i64 2, i64 8, i64 1, i64 1) + %102 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 %103 = icmp eq ptr %102, null br i1 %103, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %101) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %104) - store ptr %104, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T1", align 8 + store ptr %104, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 14, i64 8, i64 1, i64 1) - %106 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2", align 8 + %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 14, i64 8, i64 1, i64 1) + %106 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 %107 = icmp eq ptr %106, null br i1 %107, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - store ptr %105, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2", align 8 + store ptr %105, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 @@ -687,11 +687,11 @@ _llgo_26: ; preds = %_llgo_25, %_llgo_24 _llgo_27: ; preds = %_llgo_26 %112 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %113 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %112, 1 - %114 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %113, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T2).Invoke", 2 - %115 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %114, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T2).Invoke", 3 + %114 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %113, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T2).Invoke", 2 + %115 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %114, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T2).Invoke", 3 %116 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %112, 1 - %117 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %116, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T2).Invoke", 2 - %118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %117, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2.Invoke", 3 + %117 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %116, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T2).Invoke", 2 + %118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %117, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.T2.Invoke", 3 %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %120 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %119, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %118, ptr %120, align 8 @@ -708,25 +708,25 @@ _llgo_27: ; preds = %_llgo_26 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 14, i64 8, i64 1, i64 1) - %130 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2", align 8 + %129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 14, i64 8, i64 1, i64 1) + %130 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 %131 = icmp eq ptr %130, null br i1 %131, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 %132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %129) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %132) - store ptr %132, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T2", align 8 + store ptr %132, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 3, i64 1, i64 0, i64 1) - %134 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3", align 8 + %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 3, i64 1, i64 0, i64 1) + %134 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 %135 = icmp eq ptr %134, null br i1 %135, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - store ptr %133, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3", align 8 + store ptr %133, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 @@ -746,8 +746,8 @@ _llgo_34: ; preds = %_llgo_33, %_llgo_32 _llgo_35: ; preds = %_llgo_34 %140 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %141 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %140, 1 - %142 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %141, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T3).Invoke", 2 - %143 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %142, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T3).Invoke", 3 + %142 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %141, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T3).Invoke", 2 + %143 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %142, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T3).Invoke", 3 %144 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %145 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %144, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %143, ptr %145, align 8 @@ -758,25 +758,25 @@ _llgo_35: ; preds = %_llgo_34 br label %_llgo_36 _llgo_36: ; preds = %_llgo_35, %_llgo_34 - %149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 3, i64 1, i64 0, i64 1) - %150 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3", align 8 + %149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 3, i64 1, i64 0, i64 1) + %150 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 %151 = icmp eq ptr %150, null br i1 %151, label %_llgo_37, label %_llgo_38 _llgo_37: ; preds = %_llgo_36 %152 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %149) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %152) - store ptr %152, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T3", align 8 + store ptr %152, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %153 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 17, i64 8, i64 1, i64 1) - %154 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4", align 8 + %153 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 17, i64 8, i64 1, i64 1) + %154 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 %155 = icmp eq ptr %154, null br i1 %155, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - store ptr %153, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4", align 8 + store ptr %153, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 @@ -797,11 +797,11 @@ _llgo_42: ; preds = %_llgo_41, %_llgo_40 _llgo_43: ; preds = %_llgo_42 %161 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %161, 1 - %163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %162, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T4).Invoke", 2 - %164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T4).Invoke", 3 + %163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %162, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T4).Invoke", 2 + %164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T4).Invoke", 3 %165 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %161, 1 - %166 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %165, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T4).Invoke", 2 - %167 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %166, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4.Invoke", 3 + %166 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %165, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T4).Invoke", 2 + %167 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %166, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.T4.Invoke", 3 %168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %169 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %168, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %167, ptr %169, align 8 @@ -818,25 +818,25 @@ _llgo_43: ; preds = %_llgo_42 br label %_llgo_44 _llgo_44: ; preds = %_llgo_43, %_llgo_42 - %178 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 17, i64 8, i64 1, i64 1) - %179 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4", align 8 + %178 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 17, i64 8, i64 1, i64 1) + %179 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 %180 = icmp eq ptr %179, null br i1 %180, label %_llgo_45, label %_llgo_46 _llgo_45: ; preds = %_llgo_44 %181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %178) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %181) - store ptr %181, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T4", align 8 + store ptr %181, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 br label %_llgo_46 _llgo_46: ; preds = %_llgo_45, %_llgo_44 - %182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 25, i64 8, i64 1, i64 1) - %183 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 + %182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 25, i64 8, i64 1, i64 1) + %183 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 %184 = icmp eq ptr %183, null br i1 %184, label %_llgo_47, label %_llgo_48 _llgo_47: ; preds = %_llgo_46 - store ptr %182, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 + store ptr %182, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 br label %_llgo_48 _llgo_48: ; preds = %_llgo_47, %_llgo_46 @@ -848,19 +848,19 @@ _llgo_48: ; preds = %_llgo_47, %_llgo_46 %189 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %187, 0 %190 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %189, i64 1, 1 %191 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %190, i64 1, 2 - %192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191) - store ptr %192, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 - %193 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 + %192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191) + store ptr %192, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 + %193 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 br i1 %184, label %_llgo_49, label %_llgo_50 _llgo_49: ; preds = %_llgo_48 %194 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %195 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %194, 1 - %196 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %195, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T5).Invoke", 2 - %197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %196, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T5).Invoke", 3 + %196 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %195, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T5).Invoke", 2 + %197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %196, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T5).Invoke", 3 %198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %194, 1 - %199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %198, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T5).Invoke", 2 - %200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5.Invoke", 3 + %199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %198, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T5).Invoke", 2 + %200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.T5.Invoke", 3 %201 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %202 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %201, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %200, ptr %202, align 8 @@ -877,25 +877,25 @@ _llgo_49: ; preds = %_llgo_48 br label %_llgo_50 _llgo_50: ; preds = %_llgo_49, %_llgo_48 - %211 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 25, i64 8, i64 1, i64 1) - %212 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 + %211 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 25, i64 8, i64 1, i64 1) + %212 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 %213 = icmp eq ptr %212, null br i1 %213, label %_llgo_51, label %_llgo_52 _llgo_51: ; preds = %_llgo_50 %214 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %211) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %214) - store ptr %214, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T5", align 8 + store ptr %214, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 br label %_llgo_52 _llgo_52: ; preds = %_llgo_51, %_llgo_50 - %215 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 25, i64 24, i64 1, i64 1) - %216 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", align 8 + %215 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 25, i64 24, i64 1, i64 1) + %216 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 %217 = icmp eq ptr %216, null br i1 %217, label %_llgo_53, label %_llgo_54 _llgo_53: ; preds = %_llgo_52 - store ptr %215, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", align 8 + store ptr %215, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 br label %_llgo_54 _llgo_54: ; preds = %_llgo_53, %_llgo_52 @@ -935,19 +935,19 @@ _llgo_56: ; preds = %_llgo_55, %_llgo_54 %240 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %237, 0 %241 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %240, i64 2, 1 %242 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %241, i64 2, 2 - %243 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %242) - store ptr %243, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s", align 8 - %244 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s", align 8 + %243 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %242) + store ptr %243, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s", align 8 + %244 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s", align 8 br i1 %217, label %_llgo_57, label %_llgo_58 _llgo_57: ; preds = %_llgo_56 %245 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %246 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %245, 1 - %247 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %246, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T6).Invoke", 2 - %248 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %247, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T6).Invoke", 3 + %247 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %246, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T6).Invoke", 2 + %248 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %247, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T6).Invoke", 3 %249 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %245, 1 - %250 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %249, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.(*T6).Invoke", 2 - %251 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %250, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6.Invoke", 3 + %250 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %249, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T6).Invoke", 2 + %251 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %250, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.T6.Invoke", 3 %252 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %253 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %252, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %251, ptr %253, align 8 @@ -964,15 +964,15 @@ _llgo_57: ; preds = %_llgo_56 br label %_llgo_58 _llgo_58: ; preds = %_llgo_57, %_llgo_56 - %262 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 25, i64 24, i64 1, i64 1) - %263 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", align 8 + %262 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 25, i64 24, i64 1, i64 1) + %263 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 %264 = icmp eq ptr %263, null br i1 %264, label %_llgo_59, label %_llgo_60 _llgo_59: ; preds = %_llgo_58 %265 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %262) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %265) - store ptr %265, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.T6", align 8 + store ptr %265, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 br label %_llgo_60 _llgo_60: ; preds = %_llgo_59, %_llgo_58 @@ -993,18 +993,18 @@ _llgo_61: ; preds = %_llgo_60 %275 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %272, 0 %276 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %275, i64 2, 1 %277 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %276, i64 2, 2 - %278 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %277) + %278 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %277) store ptr %278, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 br label %_llgo_62 _llgo_62: ; preds = %_llgo_61, %_llgo_60 - %279 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 1 }) - %280 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.I", align 8 + %279 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 1 }) + %280 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 %281 = icmp eq ptr %280, null br i1 %281, label %_llgo_63, label %_llgo_64 _llgo_63: ; preds = %_llgo_62 - store ptr %279, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/invoke.I", align 8 + store ptr %279, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 br label %_llgo_64 _llgo_64: ; preds = %_llgo_63, %_llgo_62 @@ -1032,7 +1032,7 @@ _llgo_67: ; preds = %_llgo_66 %292 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %291, 0 %293 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %292, i64 0, 1 %294 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %293, i64 0, 2 - %295 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %294) + %295 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %294) store ptr %295, ptr @_llgo_any, align 8 br label %_llgo_68 diff --git a/compiler/cl/_testgo/makeslice/in.go b/cl/_testgo/makeslice/in.go similarity index 100% rename from compiler/cl/_testgo/makeslice/in.go rename to cl/_testgo/makeslice/in.go diff --git a/compiler/cl/_testgo/makeslice/out.ll b/cl/_testgo/makeslice/out.ll similarity index 100% rename from compiler/cl/_testgo/makeslice/out.ll rename to cl/_testgo/makeslice/out.ll diff --git a/compiler/cl/_testgo/multiret/in.go b/cl/_testgo/multiret/in.go similarity index 100% rename from compiler/cl/_testgo/multiret/in.go rename to cl/_testgo/multiret/in.go diff --git a/compiler/cl/_testgo/multiret/out.ll b/cl/_testgo/multiret/out.ll similarity index 50% rename from compiler/cl/_testgo/multiret/out.ll rename to cl/_testgo/multiret/out.ll index aa3c4be9..fd343e43 100644 --- a/compiler/cl/_testgo/multiret/out.ll +++ b/cl/_testgo/multiret/out.ll @@ -1,34 +1,34 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/multiret' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/multiret" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/multiret' +source_filename = "github.com/goplus/llgo/cl/_testgo/multiret" -@"github.com/goplus/llgo/compiler/cl/_testgo/multiret.a" = global i64 0, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/multiret.a" = global i64 0, align 8 +@"github.com/goplus/llgo/cl/_testgo/multiret.init$guard" = global i1 false, align 1 -define { i64, double } @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.foo"(double %0) { +define { i64, double } @"github.com/goplus/llgo/cl/_testgo/multiret.foo"(double %0) { _llgo_0: - %1 = load i64, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.a", align 4 + %1 = load i64, ptr @"github.com/goplus/llgo/cl/_testgo/multiret.a", align 4 %2 = insertvalue { i64, double } undef, i64 %1, 0 %3 = insertvalue { i64, double } %2, double %0, 1 ret { i64, double } %3 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/multiret.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/multiret.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init$guard", align 1 - store i64 1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.a", align 4 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/multiret.init$guard", align 1 + store i64 1, ptr @"github.com/goplus/llgo/cl/_testgo/multiret.a", align 4 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/multiret.main"() { _llgo_0: - %0 = call { i64, double } @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.foo"(double 2.000000e+00) + %0 = call { i64, double } @"github.com/goplus/llgo/cl/_testgo/multiret.foo"(double 2.000000e+00) %1 = extractvalue { i64, double } %0, 0 %2 = extractvalue { i64, double } %0, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1) diff --git a/compiler/cl/_testgo/print/in.go b/cl/_testgo/print/in.go similarity index 100% rename from compiler/cl/_testgo/print/in.go rename to cl/_testgo/print/in.go diff --git a/compiler/cl/_testgo/print/out.ll b/cl/_testgo/print/out.ll similarity index 59% rename from compiler/cl/_testgo/print/out.ll rename to cl/_testgo/print/out.ll index 8a15e13b..f767376b 100644 --- a/compiler/cl/_testgo/print/out.ll +++ b/cl/_testgo/print/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/print' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/print" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/print' +source_filename = "github.com/goplus/llgo/cl/_testgo/print" -@"github.com/goplus/llgo/compiler/cl/_testgo/print.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/print.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/print.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/print.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/print.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/print.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/print.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/print.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/print.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/print.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 46) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) diff --git a/compiler/cl/_testgo/reader/in.go b/cl/_testgo/reader/in.go similarity index 100% rename from compiler/cl/_testgo/reader/in.go rename to cl/_testgo/reader/in.go diff --git a/compiler/cl/_testgo/reader/out.ll b/cl/_testgo/reader/out.ll similarity index 80% rename from compiler/cl/_testgo/reader/out.ll rename to cl/_testgo/reader/out.ll index f8aa11f1..c8e0fb67 100644 --- a/compiler/cl/_testgo/reader/out.ll +++ b/cl/_testgo/reader/out.ll @@ -1,25 +1,25 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/reader' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reader" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/reader' +source_filename = "github.com/goplus/llgo/cl/_testgo/reader" %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } -%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } +%"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } +%"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } -%"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i64, i64 } +%"github.com/goplus/llgo/cl/_testgo/reader.errorString" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } +%"github.com/goplus/llgo/cl/_testgo/reader.stringReader" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i64, i64 } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF" = global %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/reader.ErrShortWrite" = global %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/reader.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.WriterTo" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [49 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/reader", align 1 +@"github.com/goplus/llgo/cl/_testgo/reader.EOF" = global %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, align 8 +@"github.com/goplus/llgo/cl/_testgo/reader.ErrShortWrite" = global %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, align 8 +@"github.com/goplus/llgo/cl/_testgo/reader.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [40 x i8] c"github.com/goplus/llgo/cl/_testgo/reader", align 1 @1 = private unnamed_addr constant [8 x i8] c"WriterTo", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Writer" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Writer" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [6 x i8] c"Writer", align 1 @_llgo_uint8 = linkonce global ptr null, align 8 @"[]_llgo_uint8" = linkonce global ptr null, align 8 @@ -32,21 +32,21 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reader" @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk" = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [5 x i8] c"Write", align 1 @_llgo_int64 = linkonce global ptr null, align 8 -@"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg" = linkonce global ptr null, align 8 +@"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [7 x i8] c"WriteTo", align 1 -@"_llgo_iface$fW3ehUYQ9HEsJUp-_gh8HbVb8TN9qyjzvxe-piX1P1o" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" = linkonce global ptr null, align 8 +@"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [17 x i8] c"nopCloserWriterTo", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Reader" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader" = linkonce global ptr null, align 8 @8 = private unnamed_addr constant [6 x i8] c"Reader", align 1 @9 = private unnamed_addr constant [4 x i8] c"Read", align 1 -@"_llgo_struct$zCmlqK6oRFYpWtMvv6Pe6GqaMY8pH8Js9Fj6dqbrNYo" = linkonce global ptr null, align 8 +@"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [5 x i8] c"Close", align 1 @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null, align 8 @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser" = linkonce global ptr null, align 8 @11 = private unnamed_addr constant [9 x i8] c"nopCloser", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.StringWriter" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter" = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [12 x i8] c"StringWriter", align 1 @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw" = linkonce global ptr null, align 8 @13 = private unnamed_addr constant [11 x i8] c"WriteString", align 1 @@ -54,9 +54,9 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reader" @14 = private unnamed_addr constant [3 x i8] c"EOF", align 1 @15 = private unnamed_addr constant [11 x i8] c"short write", align 1 @16 = private unnamed_addr constant [11 x i8] c"hello world", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader" = linkonce global ptr null, align 8 @17 = private unnamed_addr constant [12 x i8] c"stringReader", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = linkonce global ptr null, align 8 @18 = private unnamed_addr constant [1 x i8] c"s", align 1 @19 = private unnamed_addr constant [1 x i8] c"i", align 1 @20 = private unnamed_addr constant [8 x i8] c"prevRune", align 1 @@ -75,14 +75,14 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reader" @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug" = linkonce global ptr null, align 8 @27 = private unnamed_addr constant [10 x i8] c"UnreadByte", align 1 @28 = private unnamed_addr constant [10 x i8] c"UnreadRune", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader" = linkonce global ptr null, align 8 @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString" = linkonce global ptr null, align 8 @29 = private unnamed_addr constant [11 x i8] c"errorString", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString" = linkonce global ptr null, align 8 @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 -@30 = private unnamed_addr constant [140 x i8] c"type assertion github.com/goplus/llgo/compiler/cl/_testgo/reader.Reader -> github.com/goplus/llgo/compiler/cl/_testgo/reader.WriterTo failed", align 1 +@30 = private unnamed_addr constant [122 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/reader.Reader -> github.com/goplus/llgo/cl/_testgo/reader.WriterTo failed", align 1 @31 = private unnamed_addr constant [37 x i8] c"stringsReader.ReadAt: negative offset", align 1 @32 = private unnamed_addr constant [34 x i8] c"stringsReader.Seek: invalid whence", align 1 @33 = private unnamed_addr constant [37 x i8] c"stringsReader.Seek: negative position", align 1 @@ -91,22 +91,22 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reader" @36 = private unnamed_addr constant [62 x i8] c"strings.Reader.UnreadRune: previous operation was not ReadRune", align 1 @37 = private unnamed_addr constant [48 x i8] c"stringsReader.WriteTo: invalid WriteString count", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.NopCloser"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.NopCloser"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.WriterTo", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo", align 8 %3 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %2, ptr %1) br i1 %3, label %_llgo_3, label %_llgo_4 _llgo_1: ; preds = %_llgo_5 - %4 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", align 8 + %4 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 call void @llvm.memset(ptr %4, i8 0, i64 16, i1 false) - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %4, i32 0, i32 0 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %4, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, ptr %5, align 8 - %6 = load %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %4, align 8 - %7 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", align 8 + %6 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %4, align 8 + %7 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %6, ptr %8, align 8 + store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %6, ptr %8, align 8 %9 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %10 = load ptr, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %10, ptr %7) @@ -115,14 +115,14 @@ _llgo_1: ; preds = %_llgo_5 ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %13 _llgo_2: ; preds = %_llgo_5 - %14 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", align 8 + %14 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 call void @llvm.memset(ptr %14, i8 0, i64 16, i1 false) - %15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", ptr %14, i32 0, i32 0 + %15 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %14, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, ptr %15, align 8 - %16 = load %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", ptr %14, align 8 - %17 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", align 8 + %16 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %14, align 8 + %17 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" %16, ptr %18, align 8 + store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %16, ptr %18, align 8 %19 = load ptr, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %17) %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %20, 0 @@ -131,7 +131,7 @@ _llgo_2: ; preds = %_llgo_5 _llgo_3: ; preds = %_llgo_0 %23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 1 - %24 = load ptr, ptr @"_llgo_iface$fW3ehUYQ9HEsJUp-_gh8HbVb8TN9qyjzvxe-piX1P1o", align 8 + %24 = load ptr, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %24, ptr %1) %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %25, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %26, ptr %23, 1 @@ -149,7 +149,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %32, label %_llgo_1, label %_llgo_2 } -define { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.ReadAll"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { +define { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.ReadAll"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 512) %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %1, i64 1, i64 512, i64 0, i64 0, i64 512) @@ -190,7 +190,7 @@ _llgo_1: ; preds = %_llgo_6, %_llgo_3, br i1 %33, label %_llgo_2, label %_llgo_3 _llgo_2: ; preds = %_llgo_1 - %34 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 + %34 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 %35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %19) %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %19, 1 %37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %35, 0 @@ -234,10 +234,10 @@ _llgo_6: ; preds = %_llgo_3 br label %_llgo_1 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.WriteString"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.WriteString"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { _llgo_0: %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) - %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.StringWriter", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 %4 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %3, ptr %2) br i1 %4, label %_llgo_3, label %_llgo_4 @@ -294,44 +294,44 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %41, label %_llgo_1, label %_llgo_2 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*errorString).Error"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.errorString", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reader.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/reader.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/reader.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/reader.init$guard", align 1 call void @"unicode/utf8.init"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reader.init$after"() - %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 3 }) - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 11 }) - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.ErrShortWrite", align 8 + call void @"github.com/goplus/llgo/cl/_testgo/reader.init$after"() + %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 3 }) + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1, ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 11 }) + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, ptr @"github.com/goplus/llgo/cl/_testgo/reader.ErrShortWrite", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reader.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/reader.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 11 }, ptr %1, align 8 - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", align 8 - %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 + %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 %4 = load ptr, ptr @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw", align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %4, ptr %3) %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %5, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, ptr %0, 1 - %8 = call { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.ReadAll"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %7) + %8 = call { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.ReadAll"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %7) %9 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %8, 0 %10 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %8, 1 %11 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) @@ -342,13 +342,13 @@ _llgo_0: ret void } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString", ptr %1, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.errorString", ptr %1, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %2, align 8 - %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString", align 8 - %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 + %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 %5 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %4) %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %6, 0 @@ -356,17 +356,17 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8 } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser.Close"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Close"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %0) { _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser.Read"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Read"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", align 8 + %2 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" %0, ptr %2, align 8 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", ptr %2, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %0, ptr %2, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %2, i32 0, i32 0 %4 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %3, align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %4) %6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 0 @@ -384,16 +384,16 @@ _llgo_0: ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %17 } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Close"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", ptr %0, align 8 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser.Close"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %0, align 8 + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Close"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %1) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Read"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %0, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3) %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3, 0 @@ -411,17 +411,17 @@ _llgo_0: ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %16 } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.Close"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Close"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %0) { _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.Read"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Read"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", align 8 + %2 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %0, ptr %2, align 8 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %2, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %0, ptr %2, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %2, i32 0, i32 0 %4 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %3, align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %4) %6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 0 @@ -439,21 +439,21 @@ _llgo_0: ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %17 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.WriteTo"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.WriteTo"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { _llgo_0: - %2 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", align 8 + %2 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %0, ptr %2, align 8 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %2, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %0, ptr %2, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %2, i32 0, i32 0 %4 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %3, align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %4) - %6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.WriterTo", align 8 + %6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo", align 8 %7 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %6, ptr %5) br i1 %7, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 %8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 1 - %9 = load ptr, ptr @"_llgo_iface$fW3ehUYQ9HEsJUp-_gh8HbVb8TN9qyjzvxe-piX1P1o", align 8 + %9 = load ptr, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %9, ptr %5) %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %10, 0 %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, ptr %8, 1 @@ -475,23 +475,23 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %26 = load ptr, ptr @_llgo_string, align 8 %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @30, i64 140 }, ptr %27, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @30, i64 122 }, ptr %27, align 8 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %26, 0 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr %27, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29) unreachable } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Close"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %0, align 8 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.Close"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %1) + %1 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %0, align 8 + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Close"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %1) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Read"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %0, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3) %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3, 0 @@ -509,10 +509,10 @@ _llgo_0: ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %16 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { _llgo_0: - %2 = load %"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", ptr %0, align 8 - %3 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.WriteTo"(%"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo" %2, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) + %2 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", ptr %0, align 8 + %3 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.WriteTo"(%"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %2, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) %4 = extractvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %3, 0 %5 = extractvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %3, 1 %6 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } undef, i64 %4, 0 @@ -520,11 +520,11 @@ _llgo_0: ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %7 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Len"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %2 = load i64, ptr %1, align 4 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %4 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %3, align 8 %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %4, 1 %6 = icmp sge i64 %2, %5 @@ -534,76 +534,76 @@ _llgo_1: ; preds = %_llgo_0 ret i64 0 _llgo_2: ; preds = %_llgo_0 - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %7, align 8 %9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %8, 1 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %11 = load i64, ptr %10, align 4 %12 = sub i64 %9, %11 ret i64 %12 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Read"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %3 = load i64, ptr %2, align 4 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %5 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %4, align 8 %6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %5, 1 %7 = icmp sge i64 %3, %6 br i1 %7, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 + %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 %9 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %9 _llgo_2: ; preds = %_llgo_0 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %10, align 4 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %12 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %11, align 8 - %13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %13 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %14 = load i64, ptr %13, align 4 %15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %12, 1 %16 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %12, i64 %14, i64 %15) %17 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %16, 0 %18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %16, 1 %19 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, ptr %17, i64 %18, i64 1) - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %21 = load i64, ptr %20, align 4 %22 = add i64 %21, %19 - %23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %22, ptr %23, align 4 %24 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } undef, i64 %19, 0 %25 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %24, %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %25 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadAt"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, i64 %2) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, i64 %2) { _llgo_0: %3 = icmp slt i64 %2, 0 br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @31, i64 37 }) + %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @31, i64 37 }) %5 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %5 _llgo_2: ; preds = %_llgo_0 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %7 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %6, align 8 %8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %7, 1 %9 = icmp sge i64 %2, %8 br i1 %9, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %10 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 + %10 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 %11 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %10, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %11 _llgo_4: ; preds = %_llgo_2 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %13 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %12, align 8 %14 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %13, 1 %15 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %13, i64 %2, i64 %14) @@ -615,7 +615,7 @@ _llgo_4: ; preds = %_llgo_2 br i1 %20, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - %21 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 + %21 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 @@ -625,27 +625,27 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %24 } -define { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadByte"(ptr %0) { +define { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %1, align 4 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %3 = load i64, ptr %2, align 4 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %5 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %4, align 8 %6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %5, 1 %7 = icmp sge i64 %3, %6 br i1 %7, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 + %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 %9 = insertvalue { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i8 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 1 ret { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %9 _llgo_2: ; preds = %_llgo_0 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %11 = load i64, ptr %10, align 4 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %13 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %12, align 8 %14 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %13, 0 %15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %13, 1 @@ -655,41 +655,41 @@ _llgo_2: ; preds = %_llgo_0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %18) %19 = getelementptr inbounds i8, ptr %14, i64 %11 %20 = load i8, ptr %19, align 1 - %21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %21 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %22 = load i64, ptr %21, align 4 %23 = add i64 %22, 1 - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %23, ptr %24, align 4 %25 = insertvalue { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } undef, i8 %20, 0 %26 = insertvalue { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %25, %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, 1 ret { i8, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %26 } -define { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadRune"(ptr %0) { +define { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %2 = load i64, ptr %1, align 4 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %4 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %3, align 8 %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %4, 1 %6 = icmp sge i64 %2, %5 br i1 %6, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %7, align 4 - %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.EOF", align 8 + %8 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 %9 = insertvalue { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i32 0, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 2 ret { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %9 _llgo_2: ; preds = %_llgo_0 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %11 = load i64, ptr %10, align 4 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 %11, ptr %12, align 4 - %13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %13 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %14 = load i64, ptr %13, align 4 - %15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %15 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %16 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %15, align 8 %17 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %16, 0 %18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %16, 1 @@ -703,10 +703,10 @@ _llgo_2: ; preds = %_llgo_0 br i1 %24, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %25 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %25 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %26 = load i64, ptr %25, align 4 %27 = add i64 %26, 1 - %28 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %28 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %27, ptr %28, align 4 %29 = sext i8 %23 to i32 %30 = insertvalue { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } undef, i32 %29, 0 @@ -715,19 +715,19 @@ _llgo_3: ; preds = %_llgo_2 ret { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %32 _llgo_4: ; preds = %_llgo_2 - %33 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %33 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %34 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %33, align 8 - %35 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %35 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %36 = load i64, ptr %35, align 4 %37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %34, 1 %38 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %34, i64 %36, i64 %37) %39 = call { i32, i64 } @"unicode/utf8.DecodeRuneInString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %38) %40 = extractvalue { i32, i64 } %39, 0 %41 = extractvalue { i32, i64 } %39, 1 - %42 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %42 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %43 = load i64, ptr %42, align 4 %44 = add i64 %43, %41 - %45 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %45 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %44, ptr %45, align 4 %46 = insertvalue { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } undef, i32 %40, 0 %47 = insertvalue { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %46, i64 %41, 1 @@ -735,9 +735,9 @@ _llgo_4: ; preds = %_llgo_2 ret { i32, i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %48 } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Seek"(ptr %0, i64 %1, i64 %2) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek"(ptr %0, i64 %1, i64 %2) { _llgo_0: - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %3, align 4 %4 = icmp eq i64 %2, 0 br i1 %4, label %_llgo_2, label %_llgo_4 @@ -751,7 +751,7 @@ _llgo_2: ; preds = %_llgo_0 br label %_llgo_1 _llgo_3: ; preds = %_llgo_4 - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %8 = load i64, ptr %7, align 4 %9 = add i64 %8, %1 br label %_llgo_1 @@ -761,7 +761,7 @@ _llgo_4: ; preds = %_llgo_0 br i1 %10, label %_llgo_3, label %_llgo_6 _llgo_5: ; preds = %_llgo_6 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %12 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %11, align 8 %13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %12, 1 %14 = add i64 %13, %1 @@ -772,91 +772,91 @@ _llgo_6: ; preds = %_llgo_4 br i1 %15, label %_llgo_5, label %_llgo_7 _llgo_7: ; preds = %_llgo_6 - %16 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @32, i64 34 }) + %16 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @32, i64 34 }) %17 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %16, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %17 _llgo_8: ; preds = %_llgo_1 - %18 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @33, i64 37 }) + %18 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @33, i64 37 }) %19 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %18, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %19 _llgo_9: ; preds = %_llgo_1 - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %5, ptr %20, align 4 %21 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } undef, i64 %5, 0 %22 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %21, %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %22 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Size"(ptr %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8 %3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %2, 1 ret i64 %3 } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).UnreadByte"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %2 = load i64, ptr %1, align 4 %3 = icmp sle i64 %2, 0 br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @34, i64 48 }) + %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @34, i64 48 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4 _llgo_2: ; preds = %_llgo_0 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %5, align 4 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %7 = load i64, ptr %6, align 4 %8 = sub i64 %7, 1 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %8, ptr %9, align 4 ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).UnreadRune"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %2 = load i64, ptr %1, align 4 %3 = icmp sle i64 %2, 0 br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @35, i64 49 }) + %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @35, i64 49 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4 _llgo_2: ; preds = %_llgo_0 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 %6 = load i64, ptr %5, align 4 %7 = icmp slt i64 %6, 0 br i1 %7, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %8 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @36, i64 62 }) + %8 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @36, i64 62 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8 _llgo_4: ; preds = %_llgo_2 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 %10 = load i64, ptr %9, align 4 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %10, ptr %11, align 4 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %12, align 4 ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer } -define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).WriteTo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { +define { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 2 store i64 -1, ptr %2, align 4 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %4 = load i64, ptr %3, align 4 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %6 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %5, align 8 %7 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %6, 1 %8 = icmp sge i64 %4, %7 @@ -866,13 +866,13 @@ _llgo_1: ; preds = %_llgo_0 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } zeroinitializer _llgo_2: ; preds = %_llgo_0 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 %10 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %9, align 8 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %12 = load i64, ptr %11, align 4 %13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %10, 1 %14 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %10, i64 %12, i64 %13) - %15 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/compiler/cl/_testgo/reader.WriteString"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" %14) + %15 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.WriteString"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" %14) %16 = extractvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %15, 0 %17 = extractvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %15, 1 %18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %14, 1 @@ -889,17 +889,17 @@ _llgo_3: ; preds = %_llgo_2 unreachable _llgo_4: ; preds = %_llgo_2 - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 %25 = load i64, ptr %24, align 4 %26 = add i64 %25, %16 - %27 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 + %27 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 1 store i64 %26, ptr %27, align 4 %28 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %14, 1 %29 = icmp ne i64 %16, %28 br i1 %29, label %_llgo_7, label %_llgo_6 _llgo_5: ; preds = %_llgo_7 - %30 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.ErrShortWrite", align 8 + %30 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr @"github.com/goplus/llgo/cl/_testgo/reader.ErrShortWrite", align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_7, %_llgo_4 @@ -922,25 +922,25 @@ _llgo_7: ; preds = %_llgo_4 declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reader.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/reader.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.WriterTo", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.WriterTo", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 6 }) - %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Writer", align 8 + %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 6 }) + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Writer", align 8 %5 = icmp eq ptr %4, null br i1 %5, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - store ptr %3, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Writer", align 8 + store ptr %3, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Writer", align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 @@ -1080,7 +1080,7 @@ _llgo_21: ; preds = %_llgo_20 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %71 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Writer", align 8 + %71 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Writer", align 8 %72 = load ptr, ptr @_llgo_int64, align 8 %73 = icmp eq ptr %72, null br i1 %73, label %_llgo_23, label %_llgo_24 @@ -1092,10 +1092,10 @@ _llgo_23: ; preds = %_llgo_22 _llgo_24: ; preds = %_llgo_23, %_llgo_22 %75 = load ptr, ptr @_llgo_int64, align 8 - %76 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Writer", align 8 + %76 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Writer", align 8 %77 = load ptr, ptr @_llgo_int64, align 8 %78 = load ptr, ptr @_llgo_error, align 8 - %79 = load ptr, ptr @"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg", align 8 + %79 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 %80 = icmp eq ptr %79, null br i1 %80, label %_llgo_25, label %_llgo_26 @@ -1116,11 +1116,11 @@ _llgo_25: ; preds = %_llgo_24 %91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, i64 2, 2 %92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i1 false) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %92) - store ptr %92, ptr @"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg", align 8 + store ptr %92, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %93 = load ptr, ptr @"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg", align 8 + %93 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 br i1 %2, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 @@ -1135,8 +1135,8 @@ _llgo_27: ; preds = %_llgo_26 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %100 = load ptr, ptr @"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg", align 8 - %101 = load ptr, ptr @"_llgo_iface$fW3ehUYQ9HEsJUp-_gh8HbVb8TN9qyjzvxe-piX1P1o", align 8 + %100 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 + %101 = load ptr, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 %102 = icmp eq ptr %101, null br i1 %102, label %_llgo_29, label %_llgo_30 @@ -1148,20 +1148,20 @@ _llgo_29: ; preds = %_llgo_28 %106 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %104, 0 %107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %106, i64 1, 1 %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %107, i64 1, 2 - %109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108) - store ptr %109, ptr @"_llgo_iface$fW3ehUYQ9HEsJUp-_gh8HbVb8TN9qyjzvxe-piX1P1o", align 8 + %109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108) + store ptr %109, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 17 }, i64 25, i64 16, i64 3, i64 3) - store ptr %110, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo", align 8 - %111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) - %112 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Reader", align 8 + %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 17 }, i64 25, i64 16, i64 3, i64 3) + store ptr %110, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 + %111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) + %112 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 %113 = icmp eq ptr %112, null br i1 %113, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - store ptr %111, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Reader", align 8 + store ptr %111, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 @@ -1181,8 +1181,8 @@ _llgo_33: ; preds = %_llgo_32 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %122 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.Reader", align 8 - %123 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) + %122 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 + %123 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) %124 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }, ptr %123, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true) %125 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) %126 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %125, i64 0 @@ -1190,9 +1190,9 @@ _llgo_34: ; preds = %_llgo_33, %_llgo_32 %127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %125, 0 %128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %127, i64 1, 1 %129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %128, i64 1, 2 - %130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %129) - store ptr %130, ptr @"_llgo_struct$zCmlqK6oRFYpWtMvv6Pe6GqaMY8pH8Js9Fj6dqbrNYo", align 8 - %131 = load ptr, ptr @"_llgo_struct$zCmlqK6oRFYpWtMvv6Pe6GqaMY8pH8Js9Fj6dqbrNYo", align 8 + %130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %129) + store ptr %130, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 + %131 = load ptr, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 %132 = load ptr, ptr @_llgo_error, align 8 %133 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %134 = icmp eq ptr %133, null @@ -1217,25 +1217,25 @@ _llgo_35: ; preds = %_llgo_34 _llgo_36: ; preds = %_llgo_35, %_llgo_34 %145 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %146 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %145, 1 - %147 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %146, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 - %148 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %147, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Close", 3 + %147 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %146, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 + %148 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %147, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 3 %149 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %145, 1 - %150 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %149, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 - %151 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %150, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.Close", 3 + %150 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %149, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 + %151 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %150, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Close", 3 %152 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 %153 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %152, 1 - %154 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %153, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 - %155 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %154, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Read", 3 + %154 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %153, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 + %155 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %154, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 3 %156 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %152, 1 - %157 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %156, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 - %158 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %157, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.Read", 3 - %159 = load ptr, ptr @"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg", align 8 + %157 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %156, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 + %158 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %157, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Read", 3 + %159 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 %160 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %159, 1 - %161 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %160, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 - %162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %161, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 3 + %161 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %160, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 + %162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %161, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 3 %163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %159, 1 - %164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 - %165 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %164, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloserWriterTo.WriteTo", 3 + %164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 + %165 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %164, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.WriteTo", 3 %166 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120) %167 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %166, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %151, ptr %167, align 8 @@ -1274,28 +1274,28 @@ _llgo_37: ; preds = %_llgo_36 %189 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %186, 0 %190 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %189, i64 2, 1 %191 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %190, i64 2, 2 - %192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191) + %192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191) store ptr %192, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %193 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 9 }, i64 25, i64 16, i64 2, i64 2) - store ptr %193, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser", align 8 - %194 = load ptr, ptr @"_llgo_struct$zCmlqK6oRFYpWtMvv6Pe6GqaMY8pH8Js9Fj6dqbrNYo", align 8 + %193 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 9 }, i64 25, i64 16, i64 2, i64 2) + store ptr %193, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 + %194 = load ptr, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 %195 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %196 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %195, 1 - %197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %196, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Close", 2 - %198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %197, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Close", 3 + %197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %196, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 2 + %198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %197, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 3 %199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %195, 1 - %200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Close", 2 - %201 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %200, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser.Close", 3 + %200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 2 + %201 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %200, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Close", 3 %202 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 %203 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %202, 1 - %204 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %203, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Read", 2 - %205 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %204, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Read", 3 + %204 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %203, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 2 + %205 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %204, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 3 %206 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %202, 1 - %207 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %206, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*nopCloser).Read", 2 - %208 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %207, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.nopCloser.Read", 3 + %207 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %206, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 2 + %208 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %207, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Read", 3 %209 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) %210 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %209, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %201, ptr %210, align 8 @@ -1313,13 +1313,13 @@ _llgo_38: ; preds = %_llgo_37, %_llgo_36 %219 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %218, i64 2, 1 %220 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %219, i64 2, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %193, ptr %194, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %214, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %220) - %221 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 12 }) - %222 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.StringWriter", align 8 + %221 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 12 }) + %222 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 %223 = icmp eq ptr %222, null br i1 %223, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - store ptr %221, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.StringWriter", align 8 + store ptr %221, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 @@ -1379,13 +1379,13 @@ _llgo_45: ; preds = %_llgo_44 %254 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %252, 0 %255 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %254, i64 1, 1 %256 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %255, i64 1, 2 - %257 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256) + %257 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256) store ptr %257, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 br label %_llgo_46 _llgo_46: ; preds = %_llgo_45, %_llgo_44 - %258 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10) - store ptr %258, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", align 8 + %258 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10) + store ptr %258, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 %259 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) %260 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %259, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %261 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) @@ -1402,9 +1402,9 @@ _llgo_46: ; preds = %_llgo_45, %_llgo_44 %269 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %265, 0 %270 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %269, i64 3, 1 %271 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %270, i64 3, 2 - %272 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %271) - store ptr %272, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 - %273 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 + %272 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %271) + store ptr %272, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 + %273 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 %274 = load ptr, ptr @_llgo_int, align 8 %275 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %276 = icmp eq ptr %275, null @@ -1429,13 +1429,13 @@ _llgo_47: ; preds = %_llgo_46 _llgo_48: ; preds = %_llgo_47, %_llgo_46 %287 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %288 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %287, 1 - %289 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %288, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Len", 2 - %290 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %289, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Len", 3 + %289 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %288, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len", 2 + %290 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %289, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len", 3 %291 = load ptr, ptr @"[]_llgo_uint8", align 8 %292 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 %293 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %292, 1 - %294 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %293, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Read", 2 - %295 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %294, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Read", 3 + %294 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %293, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read", 2 + %295 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %294, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read", 3 %296 = load ptr, ptr @"[]_llgo_uint8", align 8 %297 = load ptr, ptr @"[]_llgo_uint8", align 8 %298 = load ptr, ptr @_llgo_int64, align 8 @@ -1470,8 +1470,8 @@ _llgo_49: ; preds = %_llgo_48 _llgo_50: ; preds = %_llgo_49, %_llgo_48 %316 = load ptr, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 %317 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %316, 1 - %318 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %317, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadAt", 2 - %319 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %318, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadAt", 3 + %318 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %317, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt", 2 + %319 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %318, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt", 3 %320 = load ptr, ptr @_llgo_uint8, align 8 %321 = load ptr, ptr @_llgo_error, align 8 %322 = load ptr, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 @@ -1499,8 +1499,8 @@ _llgo_51: ; preds = %_llgo_50 _llgo_52: ; preds = %_llgo_51, %_llgo_50 %335 = load ptr, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 %336 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %335, 1 - %337 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %336, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadByte", 2 - %338 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %337, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadByte", 3 + %337 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %336, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte", 2 + %338 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %337, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte", 3 %339 = load ptr, ptr @_llgo_rune, align 8 %340 = icmp eq ptr %339, null br i1 %340, label %_llgo_53, label %_llgo_54 @@ -1542,8 +1542,8 @@ _llgo_55: ; preds = %_llgo_54 _llgo_56: ; preds = %_llgo_55, %_llgo_54 %360 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 %361 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %360, 1 - %362 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %361, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadRune", 2 - %363 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %362, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).ReadRune", 3 + %362 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %361, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune", 2 + %363 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %362, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune", 3 %364 = load ptr, ptr @_llgo_int64, align 8 %365 = load ptr, ptr @_llgo_int, align 8 %366 = load ptr, ptr @_llgo_int64, align 8 @@ -1577,8 +1577,8 @@ _llgo_57: ; preds = %_llgo_56 _llgo_58: ; preds = %_llgo_57, %_llgo_56 %383 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 %384 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %383, 1 - %385 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %384, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Seek", 2 - %386 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %385, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Seek", 3 + %385 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %384, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek", 2 + %386 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %385, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek", 3 %387 = load ptr, ptr @_llgo_int64, align 8 %388 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 %389 = icmp eq ptr %388, null @@ -1603,20 +1603,20 @@ _llgo_59: ; preds = %_llgo_58 _llgo_60: ; preds = %_llgo_59, %_llgo_58 %400 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 %401 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %400, 1 - %402 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %401, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Size", 2 - %403 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %402, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).Size", 3 + %402 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %401, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size", 2 + %403 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %402, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size", 3 %404 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %405 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @27, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %404, 1 - %406 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %405, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).UnreadByte", 2 - %407 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %406, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).UnreadByte", 3 + %406 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %405, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte", 2 + %407 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %406, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte", 3 %408 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %409 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @28, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %408, 1 - %410 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %409, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).UnreadRune", 2 - %411 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %410, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).UnreadRune", 3 - %412 = load ptr, ptr @"_llgo_func$-AbPruiRubbHNU-z4sJm4RCuzmjax87Xu2vXpjP2-tg", align 8 + %410 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %409, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune", 2 + %411 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %410, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune", 3 + %412 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 %413 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %412, 1 - %414 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %413, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).WriteTo", 2 - %415 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %414, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*stringReader).WriteTo", 3 + %414 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %413, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo", 2 + %415 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %414, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo", 3 %416 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 400) %417 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %290, ptr %417, align 8 @@ -1642,10 +1642,10 @@ _llgo_60: ; preds = %_llgo_59, %_llgo_58 %428 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %427, i64 10, 1 %429 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %428, i64 10, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %258, ptr %273, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %429) - %430 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10) + %430 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10) %431 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %430) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %431) - store ptr %431, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.stringReader", align 8 + store ptr %431, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 %432 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 %433 = load ptr, ptr @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw", align 8 %434 = icmp eq ptr %433, null @@ -1659,13 +1659,13 @@ _llgo_61: ; preds = %_llgo_60 %438 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %436, 0 %439 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %438, i64 1, 1 %440 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %439, i64 1, 2 - %441 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %440) + %441 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %440) store ptr %441, ptr @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw", align 8 br label %_llgo_62 _llgo_62: ; preds = %_llgo_61, %_llgo_60 - %442 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1) - store ptr %442, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString", align 8 + %442 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1) + store ptr %442, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 %443 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) %444 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %443, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %445 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) @@ -1674,13 +1674,13 @@ _llgo_62: ; preds = %_llgo_61, %_llgo_60 %447 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %445, 0 %448 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %447, i64 1, 1 %449 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %448, i64 1, 2 - %450 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %449) - store ptr %450, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %451 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %450 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %449) + store ptr %450, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %451 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 %452 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 %453 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %452, 1 - %454 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %453, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*errorString).Error", 2 - %455 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %454, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reader.(*errorString).Error", 3 + %454 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %453, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error", 2 + %455 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %454, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error", 3 %456 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %457 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %456, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %455, ptr %457, align 8 @@ -1688,10 +1688,10 @@ _llgo_62: ; preds = %_llgo_61, %_llgo_60 %459 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %458, i64 1, 1 %460 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %459, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %442, ptr %451, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %460) - %461 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1) + %461 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1) %462 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %461) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %462) - store ptr %462, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reader.errorString", align 8 + store ptr %462, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 %463 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 %464 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 %465 = icmp eq ptr %464, null @@ -1705,7 +1705,7 @@ _llgo_63: ; preds = %_llgo_62 %469 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %467, 0 %470 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %469, i64 1, 1 %471 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %470, i64 1, 2 - %472 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %471) + %472 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %471) store ptr %472, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 br label %_llgo_64 diff --git a/compiler/cl/_testgo/reflect/in.go b/cl/_testgo/reflect/in.go similarity index 100% rename from compiler/cl/_testgo/reflect/in.go rename to cl/_testgo/reflect/in.go diff --git a/compiler/cl/_testgo/reflect/out.ll b/cl/_testgo/reflect/out.ll similarity index 92% rename from compiler/cl/_testgo/reflect/out.ll rename to cl/_testgo/reflect/out.ll index 63762b55..ac84d40e 100644 --- a/compiler/cl/_testgo/reflect/out.ll +++ b/cl/_testgo/reflect/out.ll @@ -1,8 +1,8 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/reflect' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reflect" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/reflect' +source_filename = "github.com/goplus/llgo/cl/_testgo/reflect" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T" = type { i64 } +%"github.com/goplus/llgo/cl/_testgo/reflect.T" = type { i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %reflect.Value = type { ptr, ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } @@ -11,34 +11,34 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reflect" %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/reflect.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [11 x i8] c"call.method", align 1 @_llgo_int = linkonce global ptr null, align 8 @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU" = linkonce global ptr null, align 8 @_llgo_Pointer = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8 @1 = private unnamed_addr constant [2 x i8] c"$f", align 1 @2 = private unnamed_addr constant [5 x i8] c"$data", align 1 -@3 = private unnamed_addr constant [50 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/reflect", align 1 +@3 = private unnamed_addr constant [41 x i8] c"github.com/goplus/llgo/cl/_testgo/reflect", align 1 @4 = private unnamed_addr constant [7 x i8] c"closure", align 1 @5 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [12 x i8] c"call.closure", align 1 @7 = private unnamed_addr constant [4 x i8] c"func", align 1 @8 = private unnamed_addr constant [9 x i8] c"call.func", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [1 x i8] c"T", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [1 x i8] c"n", align 1 @11 = private unnamed_addr constant [3 x i8] c"Add", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T" = linkonce global ptr null, align 8 @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A" = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [7 x i8] c"imethod", align 1 @13 = private unnamed_addr constant [6 x i8] c"method", align 1 @_llgo_any = linkonce global ptr null, align 8 @"[]_llgo_any" = linkonce global ptr null, align 8 @"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk" = linkonce global ptr null, align 8 @14 = private unnamed_addr constant [10 x i8] c"call.slice", align 1 @15 = private unnamed_addr constant [40 x i8] c"type assertion interface{} -> int failed", align 1 @"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8 @@ -53,32 +53,32 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reflect" @24 = private unnamed_addr constant [12 x i8] c"must invalid", align 1 @25 = private unnamed_addr constant [13 x i8] c"MapIter error", align 1 -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.(*T).Add"(ptr %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testgo/reflect.(*T).Add"(ptr %0, i64 %1) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 11 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 %3 = load i64, ptr %2, align 4 %4 = add i64 %3, %1 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 store i64 %4, ptr %5, align 4 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 %7 = load i64, ptr %6, align 4 ret i64 %7 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.callClosure"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store i64 100, ptr %0, align 4 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure$1", ptr undef }, ptr %1, 1 + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/reflect.callClosure$1", ptr undef }, ptr %1, 1 %4 = load ptr, ptr @_llgo_int, align 8 %5 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 %6 = load ptr, ptr @_llgo_Pointer, align 8 - %7 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %7 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store { ptr, ptr } %3, ptr %8, align 8 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0 @@ -123,7 +123,7 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %39 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %11) %40 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39, 0 - %41 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %41 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %42 = icmp eq ptr %40, %41 br i1 %42, label %_llgo_3, label %_llgo_4 @@ -159,7 +159,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %56, label %_llgo_2, label %_llgo_1 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure$1"(ptr %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testgo/reflect.callClosure$1"(ptr %0, i64 %1) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 12 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) @@ -171,11 +171,11 @@ _llgo_0: ret i64 %6 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.callFunc"() { _llgo_0: - %0 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %0 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1", ptr null }, ptr %1, align 8 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/reflect.callFunc$1", ptr null }, ptr %1, align 8 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1 %4 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3) @@ -218,7 +218,7 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %32 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %4) %33 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %32, 0 - %34 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %34 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %35 = icmp eq ptr %33, %34 br i1 %35, label %_llgo_3, label %_llgo_4 @@ -254,7 +254,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %49, label %_llgo_2, label %_llgo_1 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1"(i64 %0) { +define i64 @"github.com/goplus/llgo/cl/_testgo/reflect.callFunc$1"(i64 %0) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 9 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) @@ -262,13 +262,13 @@ _llgo_0: ret i64 %1 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callIMethod"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.callIMethod"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 store i64 1, ptr %1, align 4 - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 - %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 + %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 %4 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 %5 = load ptr, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %3) @@ -319,7 +319,7 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %42 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %14) %43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, 0 - %44 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %44 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %45 = icmp eq ptr %43, %44 br i1 %45, label %_llgo_3, label %_llgo_4 @@ -377,12 +377,12 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %77, label %_llgo_2, label %_llgo_1 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callMethod"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.callMethod"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0 store i64 1, ptr %1, align 4 - %2 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 + %2 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0 %4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, ptr %0, 1 %5 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %4) @@ -426,7 +426,7 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %34 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %6) %35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %34, 0 - %36 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %36 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %37 = icmp eq ptr %35, %36 br i1 %37, label %_llgo_3, label %_llgo_4 @@ -484,14 +484,14 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %69, label %_llgo_2, label %_llgo_1 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callSlice"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.callSlice"() { _llgo_0: %0 = load ptr, ptr @_llgo_any, align 8 %1 = load ptr, ptr @"[]_llgo_any", align 8 %2 = load ptr, ptr @"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU", align 8 - %3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8 + %3 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo", ptr null }, ptr %4, align 8 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/reflect.demo", ptr null }, ptr %4, align 8 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr %4, 1 %7 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6) @@ -633,7 +633,7 @@ _llgo_0: ret void } -define { i64, i64 } @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) { +define { i64, i64 } @"github.com/goplus/llgo/cl/_testgo/reflect.demo"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) { _llgo_0: %10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1 br label %_llgo_1 @@ -688,34 +688,34 @@ _llgo_5: ; preds = %_llgo_2 unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.init$guard", align 1 call void @reflect.init() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$after"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callSlice"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callMethod"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callIMethod"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo1"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo2"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.callSlice"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.callFunc"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.callClosure"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.callMethod"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.callIMethod"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.mapDemo1"() + call void @"github.com/goplus/llgo/cl/_testgo/reflect.mapDemo2"() ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo1"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.mapDemo1"() { _llgo_0: %0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %0, i64 2) @@ -879,7 +879,7 @@ _llgo_14: ; preds = %_llgo_10 br i1 %98, label %_llgo_13, label %_llgo_12 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo2"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.mapDemo2"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 @@ -1071,7 +1071,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) declare %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface") -define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/reflect.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -1145,8 +1145,8 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %37, 0 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 2, 1 %42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 2, 2 - %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42) - store ptr %43, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42) + store ptr %43, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %44 = load ptr, ptr @_llgo_string, align 8 %45 = icmp eq ptr %44, null br i1 %45, label %_llgo_7, label %_llgo_8 @@ -1157,13 +1157,13 @@ _llgo_7: ; preds = %_llgo_6 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 - %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1) - %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 + %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1) + %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 %49 = icmp eq ptr %48, null br i1 %49, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - store ptr %47, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 + store ptr %47, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 @@ -1175,16 +1175,16 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 %54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %52, 0 %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, i64 1, 1 %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55, i64 1, 2 - %57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56) - store ptr %57, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 - %58 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 + %57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56) + store ptr %57, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 + %58 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 br i1 %49, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 %59 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 %60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %59, 1 - %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.(*T).Add", 2 - %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.(*T).Add", 3 + %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.(*T).Add", 2 + %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.(*T).Add", 3 %63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %64 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %63, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr %64, align 8 @@ -1195,15 +1195,15 @@ _llgo_11: ; preds = %_llgo_10 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1) - %69 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 + %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1) + %69 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 %70 = icmp eq ptr %69, null br i1 %70, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %68) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %71) - store ptr %71, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8 + store ptr %71, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 @@ -1220,7 +1220,7 @@ _llgo_15: ; preds = %_llgo_14 %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %76, 0 %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78, i64 1, 1 %80 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, i64 1, 2 - %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80) + %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80) store ptr %81, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8 br label %_llgo_16 @@ -1234,7 +1234,7 @@ _llgo_17: ; preds = %_llgo_16 %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %84, 0 %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, i64 0, 1 %87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 0, 2 - %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87) + %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87) store ptr %88, ptr @_llgo_any, align 8 br label %_llgo_18 @@ -1248,7 +1248,7 @@ _llgo_19: ; preds = %_llgo_18 %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %91, 0 %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 0, 1 %94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, i64 0, 2 - %95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94) + %95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94) %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %95) store ptr %96, ptr @"[]_llgo_any", align 8 br label %_llgo_20 @@ -1365,8 +1365,8 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20 %171 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %168, 0 %172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %171, i64 2, 1 %173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 2, 2 - %174 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173) - store ptr %174, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8 + %174 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173) + store ptr %174, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8 %175 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %176 = icmp eq ptr %175, null br i1 %176, label %_llgo_23, label %_llgo_24 @@ -1397,7 +1397,7 @@ _llgo_23: ; preds = %_llgo_22 %195 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %190, 0 %196 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %195, i64 4, 1 %197 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %196, i64 4, 2 - %198 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %197) + %198 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %197) %199 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %177, ptr %178, ptr %198, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %199) store ptr %199, ptr @"map[_llgo_int]_llgo_string", align 8 @@ -1437,9 +1437,9 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value. declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface") -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1"(ptr %0, i64 %1) { +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/reflect.callFunc$1"(ptr %0, i64 %1) { _llgo_0: - %2 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1"(i64 %1) + %2 = tail call i64 @"github.com/goplus/llgo/cl/_testgo/reflect.callFunc$1"(i64 %1) ret i64 %2 } @@ -1457,9 +1457,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"githu declare %reflect.Value @reflect.Value.Method(%reflect.Value, i64) -define linkonce { i64, i64 } @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) { +define linkonce { i64, i64 } @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/reflect.demo"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) { _llgo_0: - %11 = tail call { i64, i64 } @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo"(i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) + %11 = tail call { i64, i64 } @"github.com/goplus/llgo/cl/_testgo/reflect.demo"(i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) ret { i64, i64 } %11 } diff --git a/compiler/cl/_testgo/reflectconv/in.go b/cl/_testgo/reflectconv/in.go similarity index 100% rename from compiler/cl/_testgo/reflectconv/in.go rename to cl/_testgo/reflectconv/in.go diff --git a/compiler/cl/_testgo/reflectconv/out.ll b/cl/_testgo/reflectconv/out.ll similarity index 100% rename from compiler/cl/_testgo/reflectconv/out.ll rename to cl/_testgo/reflectconv/out.ll diff --git a/compiler/cl/_testgo/select/in.go b/cl/_testgo/select/in.go similarity index 100% rename from compiler/cl/_testgo/select/in.go rename to cl/_testgo/select/in.go diff --git a/compiler/cl/_testgo/select/out.ll b/cl/_testgo/select/out.ll similarity index 100% rename from compiler/cl/_testgo/select/out.ll rename to cl/_testgo/select/out.ll diff --git a/compiler/cl/_testgo/selects/in.go b/cl/_testgo/selects/in.go similarity index 100% rename from compiler/cl/_testgo/selects/in.go rename to cl/_testgo/selects/in.go diff --git a/compiler/cl/_testgo/selects/out.ll b/cl/_testgo/selects/out.ll similarity index 93% rename from compiler/cl/_testgo/selects/out.ll rename to cl/_testgo/selects/out.ll index a331fc6a..eeea4e64 100644 --- a/compiler/cl/_testgo/selects/out.ll +++ b/cl/_testgo/selects/out.ll @@ -1,12 +1,12 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/selects' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/selects" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/selects' +source_filename = "github.com/goplus/llgo/cl/_testgo/selects" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" = type { ptr, ptr, i32, i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/selects.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/selects.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [4 x i8] c"c1<-", align 1 @1 = private unnamed_addr constant [4 x i8] c"<-c2", align 1 @2 = private unnamed_addr constant [4 x i8] c"<-c4", align 1 @@ -16,21 +16,21 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/selects" @5 = private unnamed_addr constant [4 x i8] c"c2<-", align 1 @6 = private unnamed_addr constant [4 x i8] c"<-c3", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/selects.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/selects.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/selects.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/selects.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/selects.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1) @@ -49,12 +49,12 @@ _llgo_0: store ptr %2, ptr %9, align 8 %10 = getelementptr inbounds { ptr, ptr, ptr }, ptr %7, i32 0, i32 2 store ptr %4, ptr %10, align 8 - %11 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects.main$1", ptr undef }, ptr %7, 1 + %11 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/selects.main$1", ptr undef }, ptr %7, 1 %12 = call ptr @malloc(i64 16) %13 = getelementptr inbounds { { ptr, ptr } }, ptr %12, i32 0, i32 0 store { ptr, ptr } %11, ptr %13, align 8 %14 = alloca i8, i64 8, align 1 - %15 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %14, ptr null, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects._llgo_routine$1", ptr %12) + %15 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %14, ptr null, ptr @"github.com/goplus/llgo/cl/_testgo/selects._llgo_routine$1", ptr %12) %16 = load ptr, ptr %0, align 8 %17 = alloca {}, align 8 call void @llvm.memset(ptr %17, i8 0, i64 0, i1 false) @@ -125,7 +125,7 @@ _llgo_5: ; preds = %_llgo_3 unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.main$1"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testgo/selects.main$1"(ptr %0) { _llgo_0: %1 = load { ptr, ptr, ptr }, ptr %0, align 8 %2 = extractvalue { ptr, ptr, ptr } %1, 0 @@ -208,7 +208,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) declare ptr @malloc(i64) -define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects._llgo_routine$1"(ptr %0) { +define ptr @"github.com/goplus/llgo/cl/_testgo/selects._llgo_routine$1"(ptr %0) { _llgo_0: %1 = load { { ptr, ptr } }, ptr %0, align 8 %2 = extractvalue { { ptr, ptr } } %1, 0 @@ -234,7 +234,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) declare { i64, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.Select"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice") -define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/selects.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testgo/sigsegv/in.go b/cl/_testgo/sigsegv/in.go similarity index 100% rename from compiler/cl/_testgo/sigsegv/in.go rename to cl/_testgo/sigsegv/in.go diff --git a/compiler/cl/_testgo/sigsegv/out.ll b/cl/_testgo/sigsegv/out.ll similarity index 100% rename from compiler/cl/_testgo/sigsegv/out.ll rename to cl/_testgo/sigsegv/out.ll diff --git a/compiler/cl/_testgo/strucintf/in.go b/cl/_testgo/strucintf/in.go similarity index 87% rename from compiler/cl/_testgo/strucintf/in.go rename to cl/_testgo/strucintf/in.go index 4fb44d9a..02387095 100644 --- a/compiler/cl/_testgo/strucintf/in.go +++ b/cl/_testgo/strucintf/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/compiler/cl/_testdata/foo" +import "github.com/goplus/llgo/cl/_testdata/foo" func Foo() any { return struct{ v int }{1} diff --git a/compiler/cl/_testgo/strucintf/out.ll b/cl/_testgo/strucintf/out.ll similarity index 83% rename from compiler/cl/_testgo/strucintf/out.ll rename to cl/_testgo/strucintf/out.ll index 0d080547..122842c2 100644 --- a/compiler/cl/_testgo/strucintf/out.ll +++ b/cl/_testgo/strucintf/out.ll @@ -1,23 +1,23 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/strucintf' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/strucintf" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/strucintf' +source_filename = "github.com/goplus/llgo/cl/_testgo/strucintf" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/strucintf.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [1 x i8] c"v", align 1 -@1 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/strucintf", align 1 +@1 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/_testgo/strucintf", align 1 @2 = private unnamed_addr constant [11 x i8] c"Foo: not ok", align 1 @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [1 x i8] c"V", align 1 @4 = private unnamed_addr constant [11 x i8] c"Bar: not ok", align 1 @5 = private unnamed_addr constant [9 x i8] c"F: not ok", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.Foo"() { +define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testgo/strucintf.Foo"() { _llgo_0: %0 = alloca { i64 }, align 8 call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) @@ -25,7 +25,7 @@ _llgo_0: store i64 1, ptr %1, align 4 %2 = load { i64 }, ptr %0, align 4 %3 = load ptr, ptr @_llgo_int, align 8 - %4 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %4 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %5 = extractvalue { i64 } %2, 0 %6 = inttoptr i64 %5 to ptr %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0 @@ -33,28 +33,28 @@ _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/strucintf.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/strucintf.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/strucintf.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/foo.init"() + call void @"github.com/goplus/llgo/cl/_testgo/strucintf.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/strucintf.main"() { _llgo_0: - %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.Foo"() + %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testgo/strucintf.Foo"() %1 = alloca { i64 }, align 8 call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) %2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 - %3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %3 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %4 = icmp eq ptr %2, %3 br i1 %4, label %_llgo_10, label %_llgo_11 @@ -66,7 +66,7 @@ _llgo_1: ; preds = %_llgo_12 br label %_llgo_2 _llgo_2: ; preds = %_llgo_3, %_llgo_1 - %7 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Bar"() + %7 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.Bar"() %8 = alloca { i64 }, align 8 call void @llvm.memset(ptr %8, i8 0, i64 8, i1 false) %9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 0 @@ -89,9 +89,9 @@ _llgo_4: ; preds = %_llgo_15 _llgo_5: ; preds = %_llgo_6, %_llgo_4 %14 = alloca { i64 }, align 8 call void @llvm.memset(ptr %14, i8 0, i64 8, i1 false) - %15 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.F"() + %15 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.F"() %16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, 0 - %17 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %17 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %18 = icmp eq ptr %16, %17 br i1 %18, label %_llgo_16, label %_llgo_17 @@ -173,7 +173,7 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/strucintf.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -193,8 +193,8 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %5, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 1, 1 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 1, 2 - %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) - store ptr %10, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) + store ptr %10, ptr @"github.com/goplus/llgo/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %12 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 1 }, ptr %11, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) @@ -203,7 +203,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %13, 0 %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 1, 1 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 2 - %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17) + %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17) store ptr %18, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 ret void } @@ -216,7 +216,7 @@ declare %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/ll declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) -declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() +declare void @"github.com/goplus/llgo/cl/_testdata/foo.init"() declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) @@ -224,8 +224,8 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String") -declare %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Bar"() +declare %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.Bar"() -declare %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.F"() +declare %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.F"() attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/compiler/cl/_testgo/struczero/in.go b/cl/_testgo/struczero/in.go similarity index 85% rename from compiler/cl/_testgo/struczero/in.go rename to cl/_testgo/struczero/in.go index 9bb44d4e..74841641 100644 --- a/compiler/cl/_testgo/struczero/in.go +++ b/cl/_testgo/struczero/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/compiler/cl/_testdata/foo" +import "github.com/goplus/llgo/cl/_testdata/foo" type bar struct { pb *byte diff --git a/compiler/cl/_testgo/struczero/out.ll b/cl/_testgo/struczero/out.ll similarity index 67% rename from compiler/cl/_testgo/struczero/out.ll rename to cl/_testgo/struczero/out.ll index 7e09645e..96e60be3 100644 --- a/compiler/cl/_testgo/struczero/out.ll +++ b/cl/_testgo/struczero/out.ll @@ -1,111 +1,111 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/struczero' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/struczero" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/struczero' +source_filename = "github.com/goplus/llgo/cl/_testgo/struczero" -%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" = type { ptr, float } +%"github.com/goplus/llgo/cl/_testdata/foo.Foo" = type { ptr, float } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" = type { ptr, float } +%"github.com/goplus/llgo/cl/_testgo/struczero.bar" = type { ptr, float } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo", align 1 +@"github.com/goplus/llgo/cl/_testgo/struczero.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Foo" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testdata/foo", align 1 @1 = private unnamed_addr constant [3 x i8] c"Foo", align 1 @_llgo_uint8 = linkonce global ptr null, align 8 @"*_llgo_uint8" = linkonce global ptr null, align 8 @_llgo_float32 = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$gB-6lDCpZ0V7ma2GTPMARivfSutm75zh84uE5OqxsI4" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/struczero.struct$gB-6lDCpZ0V7ma2GTPMARivfSutm75zh84uE5OqxsI4" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [2 x i8] c"pb", align 1 @3 = private unnamed_addr constant [1 x i8] c"F", align 1 -@4 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/struczero", align 1 +@4 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/_testgo/struczero", align 1 @5 = private unnamed_addr constant [2 x i8] c"Pb", align 1 @"_llgo_func$bbS9EKnYgxbrRntc_6WJN6WLF9IKQADblvN_cLtKCqY" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/struczero.bar" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [3 x i8] c"bar", align 1 -@"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$2215Oa2lkpk-YZ2pdVVs2mMqzhx1jppOCrAxbrX70ko" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/struczero.struct$2215Oa2lkpk-YZ2pdVVs2mMqzhx1jppOCrAxbrX70ko" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [1 x i8] c"f", align 1 @8 = private unnamed_addr constant [6 x i8] c"notOk:", align 1 -define { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Bar"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } @"github.com/goplus/llgo/cl/_testgo/struczero.Bar"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Foo", align 8 %3 = icmp eq ptr %1, %2 br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 1 - %5 = load %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %4, align 8 - %6 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } undef, %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %5, 0 - %7 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %6, i1 true, 1 + %5 = load %"github.com/goplus/llgo/cl/_testdata/foo.Foo", ptr %4, align 8 + %6 = insertvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } undef, %"github.com/goplus/llgo/cl/_testdata/foo.Foo" %5, 0 + %7 = insertvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %6, i1 true, 1 br label %_llgo_3 _llgo_2: ; preds = %_llgo_0 br label %_llgo_3 _llgo_3: ; preds = %_llgo_2, %_llgo_1 - %8 = phi { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ] - %9 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %8, 0 - %10 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %8, 1 - %11 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } undef, %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %9, 0 - %12 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %11, i1 %10, 1 - ret { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %12 + %8 = phi { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ] + %9 = extractvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %8, 0 + %10 = extractvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %8, 1 + %11 = insertvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } undef, %"github.com/goplus/llgo/cl/_testdata/foo.Foo" %9, 0 + %12 = insertvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %11, i1 %10, 1 + ret { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %12 } -define { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } @"github.com/goplus/llgo/cl/_testgo/struczero.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/struczero.bar", align 8 %3 = icmp eq ptr %1, %2 br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 1 - %5 = load %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", ptr %4, align 8 - %6 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } undef, %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" %5, 0 - %7 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %6, i1 true, 1 + %5 = load %"github.com/goplus/llgo/cl/_testgo/struczero.bar", ptr %4, align 8 + %6 = insertvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } undef, %"github.com/goplus/llgo/cl/_testgo/struczero.bar" %5, 0 + %7 = insertvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %6, i1 true, 1 br label %_llgo_3 _llgo_2: ; preds = %_llgo_0 br label %_llgo_3 _llgo_3: ; preds = %_llgo_2, %_llgo_1 - %8 = phi { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ] - %9 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %8, 0 - %10 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %8, 1 - %11 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } undef, %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" %9, 0 - %12 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %11, i1 %10, 1 - ret { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %12 + %8 = phi { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ] + %9 = extractvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %8, 0 + %10 = extractvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %8, 1 + %11 = insertvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } undef, %"github.com/goplus/llgo/cl/_testgo/struczero.bar" %9, 0 + %12 = insertvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %11, i1 %10, 1 + ret { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %12 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/struczero.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/struczero.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() - call void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/struczero.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/foo.init"() + call void @"github.com/goplus/llgo/cl/_testgo/struczero.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/struczero.main"() { _llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", align 8 + %0 = alloca %"github.com/goplus/llgo/cl/_testgo/struczero.bar", align 8 call void @llvm.memset(ptr %0, i8 0, i64 16, i1 false) - %1 = call { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer) - %2 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %1, 0 - store %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" %2, ptr %0, align 8 - %3 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %1, 1 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", ptr %0, i32 0, i32 0 + %1 = call { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } @"github.com/goplus/llgo/cl/_testgo/struczero.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer) + %2 = extractvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %1, 0 + store %"github.com/goplus/llgo/cl/_testgo/struczero.bar" %2, ptr %0, align 8 + %3 = extractvalue { %"github.com/goplus/llgo/cl/_testgo/struczero.bar", i1 } %1, 1 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/struczero.bar", ptr %0, i32 0, i32 0 %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", ptr %0, i32 0, i32 1 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/struczero.bar", ptr %0, i32 0, i32 1 %7 = load float, ptr %6, align 4 %8 = xor i1 %3, true call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %5) @@ -117,20 +117,20 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %8) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %10 = alloca %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8 + %10 = alloca %"github.com/goplus/llgo/cl/_testdata/foo.Foo", align 8 call void @llvm.memset(ptr %10, i8 0, i64 16, i1 false) - %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8 + %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Foo", align 8 %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" zeroinitializer, ptr %12, align 8 + store %"github.com/goplus/llgo/cl/_testdata/foo.Foo" zeroinitializer, ptr %12, align 8 %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %11, 0 %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, ptr %12, 1 - %15 = call { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Bar"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14) - %16 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %15, 0 - store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %16, ptr %10, align 8 - %17 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %15, 1 - %18 = load %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %10, align 8 - %19 = call ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %18) - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %10, i32 0, i32 1 + %15 = call { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } @"github.com/goplus/llgo/cl/_testgo/struczero.Bar"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14) + %16 = extractvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %15, 0 + store %"github.com/goplus/llgo/cl/_testdata/foo.Foo" %16, ptr %10, align 8 + %17 = extractvalue { %"github.com/goplus/llgo/cl/_testdata/foo.Foo", i1 } %15, 1 + %18 = load %"github.com/goplus/llgo/cl/_testdata/foo.Foo", ptr %10, align 8 + %19 = call ptr @"github.com/goplus/llgo/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/cl/_testdata/foo.Foo" %18) + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/foo.Foo", ptr %10, i32 0, i32 1 %21 = load float, ptr %20, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %19) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -142,15 +142,15 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/struczero.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 3 }, i64 25, i64 16, i64 1, i64 1) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 3 }, i64 25, i64 16, i64 1, i64 1) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Foo", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Foo", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -202,9 +202,9 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0 %25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i64 2, 1 %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25, i64 2, 2 - %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 52 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26) - store ptr %27, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$gB-6lDCpZ0V7ma2GTPMARivfSutm75zh84uE5OqxsI4", align 8 - %28 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$gB-6lDCpZ0V7ma2GTPMARivfSutm75zh84uE5OqxsI4", align 8 + %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 43 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26) + store ptr %27, ptr @"github.com/goplus/llgo/cl/_testgo/struczero.struct$gB-6lDCpZ0V7ma2GTPMARivfSutm75zh84uE5OqxsI4", align 8 + %28 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/struczero.struct$gB-6lDCpZ0V7ma2GTPMARivfSutm75zh84uE5OqxsI4", align 8 br i1 %2, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 @@ -215,8 +215,8 @@ _llgo_9: ; preds = %_llgo_8 br i1 %32, label %_llgo_11, label %_llgo_12 _llgo_10: ; preds = %_llgo_12, %_llgo_8 - %33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 3 }, i64 25, i64 16, i64 0, i64 0) - store ptr %33, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", align 8 + %33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 3 }, i64 25, i64 16, i64 0, i64 0) + store ptr %33, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/struczero.bar", align 8 %34 = load ptr, ptr @"*_llgo_uint8", align 8 %35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) %36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %35) @@ -231,9 +231,9 @@ _llgo_10: ; preds = %_llgo_12, %_llgo_8 %43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %40, 0 %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43, i64 2, 1 %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 2, 2 - %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 52 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45) - store ptr %46, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$2215Oa2lkpk-YZ2pdVVs2mMqzhx1jppOCrAxbrX70ko", align 8 - %47 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$2215Oa2lkpk-YZ2pdVVs2mMqzhx1jppOCrAxbrX70ko", align 8 + %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 43 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45) + store ptr %46, ptr @"github.com/goplus/llgo/cl/_testgo/struczero.struct$2215Oa2lkpk-YZ2pdVVs2mMqzhx1jppOCrAxbrX70ko", align 8 + %47 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/struczero.struct$2215Oa2lkpk-YZ2pdVVs2mMqzhx1jppOCrAxbrX70ko", align 8 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %33, ptr %47, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer) ret void @@ -256,11 +256,11 @@ _llgo_11: ; preds = %_llgo_9 _llgo_12: ; preds = %_llgo_11, %_llgo_9 %58 = load ptr, ptr @"_llgo_func$bbS9EKnYgxbrRntc_6WJN6WLF9IKQADblvN_cLtKCqY", align 8 %59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 2 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1 - %60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Foo).Pb", 2 - %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Foo).Pb", 3 + %60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Foo).Pb", 2 + %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Foo).Pb", 3 %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 2 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1 - %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Foo).Pb", 2 - %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb", 3 + %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Foo).Pb", 2 + %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/cl/_testdata/foo.Foo.Pb", 3 %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %66 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %65, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %64, ptr %66, align 8 @@ -295,11 +295,11 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr, p declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1) -declare ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Foo).Pb"(ptr) +declare ptr @"github.com/goplus/llgo/cl/_testdata/foo.(*Foo).Pb"(ptr) -declare ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo") +declare ptr @"github.com/goplus/llgo/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/cl/_testdata/foo.Foo") -declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"() +declare void @"github.com/goplus/llgo/cl/_testdata/foo.init"() ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 diff --git a/compiler/cl/_testgo/syncmap/in.go b/cl/_testgo/syncmap/in.go similarity index 100% rename from compiler/cl/_testgo/syncmap/in.go rename to cl/_testgo/syncmap/in.go diff --git a/compiler/cl/_testgo/syncmap/out.ll b/cl/_testgo/syncmap/out.ll similarity index 100% rename from compiler/cl/_testgo/syncmap/out.ll rename to cl/_testgo/syncmap/out.ll diff --git a/compiler/cl/_testgo/tpindex/in.go b/cl/_testgo/tpindex/in.go similarity index 100% rename from compiler/cl/_testgo/tpindex/in.go rename to cl/_testgo/tpindex/in.go diff --git a/compiler/cl/_testgo/tpindex/out.ll b/cl/_testgo/tpindex/out.ll similarity index 73% rename from compiler/cl/_testgo/tpindex/out.ll rename to cl/_testgo/tpindex/out.ll index f208ac85..5fd236a8 100644 --- a/compiler/cl/_testgo/tpindex/out.ll +++ b/cl/_testgo/tpindex/out.ll @@ -1,24 +1,24 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tpindex' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tpindex" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/tpindex' +source_filename = "github.com/goplus/llgo/cl/_testgo/tpindex" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/tpindex.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/tpindex.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/tpindex.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/tpindex.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/tpindex.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -34,10 +34,10 @@ _llgo_0: %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 5, 1 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 5, 2 - %9 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 3) + %9 = call i64 @"github.com/goplus/llgo/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 3) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %9) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %10 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 6) + %10 = call i64 @"github.com/goplus/llgo/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 6) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %10) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void @@ -45,7 +45,7 @@ _llgo_0: declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, i64 %1) { +define linkonce i64 @"github.com/goplus/llgo/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, i64 %1) { _llgo_0: %2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 br label %_llgo_1 diff --git a/compiler/cl/_testgo/tpinst/main.go b/cl/_testgo/tpinst/main.go similarity index 100% rename from compiler/cl/_testgo/tpinst/main.go rename to cl/_testgo/tpinst/main.go diff --git a/compiler/cl/_testgo/tpinst/out.ll b/cl/_testgo/tpinst/out.ll similarity index 79% rename from compiler/cl/_testgo/tpinst/out.ll rename to cl/_testgo/tpinst/out.ll index 97100a7e..228a3469 100644 --- a/compiler/cl/_testgo/tpinst/out.ll +++ b/cl/_testgo/tpinst/out.ll @@ -1,48 +1,48 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tpinst' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tpinst" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/tpinst' +source_filename = "github.com/goplus/llgo/cl/_testgo/tpinst" -%"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]" = type { i64 } +%"github.com/goplus/llgo/cl/_testgo/tpinst.M[int]" = type { i64 } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]" = type { double } +%"github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]" = type { double } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } -@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [49 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/tpinst", align 1 +@"github.com/goplus/llgo/cl/_testgo/tpinst.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [40 x i8] c"github.com/goplus/llgo/cl/_testgo/tpinst", align 1 @1 = private unnamed_addr constant [6 x i8] c"M[int]", align 1 @_llgo_int = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [1 x i8] c"v", align 1 @3 = private unnamed_addr constant [5 x i8] c"Value", align 1 @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [5 x i8] c"value", align 1 -@5 = private unnamed_addr constant [55 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.value", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8 +@5 = private unnamed_addr constant [46 x i8] c"github.com/goplus/llgo/cl/_testgo/tpinst.value", align 1 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8 @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [10 x i8] c"M[float64]", align 1 @_llgo_float64 = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU" = linkonce global ptr null, align 8 @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8 @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww" = linkonce global ptr null, align 8 -@8 = private unnamed_addr constant [104 x i8] c"type assertion github.com/goplus/llgo/compiler/cl/_testgo/tpinst.I[int] -> interface{value() int} failed", align 1 +@"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww" = linkonce global ptr null, align 8 +@8 = private unnamed_addr constant [95 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/tpinst.I[int] -> interface{value() int} failed", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.demo"() { +define void @"github.com/goplus/llgo/cl/_testgo/tpinst.demo"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0 store i64 100, ptr %1, align 4 - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8 - %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 + %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 %4 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %5 = load ptr, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %3) @@ -71,10 +71,10 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", ptr %23, i32 0, i32 0 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", ptr %23, i32 0, i32 0 store double 1.001000e+02, ptr %24, align 8 - %25 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8 - %26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8 + %25 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 + %26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 %27 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 %28 = load ptr, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8 %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %28, ptr %26) @@ -104,7 +104,7 @@ _llgo_3: ; preds = %_llgo_2 _llgo_4: ; preds = %_llgo_2 %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %8) %47 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %48 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 + %48 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 %49 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %48, ptr %46) br i1 %49, label %_llgo_7, label %_llgo_8 @@ -122,7 +122,7 @@ _llgo_6: ; preds = %_llgo_7 _llgo_7: ; preds = %_llgo_4 %54 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 1 - %55 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 + %55 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %55, ptr %46) %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %56, 0 %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %57, ptr %54, 1 @@ -141,72 +141,72 @@ _llgo_7: ; preds = %_llgo_4 _llgo_8: ; preds = %_llgo_4 %69 = load ptr, ptr @_llgo_string, align 8 %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 104 }, ptr %70, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 95 }, ptr %70, align 8 %71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0 %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %71, ptr %70, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %72) unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/tpinst.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/tpinst.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/tpinst.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.demo"() + call void @"github.com/goplus/llgo/cl/_testgo/tpinst.demo"() ret void } -define linkonce double @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).Value"(ptr %0) { +define linkonce double @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).Value"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", ptr %0, i32 0, i32 0 %2 = load double, ptr %1, align 8 ret double %2 } -define linkonce double @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).value"(ptr %0) { +define linkonce double @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).value"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", ptr %0, i32 0, i32 0 %2 = load double, ptr %1, align 8 ret double %2 } -define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).Value"(ptr %0) { +define linkonce i64 @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[int]).Value"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0 %2 = load i64, ptr %1, align 4 ret i64 %2 } -define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).value"(ptr %0) { +define linkonce i64 @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[int]).value"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0 %2 = load i64, ptr %1, align 4 ret i64 %2 } declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/tpinst.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 6 }, i64 25, i64 8, i64 0, i64 2) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 6 }, i64 25, i64 8, i64 0, i64 2) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -229,9 +229,9 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %9, 0 %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11, i64 1, 1 %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %12, i64 1, 2 - %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13) - store ptr %14, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 - %15 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13) + store ptr %14, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %15 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 br i1 %2, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 @@ -241,8 +241,8 @@ _llgo_5: ; preds = %_llgo_4 br i1 %18, label %_llgo_7, label %_llgo_8 _llgo_6: ; preds = %_llgo_8, %_llgo_4 - %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 6 }, i64 25, i64 8, i64 0, i64 2) - %20 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8 + %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 6 }, i64 25, i64 8, i64 0, i64 2) + %20 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 %21 = icmp eq ptr %20, null br i1 %21, label %_llgo_9, label %_llgo_10 @@ -265,12 +265,12 @@ _llgo_7: ; preds = %_llgo_5 _llgo_8: ; preds = %_llgo_7, %_llgo_5 %32 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %33 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %32, 1 - %34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).Value", 2 - %35 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %34, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).Value", 3 + %34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[int]).Value", 2 + %35 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %34, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[int]).Value", 3 %36 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 55 }, ptr undef, ptr undef, ptr undef }, ptr %36, 1 - %38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %37, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).value", 2 - %39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).value", 3 + %37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 46 }, ptr undef, ptr undef, ptr undef }, ptr %36, 1 + %38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %37, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[int]).value", 2 + %39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[int]).value", 3 %40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) %41 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %40, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %35, ptr %41, align 8 @@ -285,7 +285,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_5 _llgo_9: ; preds = %_llgo_6 %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %19) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %46) - store ptr %46, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8 + store ptr %46, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_6 @@ -302,7 +302,7 @@ _llgo_11: ; preds = %_llgo_10 %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %51, 0 %54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53, i64 1, 1 %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, i64 1, 2 - %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55) + %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55) store ptr %56, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8 br label %_llgo_12 @@ -317,13 +317,13 @@ _llgo_13: ; preds = %_llgo_12 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2) - %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8 + %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2) + %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 %62 = icmp eq ptr %61, null br i1 %62, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - store ptr %60, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8 + store ptr %60, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 @@ -346,9 +346,9 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 %71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %69, 0 %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %71, i64 1, 1 %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 1, 2 - %74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73) - store ptr %74, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8 - %75 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8 + %74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73) + store ptr %74, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8 + %75 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8 br i1 %62, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 @@ -358,8 +358,8 @@ _llgo_19: ; preds = %_llgo_18 br i1 %78, label %_llgo_21, label %_llgo_22 _llgo_20: ; preds = %_llgo_22, %_llgo_18 - %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2) - %80 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8 + %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2) + %80 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 %81 = icmp eq ptr %80, null br i1 %81, label %_llgo_23, label %_llgo_24 @@ -382,12 +382,12 @@ _llgo_21: ; preds = %_llgo_19 _llgo_22: ; preds = %_llgo_21, %_llgo_19 %92 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 %93 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %92, 1 - %94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %93, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).Value", 2 - %95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).Value", 3 + %94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %93, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).Value", 2 + %95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).Value", 3 %96 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 - %97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 55 }, ptr undef, ptr undef, ptr undef }, ptr %96, 1 - %98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).value", 2 - %99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).value", 3 + %97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 46 }, ptr undef, ptr undef, ptr undef }, ptr %96, 1 + %98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).value", 2 + %99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).value", 3 %100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) %101 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %100, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr %101, align 8 @@ -402,7 +402,7 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_19 _llgo_23: ; preds = %_llgo_20 %106 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %79) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %106) - store ptr %106, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8 + store ptr %106, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_20 @@ -419,21 +419,21 @@ _llgo_25: ; preds = %_llgo_24 %113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %111, 0 %114 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113, i64 1, 1 %115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %114, i64 1, 2 - %116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %115) + %116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %115) store ptr %116, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 %117 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 55 }, ptr undef }, ptr %117, 1 + %118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 46 }, ptr undef }, ptr %117, 1 %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) %120 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %119, i64 0 store %"github.com/goplus/llgo/runtime/abi.Imethod" %118, ptr %120, align 8 %121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %119, 0 %122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %121, i64 1, 1 %123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, i64 1, 2 - %124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123) - store ptr %124, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 + %124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123) + store ptr %124, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 ret void } diff --git a/compiler/cl/_testgo/tpnamed/in.go b/cl/_testgo/tpnamed/in.go similarity index 100% rename from compiler/cl/_testgo/tpnamed/in.go rename to cl/_testgo/tpnamed/in.go diff --git a/cl/_testgo/tpnamed/out.ll b/cl/_testgo/tpnamed/out.ll new file mode 100644 index 00000000..50409022 --- /dev/null +++ b/cl/_testgo/tpnamed/out.ll @@ -0,0 +1,90 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/tpnamed' +source_filename = "github.com/goplus/llgo/cl/_testgo/tpnamed" + +%"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[error]" = type { ptr, ptr } +%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[error]" = type { ptr, ptr } +%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[[0]byte]" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" = type { ptr, ptr } + +@"github.com/goplus/llgo/cl/_testgo/tpnamed.init$guard" = global i1 false, align 1 + +define %"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[error]" @"github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +_llgo_0: + ret %"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[error]" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1", ptr null } +} + +define %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[error]" @"github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1"() { +_llgo_0: + ret %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[error]" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1$1", ptr null } +} + +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1$1"() { +_llgo_0: + ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer +} + +define void @"github.com/goplus/llgo/cl/_testgo/tpnamed.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/tpnamed.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/tpnamed.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testgo/tpnamed.main"() { +_llgo_0: + %0 = call [0 x i8] @"github.com/goplus/llgo/cl/_testgo/tpnamed.RunIO[[0]byte]"(%"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[[0]byte]" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.main$1", ptr null }) + ret void +} + +define %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" @"github.com/goplus/llgo/cl/_testgo/tpnamed.main$1"() { +_llgo_0: + ret %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.main$1$1", ptr null } +} + +define [0 x i8] @"github.com/goplus/llgo/cl/_testgo/tpnamed.main$1$1"() { +_llgo_0: + ret [0 x i8] zeroinitializer +} + +define linkonce %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[error]" @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1"(ptr %0) { +_llgo_0: + %1 = tail call %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[error]" @"github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1"() + ret %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[error]" %1 +} + +define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1$1"(ptr %0) { +_llgo_0: + %1 = tail call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/tpnamed.WriteFile$1$1"() + ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1 +} + +define linkonce %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.main$1"(ptr %0) { +_llgo_0: + %1 = tail call %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" @"github.com/goplus/llgo/cl/_testgo/tpnamed.main$1"() + ret %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" %1 +} + +define linkonce [0 x i8] @"github.com/goplus/llgo/cl/_testgo/tpnamed.RunIO[[0]byte]"(%"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[[0]byte]" %0) { +_llgo_0: + %1 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[[0]byte]" %0, 1 + %2 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tpnamed.IO[[0]byte]" %0, 0 + %3 = call %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" %2(ptr %1) + %4 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" %3, 1 + %5 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tpnamed.Future[[0]byte]" %3, 0 + %6 = call [0 x i8] %5(ptr %4) + ret [0 x i8] %6 +} + +define linkonce [0 x i8] @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tpnamed.main$1$1"(ptr %0) { +_llgo_0: + %1 = tail call [0 x i8] @"github.com/goplus/llgo/cl/_testgo/tpnamed.main$1$1"() + ret [0 x i8] %1 +} diff --git a/compiler/cl/_testgo/tprecur/in.go b/cl/_testgo/tprecur/in.go similarity index 100% rename from compiler/cl/_testgo/tprecur/in.go rename to cl/_testgo/tprecur/in.go diff --git a/compiler/cl/_testgo/tprecur/out.ll b/cl/_testgo/tprecur/out.ll similarity index 75% rename from compiler/cl/_testgo/tprecur/out.ll rename to cl/_testgo/tprecur/out.ll index 3be81881..97205130 100644 --- a/compiler/cl/_testgo/tprecur/out.ll +++ b/cl/_testgo/tprecur/out.ll @@ -1,37 +1,37 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tprecur' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tprecur" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/tprecur' +source_filename = "github.com/goplus/llgo/cl/_testgo/tprecur" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/tprecur.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/tprecur.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/tprecur.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/tprecur.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testgo/tprecur.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/tprecur.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recursive"() + call void @"github.com/goplus/llgo/cl/_testgo/tprecur.recursive"() ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recursive"() { +define void @"github.com/goplus/llgo/cl/_testgo/tprecur.recursive"() { _llgo_0: - %0 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 5) + %0 = call i64 @"github.com/goplus/llgo/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/cl/_testgo/tprecur.T]"(i64 5) %1 = icmp ne i64 %0, 110 br i1 %1, label %_llgo_1, label %_llgo_2 @@ -48,7 +48,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %0) { +define linkonce i64 @"github.com/goplus/llgo/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/cl/_testgo/tprecur.T]"(i64 %0) { _llgo_0: %1 = icmp eq i64 %0, 0 br i1 %1, label %_llgo_1, label %_llgo_3 @@ -58,7 +58,7 @@ _llgo_1: ; preds = %_llgo_3, %_llgo_0 _llgo_2: ; preds = %_llgo_3 %2 = sub i64 %0, 1 - %3 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur2[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %2) + %3 = call i64 @"github.com/goplus/llgo/cl/_testgo/tprecur.recur2[github.com/goplus/llgo/cl/_testgo/tprecur.T]"(i64 %2) %4 = mul i64 %0, %3 ret i64 %4 @@ -67,7 +67,7 @@ _llgo_3: ; preds = %_llgo_0 br i1 %5, label %_llgo_1, label %_llgo_2 } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init$after"() { +define void @"github.com/goplus/llgo/cl/_testgo/tprecur.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null @@ -88,7 +88,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface") -define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur2[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %0) { +define linkonce i64 @"github.com/goplus/llgo/cl/_testgo/tprecur.recur2[github.com/goplus/llgo/cl/_testgo/tprecur.T]"(i64 %0) { _llgo_0: %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.MakeSlice"(i64 %0, i64 %0, i64 8) %2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1 @@ -137,7 +137,7 @@ _llgo_5: ; preds = %_llgo_4 _llgo_6: ; preds = %_llgo_4 %26 = sub i64 %0, 1 - %27 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %26) + %27 = call i64 @"github.com/goplus/llgo/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/cl/_testgo/tprecur.T]"(i64 %26) %28 = add i64 %14, %27 ret i64 %28 } diff --git a/compiler/cl/_testgo/tprecurfn/in.go b/cl/_testgo/tprecurfn/in.go similarity index 100% rename from compiler/cl/_testgo/tprecurfn/in.go rename to cl/_testgo/tprecurfn/in.go diff --git a/cl/_testgo/tprecurfn/out.ll b/cl/_testgo/tprecurfn/out.ll new file mode 100644 index 00000000..403e089a --- /dev/null +++ b/cl/_testgo/tprecurfn/out.ll @@ -0,0 +1,56 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/tprecurfn' +source_filename = "github.com/goplus/llgo/cl/_testgo/tprecurfn" + +%"github.com/goplus/llgo/cl/_testgo/tprecurfn.My[int]" = type { { ptr, ptr }, ptr } + +@"github.com/goplus/llgo/cl/_testgo/tprecurfn.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testgo/tprecurfn.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/tprecurfn.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/tprecurfn.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testgo/tprecurfn.main"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tprecurfn.My[int]", ptr %0, i32 0, i32 1 + %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tprecurfn.My[int]", ptr %2, i32 0, i32 0 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tprecurfn.main$1", ptr null }, ptr %3, align 8 + store ptr %2, ptr %1, align 8 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tprecurfn.My[int]", ptr %0, i32 0, i32 1 + %5 = load ptr, ptr %4, align 8 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tprecurfn.My[int]", ptr %5, i32 0, i32 0 + %7 = load { ptr, ptr }, ptr %6, align 8 + %8 = extractvalue { ptr, ptr } %7, 1 + %9 = extractvalue { ptr, ptr } %7, 0 + call void %9(ptr %8, i64 100) + ret void +} + +define void @"github.com/goplus/llgo/cl/_testgo/tprecurfn.main$1"(i64 %0) { +_llgo_0: + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %0) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + ret void +} + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) + +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testgo/tprecurfn.main$1"(ptr %0, i64 %1) { +_llgo_0: + tail call void @"github.com/goplus/llgo/cl/_testgo/tprecurfn.main$1"(i64 %1) + ret void +} + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) diff --git a/compiler/cl/_testgo/tptypes/in.go b/cl/_testgo/tptypes/in.go similarity index 100% rename from compiler/cl/_testgo/tptypes/in.go rename to cl/_testgo/tptypes/in.go diff --git a/compiler/cl/_testgo/tptypes/out.ll b/cl/_testgo/tptypes/out.ll similarity index 66% rename from compiler/cl/_testgo/tptypes/out.ll rename to cl/_testgo/tptypes/out.ll index d4d7fd1e..882cef34 100644 --- a/compiler/cl/_testgo/tptypes/out.ll +++ b/cl/_testgo/tptypes/out.ll @@ -1,61 +1,61 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tptypes' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tptypes" +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/tptypes' +source_filename = "github.com/goplus/llgo/cl/_testgo/tptypes" -%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]" = type { i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } +%"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]" = type { i64 } +%"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } -%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } +%"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } +%"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]string,string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } -@"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testgo/tptypes.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"hello", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.init"() { +define void @"github.com/goplus/llgo/cl/_testgo/tptypes.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/tptypes.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/tptypes.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.main"() { +define void @"github.com/goplus/llgo/cl/_testgo/tptypes.main"() { _llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", align 8 + %0 = alloca %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]", align 8 call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]", ptr %0, i32 0, i32 0 store i64 1, ptr %1, align 4 - %2 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %0, align 4 - %3 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]" %2, 0 + %2 = load %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]", ptr %0, align 4 + %3 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]" %2, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %4 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", align 8 + %4 = alloca %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]", align 8 call void @llvm.memset(ptr %4, i8 0, i64 16, i1 false) - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %4, i32 0, i32 0 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]", ptr %4, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %5, align 8 - %6 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %4, align 8 - %7 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]" %6, 0 + %6 = load %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]", ptr %4, align 8 + %7 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]" %6, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %7) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %8 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", align 8 + %8 = alloca %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]", align 8 call void @llvm.memset(ptr %8, i8 0, i64 8, i1 false) - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %8, i32 0, i32 0 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]", ptr %8, i32 0, i32 0 store i64 100, ptr %9, align 4 - %10 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %8, align 4 - %11 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]" %10, 0 + %10 = load %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]", ptr %8, align 4 + %11 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[int]" %10, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %12 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", align 8 + %12 = alloca %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]", align 8 call void @llvm.memset(ptr %12, i8 0, i64 16, i1 false) - %13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %12, i32 0, i32 0 + %13 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]", ptr %12, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %13, align 8 - %14 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %12, align 8 - %15 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]" %14, 0 + %14 = load %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]", ptr %12, align 8 + %15 = extractvalue %"github.com/goplus/llgo/cl/_testgo/tptypes.Data[string]" %14, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %15) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 0) @@ -67,7 +67,7 @@ _llgo_0: %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %17, 0 %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, i64 1, 1 %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20, i64 1, 2 - %22 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21) + %22 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21) %23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) %24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) %25 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %24, i64 0 @@ -75,7 +75,7 @@ _llgo_0: %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %24, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 1, 1 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 1, 2 - %29 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]string,string]).Append"(ptr %23, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28) + %29 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]string,string]).Append"(ptr %23, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28) %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %32 = getelementptr inbounds i64, ptr %31, i64 0 @@ -89,7 +89,7 @@ _llgo_0: %36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %31, 0 %37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 4, 1 %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, i64 4, 2 - %39 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38) + %39 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38) %40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %41 = getelementptr inbounds i64, ptr %40, i64 0 store i64 1, ptr %41, align 4 @@ -102,10 +102,10 @@ _llgo_0: %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %40, 0 %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 4, 1 %47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46, i64 4, 2 - %48 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append2"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %47) - %49 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %16, i32 0, i32 0 + %48 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]int,int]).Append2"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %47) + %49 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %16, i32 0, i32 0 %50 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %49, align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %16, i32 0, i32 0 + %51 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %16, i32 0, i32 0 %52 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %51, align 8 %53 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, 0 %54 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, 1 @@ -117,9 +117,9 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %57) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %58 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %23, i32 0, i32 0 + %58 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]string,string]", ptr %23, i32 0, i32 0 %59 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %58, align 8 - %60 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %23, i32 0, i32 0 + %60 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]string,string]", ptr %23, i32 0, i32 0 %61 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %60, align 8 %62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, 0 %63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, 1 @@ -131,9 +131,9 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %66) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %30, i32 0, i32 0 + %67 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %30, i32 0, i32 0 %68 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %67, align 8 - %69 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %30, i32 0, i32 0 + %69 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %30, i32 0, i32 0 %70 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %69, align 8 %71 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, 0 %72 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, 1 @@ -159,44 +159,44 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"gi declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8 %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 0 %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1 %6 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, ptr %4, i64 %5, i64 8) - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, ptr %7, align 8 - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 %9 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %8, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9 } -define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]string,string]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]string,string]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8 %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 0 %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1 %6 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, ptr %4, i64 %5, i64 16) - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, ptr %7, align 8 - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0 %9 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %8, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9 } -define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { +define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testgo/tptypes.(*Slice[[]int,int]).Append2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8 %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 0 %5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1 %6 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, ptr %4, i64 %5, i64 8) - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, ptr %7, align 8 - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0 %9 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %8, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9 } diff --git a/compiler/cl/_testlibc/allocacstrs/in.go b/cl/_testlibc/allocacstrs/in.go similarity index 85% rename from compiler/cl/_testlibc/allocacstrs/in.go rename to cl/_testlibc/allocacstrs/in.go index 6df19ea5..05a532cb 100644 --- a/compiler/cl/_testlibc/allocacstrs/in.go +++ b/cl/_testlibc/allocacstrs/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" func main() { cstrs := c.AllocaCStrs([]string{"a", "b", "c"}, true) diff --git a/compiler/cl/_testlibc/allocacstrs/out.ll b/cl/_testlibc/allocacstrs/out.ll similarity index 86% rename from compiler/cl/_testlibc/allocacstrs/out.ll rename to cl/_testlibc/allocacstrs/out.ll index 2c3f0567..9a99e19a 100644 --- a/compiler/cl/_testlibc/allocacstrs/out.ll +++ b/cl/_testlibc/allocacstrs/out.ll @@ -1,29 +1,29 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibc/allocacstrs' +source_filename = "github.com/goplus/llgo/cl/_testlibc/allocacstrs" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibc/allocacstrs.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [1 x i8] c"a", align 1 @1 = private unnamed_addr constant [1 x i8] c"b", align 1 @2 = private unnamed_addr constant [1 x i8] c"c", align 1 @3 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs.init"() { +define void @"github.com/goplus/llgo/cl/_testlibc/allocacstrs.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibc/allocacstrs.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibc/allocacstrs.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/allocacstrs.main"() { +define void @"github.com/goplus/llgo/cl/_testlibc/allocacstrs.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48) %1 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %0, i64 0 diff --git a/compiler/cl/_testlibc/argv/in.go b/cl/_testlibc/argv/in.go similarity index 82% rename from compiler/cl/_testlibc/argv/in.go rename to cl/_testlibc/argv/in.go index b4055521..ffdcc038 100644 --- a/compiler/cl/_testlibc/argv/in.go +++ b/cl/_testlibc/argv/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/compiler/cl/_testlibc/argv/out.ll b/cl/_testlibc/argv/out.ll similarity index 65% rename from compiler/cl/_testlibc/argv/out.ll rename to cl/_testlibc/argv/out.ll index d21aa22e..0671f36b 100644 --- a/compiler/cl/_testlibc/argv/out.ll +++ b/cl/_testlibc/argv/out.ll @@ -1,25 +1,25 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibc/argv' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibc/argv" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibc/argv' +source_filename = "github.com/goplus/llgo/cl/_testlibc/argv" -@"github.com/goplus/llgo/compiler/cl/_testlibc/argv.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibc/argv.init$guard" = global i1 false, align 1 @__llgo_argc = external global i32, align 4 @0 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @__llgo_argv = external global ptr, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/argv.init"() { +define void @"github.com/goplus/llgo/cl/_testlibc/argv.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/argv.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibc/argv.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/argv.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibc/argv.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/argv.main"() { +define void @"github.com/goplus/llgo/cl/_testlibc/argv.main"() { _llgo_0: br label %_llgo_1 diff --git a/compiler/cl/_testlibc/atomic/in.go b/cl/_testlibc/atomic/in.go similarity index 87% rename from compiler/cl/_testlibc/atomic/in.go rename to cl/_testlibc/atomic/in.go index 7f17b60f..b8bba2b0 100644 --- a/compiler/cl/_testlibc/atomic/in.go +++ b/cl/_testlibc/atomic/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/sync/atomic" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/sync/atomic" ) func main() { diff --git a/compiler/cl/_testlibc/atomic/out.ll b/cl/_testlibc/atomic/out.ll similarity index 75% rename from compiler/cl/_testlibc/atomic/out.ll rename to cl/_testlibc/atomic/out.ll index 052c4efd..213abeef 100644 --- a/compiler/cl/_testlibc/atomic/out.ll +++ b/cl/_testlibc/atomic/out.ll @@ -1,27 +1,27 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibc/atomic' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibc/atomic" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibc/atomic' +source_filename = "github.com/goplus/llgo/cl/_testlibc/atomic" -@"github.com/goplus/llgo/compiler/cl/_testlibc/atomic.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibc/atomic.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [12 x i8] c"store: %ld\0A\00", align 1 @1 = private unnamed_addr constant [18 x i8] c"ret: %ld, v: %ld\0A\00", align 1 @2 = private unnamed_addr constant [25 x i8] c"ret: %ld vs 100, v: %ld\0A\00", align 1 @3 = private unnamed_addr constant [25 x i8] c"ret: %ld vs 101, v: %ld\0A\00", align 1 @4 = private unnamed_addr constant [18 x i8] c"ret: %ld, v: %ld\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/atomic.init"() { +define void @"github.com/goplus/llgo/cl/_testlibc/atomic.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/atomic.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibc/atomic.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/atomic.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibc/atomic.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/atomic.main"() { +define void @"github.com/goplus/llgo/cl/_testlibc/atomic.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store atomic i64 100, ptr %0 seq_cst, align 4 diff --git a/compiler/cl/_testlibc/complex/in.go b/cl/_testlibc/complex/in.go similarity index 82% rename from compiler/cl/_testlibc/complex/in.go rename to cl/_testlibc/complex/in.go index 73f6bf97..e397aad1 100644 --- a/compiler/cl/_testlibc/complex/in.go +++ b/cl/_testlibc/complex/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/math/cmplx" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/math/cmplx" ) func f(c, z complex64, addr c.Pointer) { diff --git a/compiler/cl/_testlibc/complex/out.ll b/cl/_testlibc/complex/out.ll similarity index 74% rename from compiler/cl/_testlibc/complex/out.ll rename to cl/_testlibc/complex/out.ll index 0f4a21f9..ce35fe33 100644 --- a/compiler/cl/_testlibc/complex/out.ll +++ b/cl/_testlibc/complex/out.ll @@ -1,15 +1,15 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibc/complex' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibc/complex" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibc/complex' +source_filename = "github.com/goplus/llgo/cl/_testlibc/complex" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testlibc/complex.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibc/complex.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"addr:", align 1 @1 = private unnamed_addr constant [10 x i8] c"abs(3+4i):", align 1 @2 = private unnamed_addr constant [11 x i8] c"real(3+4i):", align 1 @3 = private unnamed_addr constant [11 x i8] c"imag(3+4i):", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.f"({ float, float } %0, { float, float } %1, ptr %2) { +define void @"github.com/goplus/llgo/cl/_testlibc/complex.f"({ float, float } %0, { float, float } %1, ptr %2) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -36,22 +36,22 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.init"() { +define void @"github.com/goplus/llgo/cl/_testlibc/complex.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibc/complex.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibc/complex.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.main"() { +define void @"github.com/goplus/llgo/cl/_testlibc/complex.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.f"({ float, float } { float 3.000000e+00, float 4.000000e+00 }, { float, float } { float 3.000000e+00, float 4.000000e+00 }, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/complex.f") + call void @"github.com/goplus/llgo/cl/_testlibc/complex.f"({ float, float } { float 3.000000e+00, float 4.000000e+00 }, { float, float } { float 3.000000e+00, float 4.000000e+00 }, ptr @"github.com/goplus/llgo/cl/_testlibc/complex.f") ret void } diff --git a/compiler/cl/_testlibc/defer/in.go b/cl/_testlibc/defer/in.go similarity index 87% rename from compiler/cl/_testlibc/defer/in.go rename to cl/_testlibc/defer/in.go index 592ac32d..ea42c8b1 100644 --- a/compiler/cl/_testlibc/defer/in.go +++ b/cl/_testlibc/defer/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" func f(s string) bool { return len(s) > 2 diff --git a/compiler/cl/_testlibc/defer/out.ll b/cl/_testlibc/defer/out.ll similarity index 100% rename from compiler/cl/_testlibc/defer/out.ll rename to cl/_testlibc/defer/out.ll diff --git a/compiler/cl/_testlibc/demangle/in.go b/cl/_testlibc/demangle/in.go similarity index 78% rename from compiler/cl/_testlibc/demangle/in.go rename to cl/_testlibc/demangle/in.go index d1b0d591..8bd64fcf 100644 --- a/compiler/cl/_testlibc/demangle/in.go +++ b/cl/_testlibc/demangle/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/llvm" + "github.com/goplus/lib/c" + "github.com/goplus/lib/cpp/llvm" ) func main() { diff --git a/compiler/cl/_testlibc/demangle/out.ll b/cl/_testlibc/demangle/out.ll similarity index 75% rename from compiler/cl/_testlibc/demangle/out.ll rename to cl/_testlibc/demangle/out.ll index b7ab929e..e061dd4f 100644 --- a/compiler/cl/_testlibc/demangle/out.ll +++ b/cl/_testlibc/demangle/out.ll @@ -1,27 +1,27 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibc/demangle' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibc/demangle" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibc/demangle' +source_filename = "github.com/goplus/llgo/cl/_testlibc/demangle" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testlibc/demangle.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibc/demangle.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [29 x i8] c"__ZNK9INIReader10ParseErrorEv", align 1 @1 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @2 = private unnamed_addr constant [18 x i8] c"Failed to demangle", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/demangle.init"() { +define void @"github.com/goplus/llgo/cl/_testlibc/demangle.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/demangle.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibc/demangle.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/demangle.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibc/demangle.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/demangle.main"() { +define void @"github.com/goplus/llgo/cl/_testlibc/demangle.main"() { _llgo_0: %0 = call ptr @_ZN4llvm15itaniumDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 29 }, i1 true) %1 = icmp ne ptr %0, null diff --git a/compiler/cl/_testlibc/once/in.go b/cl/_testlibc/once/in.go similarity index 78% rename from compiler/cl/_testlibc/once/in.go rename to cl/_testlibc/once/in.go index 216c8381..19fb8e4d 100644 --- a/compiler/cl/_testlibc/once/in.go +++ b/cl/_testlibc/once/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/pthread/sync" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/pthread/sync" ) var once sync.Once = sync.OnceInit diff --git a/compiler/cl/_testlibc/once/out.ll b/cl/_testlibc/once/out.ll similarity index 100% rename from compiler/cl/_testlibc/once/out.ll rename to cl/_testlibc/once/out.ll diff --git a/compiler/cl/_testlibc/setjmp/in.go b/cl/_testlibc/setjmp/in.go similarity index 91% rename from compiler/cl/_testlibc/setjmp/in.go rename to cl/_testlibc/setjmp/in.go index 7e8a6bf4..898af39b 100644 --- a/compiler/cl/_testlibc/setjmp/in.go +++ b/cl/_testlibc/setjmp/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/compiler/cl/_testlibc/setjmp/out.ll b/cl/_testlibc/setjmp/out.ll similarity index 100% rename from compiler/cl/_testlibc/setjmp/out.ll rename to cl/_testlibc/setjmp/out.ll diff --git a/compiler/cl/_testlibc/sqlite/in.go b/cl/_testlibc/sqlite/in.go similarity index 82% rename from compiler/cl/_testlibc/sqlite/in.go rename to cl/_testlibc/sqlite/in.go index ab6aabf7..762c5235 100644 --- a/compiler/cl/_testlibc/sqlite/in.go +++ b/cl/_testlibc/sqlite/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/sqlite" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/sqlite" ) func main() { diff --git a/compiler/cl/_testlibc/sqlite/out.ll b/cl/_testlibc/sqlite/out.ll similarity index 53% rename from compiler/cl/_testlibc/sqlite/out.ll rename to cl/_testlibc/sqlite/out.ll index 8adfd6a7..f55db8b2 100644 --- a/compiler/cl/_testlibc/sqlite/out.ll +++ b/cl/_testlibc/sqlite/out.ll @@ -1,11 +1,11 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibc/sqlite' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibc/sqlite" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibc/sqlite' +source_filename = "github.com/goplus/llgo/cl/_testlibc/sqlite" -@"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibc/sqlite.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [20 x i8] c"==> Error: (%d) %s\0A\00", align 1 @1 = private unnamed_addr constant [9 x i8] c":memory:\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.check"(i32 %0) { +define void @"github.com/goplus/llgo/cl/_testlibc/sqlite.check"(i32 %0) { _llgo_0: %1 = icmp ne i32 %0, 0 br i1 %1, label %_llgo_1, label %_llgo_2 @@ -20,25 +20,25 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.init"() { +define void @"github.com/goplus/llgo/cl/_testlibc/sqlite.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibc/sqlite.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibc/sqlite.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.main"() { +define void @"github.com/goplus/llgo/cl/_testlibc/sqlite.main"() { _llgo_0: - %0 = call { ptr, i32 } @"github.com/goplus/llgo/c/sqlite.OpenV2"(ptr @1, i32 130, ptr null) + %0 = call { ptr, i32 } @"github.com/goplus/lib/c/sqlite.OpenV2"(ptr @1, i32 130, ptr null) %1 = extractvalue { ptr, i32 } %0, 0 %2 = extractvalue { ptr, i32 } %0, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testlibc/sqlite.check"(i32 %2) + call void @"github.com/goplus/llgo/cl/_testlibc/sqlite.check"(i32 %2) %3 = call i32 @sqlite3_close(ptr %1) ret void } @@ -49,6 +49,6 @@ declare i32 @printf(ptr, ...) declare void @exit(i32) -declare { ptr, i32 } @"github.com/goplus/llgo/c/sqlite.OpenV2"(ptr, i32, ptr) +declare { ptr, i32 } @"github.com/goplus/lib/c/sqlite.OpenV2"(ptr, i32, ptr) declare i32 @sqlite3_close(ptr) diff --git a/compiler/cl/_testlibgo/atomic/in.go b/cl/_testlibgo/atomic/in.go similarity index 100% rename from compiler/cl/_testlibgo/atomic/in.go rename to cl/_testlibgo/atomic/in.go diff --git a/compiler/cl/_testlibgo/atomic/out.ll b/cl/_testlibgo/atomic/out.ll similarity index 90% rename from compiler/cl/_testlibgo/atomic/out.ll rename to cl/_testlibgo/atomic/out.ll index ab3d3d8e..7e2a18bd 100644 --- a/compiler/cl/_testlibgo/atomic/out.ll +++ b/cl/_testlibgo/atomic/out.ll @@ -1,21 +1,21 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/atomic' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/atomic" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/atomic' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/atomic" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/atomic.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"store:", align 1 @1 = private unnamed_addr constant [4 x i8] c"ret:", align 1 @2 = private unnamed_addr constant [2 x i8] c"v:", align 1 @3 = private unnamed_addr constant [4 x i8] c"swp:", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/atomic.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/atomic.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/atomic.init$guard", align 1 call void @"sync/atomic.init"() br label %_llgo_2 @@ -23,7 +23,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/atomic.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store atomic i64 100, ptr %0 seq_cst, align 4 diff --git a/compiler/cl/_testlibgo/bytes/in.go b/cl/_testlibgo/bytes/in.go similarity index 100% rename from compiler/cl/_testlibgo/bytes/in.go rename to cl/_testlibgo/bytes/in.go diff --git a/compiler/cl/_testlibgo/bytes/out.ll b/cl/_testlibgo/bytes/out.ll similarity index 88% rename from compiler/cl/_testlibgo/bytes/out.ll rename to cl/_testlibgo/bytes/out.ll index 858564ee..672bb21b 100644 --- a/compiler/cl/_testlibgo/bytes/out.ll +++ b/cl/_testlibgo/bytes/out.ll @@ -1,24 +1,24 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/bytes' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/bytes" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/bytes' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/bytes" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/bytes.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"Hello ", align 1 @1 = private unnamed_addr constant [5 x i8] c"World", align 1 @2 = private unnamed_addr constant [3 x i8] c"buf", align 1 @3 = private unnamed_addr constant [2 x i8] c"Go", align 1 @4 = private unnamed_addr constant [2 x i8] c"go", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/bytes.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/bytes.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/bytes.init$guard", align 1 call void @bytes.init() br label %_llgo_2 @@ -26,7 +26,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/bytes.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 }) diff --git a/compiler/cl/_testlibgo/complex/in.go b/cl/_testlibgo/complex/in.go similarity index 100% rename from compiler/cl/_testlibgo/complex/in.go rename to cl/_testlibgo/complex/in.go diff --git a/compiler/cl/_testlibgo/complex/out.ll b/cl/_testlibgo/complex/out.ll similarity index 71% rename from compiler/cl/_testlibgo/complex/out.ll rename to cl/_testlibgo/complex/out.ll index c42614d7..5d898e91 100644 --- a/compiler/cl/_testlibgo/complex/out.ll +++ b/cl/_testlibgo/complex/out.ll @@ -1,14 +1,14 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/complex' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/complex" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/complex' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/complex" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/complex.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [10 x i8] c"abs(3+4i):", align 1 @1 = private unnamed_addr constant [11 x i8] c"real(3+4i):", align 1 @2 = private unnamed_addr constant [11 x i8] c"imag(3+4i):", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.f"({ double, double } %0, { double, double } %1) { +define void @"github.com/goplus/llgo/cl/_testlibgo/complex.f"({ double, double } %0, { double, double } %1) { _llgo_0: %2 = call double @cabs({ double, double } %0) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 10 }) @@ -28,13 +28,13 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/complex.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/complex.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/complex.init$guard", align 1 call void @"math/cmplx.init"() br label %_llgo_2 @@ -42,9 +42,9 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/complex.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.f"({ double, double } { double 3.000000e+00, double 4.000000e+00 }, { double, double } { double 3.000000e+00, double 4.000000e+00 }) + call void @"github.com/goplus/llgo/cl/_testlibgo/complex.f"({ double, double } { double 3.000000e+00, double 4.000000e+00 }, { double, double } { double 3.000000e+00, double 4.000000e+00 }) ret void } diff --git a/compiler/cl/_testlibgo/errors/in.go b/cl/_testlibgo/errors/in.go similarity index 100% rename from compiler/cl/_testlibgo/errors/in.go rename to cl/_testlibgo/errors/in.go diff --git a/compiler/cl/_testlibgo/errors/out.ll b/cl/_testlibgo/errors/out.ll similarity index 74% rename from compiler/cl/_testlibgo/errors/out.ll rename to cl/_testlibgo/errors/out.ll index c7d9ca03..f568287a 100644 --- a/compiler/cl/_testlibgo/errors/out.ll +++ b/cl/_testlibgo/errors/out.ll @@ -1,20 +1,20 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/errors' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/errors" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/errors' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/errors" %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/errors.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"error", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/errors.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/errors.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/errors.init$guard", align 1 call void @errors.init() br label %_llgo_2 @@ -22,7 +22,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/errors.main"() { _llgo_0: %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @errors.New(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) diff --git a/compiler/cl/_testlibgo/math/in.go b/cl/_testlibgo/math/in.go similarity index 100% rename from compiler/cl/_testlibgo/math/in.go rename to cl/_testlibgo/math/in.go diff --git a/compiler/cl/_testlibgo/math/out.ll b/cl/_testlibgo/math/out.ll similarity index 68% rename from compiler/cl/_testlibgo/math/out.ll rename to cl/_testlibgo/math/out.ll index 969d206e..879d3be1 100644 --- a/compiler/cl/_testlibgo/math/out.ll +++ b/cl/_testlibgo/math/out.ll @@ -1,15 +1,15 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/math' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/math" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/math' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/math" -@"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/math.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/math.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/math.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/math.init$guard", align 1 call void @math.init() br label %_llgo_2 @@ -17,7 +17,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/math.main"() { _llgo_0: %0 = call double @sqrt(double 2.000000e+00) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %0) diff --git a/compiler/cl/_testlibgo/mathbits/in.go b/cl/_testlibgo/mathbits/in.go similarity index 100% rename from compiler/cl/_testlibgo/mathbits/in.go rename to cl/_testlibgo/mathbits/in.go diff --git a/compiler/cl/_testlibgo/mathbits/out.ll b/cl/_testlibgo/mathbits/out.ll similarity index 61% rename from compiler/cl/_testlibgo/mathbits/out.ll rename to cl/_testlibgo/mathbits/out.ll index 46fcdaa7..73de6fe3 100644 --- a/compiler/cl/_testlibgo/mathbits/out.ll +++ b/cl/_testlibgo/mathbits/out.ll @@ -1,15 +1,15 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/mathbits' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/mathbits" -@"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/mathbits.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/mathbits.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/mathbits.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/mathbits.init$guard", align 1 call void @"math/bits.init"() br label %_llgo_2 @@ -17,7 +17,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/mathbits.main"() { _llgo_0: %0 = call i64 @"math/bits.Len8"(i8 20) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %0) diff --git a/compiler/cl/_testlibgo/nettextproto/in.go b/cl/_testlibgo/nettextproto/in.go similarity index 100% rename from compiler/cl/_testlibgo/nettextproto/in.go rename to cl/_testlibgo/nettextproto/in.go diff --git a/compiler/cl/_testlibgo/nettextproto/out.ll b/cl/_testlibgo/nettextproto/out.ll similarity index 66% rename from compiler/cl/_testlibgo/nettextproto/out.ll rename to cl/_testlibgo/nettextproto/out.ll index 06d3f994..cce1f483 100644 --- a/compiler/cl/_testlibgo/nettextproto/out.ll +++ b/cl/_testlibgo/nettextproto/out.ll @@ -1,18 +1,18 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/nettextproto' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/nettextproto" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/nettextproto.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [4 x i8] c"host", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/nettextproto.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/nettextproto.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/nettextproto.init$guard", align 1 call void @"net/textproto.init"() br label %_llgo_2 @@ -20,7 +20,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/nettextproto.main"() { _llgo_0: %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"net/textproto.CanonicalMIMEHeaderKey"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) diff --git a/compiler/cl/_testlibgo/os/in.go b/cl/_testlibgo/os/in.go similarity index 100% rename from compiler/cl/_testlibgo/os/in.go rename to cl/_testlibgo/os/in.go diff --git a/compiler/cl/_testlibgo/os/out.ll b/cl/_testlibgo/os/out.ll similarity index 87% rename from compiler/cl/_testlibgo/os/out.ll rename to cl/_testlibgo/os/out.ll index ce16f79c..76ad619b 100644 --- a/compiler/cl/_testlibgo/os/out.ll +++ b/cl/_testlibgo/os/out.ll @@ -1,20 +1,20 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/os' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/os" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/os' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/os" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/os.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [4 x i8] c"cwd:", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/os.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/os.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/os.init$guard", align 1 call void @os.init() br label %_llgo_2 @@ -22,7 +22,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/os.main"() { _llgo_0: %0 = call { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @os.Getwd() %1 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %0, 0 diff --git a/compiler/cl/_testlibgo/strings/in.go b/cl/_testlibgo/strings/in.go similarity index 100% rename from compiler/cl/_testlibgo/strings/in.go rename to cl/_testlibgo/strings/in.go diff --git a/compiler/cl/_testlibgo/strings/out.ll b/cl/_testlibgo/strings/out.ll similarity index 82% rename from compiler/cl/_testlibgo/strings/out.ll rename to cl/_testlibgo/strings/out.ll index 62c15564..2f33151d 100644 --- a/compiler/cl/_testlibgo/strings/out.ll +++ b/cl/_testlibgo/strings/out.ll @@ -1,11 +1,11 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/strings' -source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/strings" +; ModuleID = 'github.com/goplus/llgo/cl/_testlibgo/strings' +source_filename = "github.com/goplus/llgo/cl/_testlibgo/strings" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testlibgo/strings.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"Hello ", align 1 @1 = private unnamed_addr constant [5 x i8] c"World", align 1 @2 = private unnamed_addr constant [4 x i8] c"len:", align 1 @@ -15,13 +15,13 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/strings" @6 = private unnamed_addr constant [12 x i8] c"Hello, world", align 1 @unicode.Han = external global ptr, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/strings.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testlibgo/strings.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testlibgo/strings.init$guard", align 1 call void @strings.init() call void @unicode.init() br label %_llgo_2 @@ -30,7 +30,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main"() { +define void @"github.com/goplus/llgo/cl/_testlibgo/strings.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 }) @@ -51,16 +51,16 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %6) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %7 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 13 }, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1", ptr null }) + %7 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 13 }, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testlibgo/strings.main$1", ptr null }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %8 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 12 }, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1", ptr null }) + %8 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 12 }, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testlibgo/strings.main$1", ptr null }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define i1 @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1"(i32 %0) { +define i1 @"github.com/goplus/llgo/cl/_testlibgo/strings.main$1"(i32 %0) { _llgo_0: %1 = load ptr, ptr @unicode.Han, align 8 %2 = call i1 @unicode.Is(ptr %1, i32 %0) @@ -93,9 +93,9 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) declare i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String", { ptr, ptr }) -define linkonce i1 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1"(ptr %0, i32 %1) { +define linkonce i1 @"__llgo_stub.github.com/goplus/llgo/cl/_testlibgo/strings.main$1"(ptr %0, i32 %1) { _llgo_0: - %2 = tail call i1 @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1"(i32 %1) + %2 = tail call i1 @"github.com/goplus/llgo/cl/_testlibgo/strings.main$1"(i32 %1) ret i1 %2 } diff --git a/compiler/cl/_testlibgo/sync/in.go b/cl/_testlibgo/sync/in.go similarity index 100% rename from compiler/cl/_testlibgo/sync/in.go rename to cl/_testlibgo/sync/in.go diff --git a/compiler/cl/_testlibgo/sync/out.ll b/cl/_testlibgo/sync/out.ll similarity index 100% rename from compiler/cl/_testlibgo/sync/out.ll rename to cl/_testlibgo/sync/out.ll diff --git a/compiler/cl/_testlibgo/waitgroup/in.go b/cl/_testlibgo/waitgroup/in.go similarity index 100% rename from compiler/cl/_testlibgo/waitgroup/in.go rename to cl/_testlibgo/waitgroup/in.go diff --git a/compiler/cl/_testlibgo/waitgroup/out.ll b/cl/_testlibgo/waitgroup/out.ll similarity index 100% rename from compiler/cl/_testlibgo/waitgroup/out.ll rename to cl/_testlibgo/waitgroup/out.ll diff --git a/compiler/cl/_testpy/callpy/in.go b/cl/_testpy/callpy/in.go similarity index 52% rename from compiler/cl/_testpy/callpy/in.go rename to cl/_testpy/callpy/in.go index 0d5a734d..efbf9274 100644 --- a/compiler/cl/_testpy/callpy/in.go +++ b/cl/_testpy/callpy/in.go @@ -1,11 +1,11 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/math" - "github.com/goplus/llgo/py/os" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/math" + "github.com/goplus/lib/py/os" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/compiler/cl/_testpy/callpy/out.ll b/cl/_testpy/callpy/out.ll similarity index 71% rename from compiler/cl/_testpy/callpy/out.ll rename to cl/_testpy/callpy/out.ll index 6771430e..495d7b96 100644 --- a/compiler/cl/_testpy/callpy/out.ll +++ b/cl/_testpy/callpy/out.ll @@ -1,7 +1,7 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/callpy' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/callpy" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/callpy' +source_filename = "github.com/goplus/llgo/cl/_testpy/callpy" -@"github.com/goplus/llgo/compiler/cl/_testpy/callpy.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/callpy.init$guard" = global i1 false, align 1 @__llgo_py.math.sqrt = linkonce global ptr null, align 8 @__llgo_py.os.getcwd = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [14 x i8] c"sqrt(2) = %f\0A\00", align 1 @@ -14,16 +14,16 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/callpy" @__llgo_py.os = external global ptr, align 8 @4 = private unnamed_addr constant [7 x i8] c"getcwd\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/callpy.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/callpy.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/callpy.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/callpy.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/callpy.init$guard", align 1 - call void @"github.com/goplus/llgo/py/math.init"() - call void @"github.com/goplus/llgo/py/os.init"() - call void @"github.com/goplus/llgo/py/std.init"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/callpy.init$guard", align 1 + call void @"github.com/goplus/lib/py/math.init"() + call void @"github.com/goplus/lib/py/os.init"() + call void @"github.com/goplus/lib/py/std.init"() %1 = load ptr, ptr @__llgo_py.builtins, align 8 call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @2, ptr @__llgo_py.builtins.print, ptr null) %2 = load ptr, ptr @__llgo_py.math, align 8 @@ -36,7 +36,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testpy/callpy.main"() { +define void @"github.com/goplus/llgo/cl/_testpy/callpy.main"() { _llgo_0: %0 = call ptr @PyFloat_FromDouble(double 2.000000e+00) %1 = load ptr, ptr @__llgo_py.math.sqrt, align 8 @@ -51,11 +51,11 @@ _llgo_0: ret void } -declare void @"github.com/goplus/llgo/py/math.init"() +declare void @"github.com/goplus/lib/py/math.init"() -declare void @"github.com/goplus/llgo/py/os.init"() +declare void @"github.com/goplus/lib/py/os.init"() -declare void @"github.com/goplus/llgo/py/std.init"() +declare void @"github.com/goplus/lib/py/std.init"() declare ptr @PyFloat_FromDouble(double) diff --git a/compiler/cl/_testpy/gcd/in.go b/cl/_testpy/gcd/in.go similarity index 62% rename from compiler/cl/_testpy/gcd/in.go rename to cl/_testpy/gcd/in.go index 309cdf3c..99f63ac2 100644 --- a/compiler/cl/_testpy/gcd/in.go +++ b/cl/_testpy/gcd/in.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/math" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/math" ) func main() { diff --git a/compiler/cl/_testpy/gcd/out.ll b/cl/_testpy/gcd/out.ll similarity index 65% rename from compiler/cl/_testpy/gcd/out.ll rename to cl/_testpy/gcd/out.ll index a2c49780..c61bb979 100644 --- a/compiler/cl/_testpy/gcd/out.ll +++ b/cl/_testpy/gcd/out.ll @@ -1,20 +1,20 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/gcd' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/gcd" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/gcd' +source_filename = "github.com/goplus/llgo/cl/_testpy/gcd" -@"github.com/goplus/llgo/compiler/cl/_testpy/gcd.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/gcd.init$guard" = global i1 false, align 1 @__llgo_py.math.gcd = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [22 x i8] c"gcd(60, 20, 25) = %d\0A\00", align 1 @__llgo_py.math = external global ptr, align 8 @1 = private unnamed_addr constant [4 x i8] c"gcd\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/gcd.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/gcd.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/gcd.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/gcd.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/gcd.init$guard", align 1 - call void @"github.com/goplus/llgo/py/math.init"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/gcd.init$guard", align 1 + call void @"github.com/goplus/lib/py/math.init"() %1 = load ptr, ptr @__llgo_py.math, align 8 call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @1, ptr @__llgo_py.math.gcd, ptr null) br label %_llgo_2 @@ -23,7 +23,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testpy/gcd.main"() { +define void @"github.com/goplus/llgo/cl/_testpy/gcd.main"() { _llgo_0: %0 = call ptr @PyLong_FromLong(i64 60) %1 = call ptr @PyLong_FromLong(i64 20) @@ -35,7 +35,7 @@ _llgo_0: ret void } -declare void @"github.com/goplus/llgo/py/math.init"() +declare void @"github.com/goplus/lib/py/math.init"() declare ptr @PyLong_FromLong(i64) diff --git a/compiler/cl/_testpy/math/in.go b/cl/_testpy/math/in.go similarity index 82% rename from compiler/cl/_testpy/math/in.go rename to cl/_testpy/math/in.go index 5d6936f9..8f319210 100644 --- a/compiler/cl/_testpy/math/in.go +++ b/cl/_testpy/math/in.go @@ -3,7 +3,7 @@ package math import ( _ "unsafe" - "github.com/goplus/llgo/py" + "github.com/goplus/lib/py" ) const ( diff --git a/compiler/cl/_testpy/math/out.ll b/cl/_testpy/math/out.ll similarity index 58% rename from compiler/cl/_testpy/math/out.ll rename to cl/_testpy/math/out.ll index f05f04fd..9eeddcbc 100644 --- a/compiler/cl/_testpy/math/out.ll +++ b/cl/_testpy/math/out.ll @@ -1,17 +1,17 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/math' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/math" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/math' +source_filename = "github.com/goplus/llgo/cl/_testpy/math" -@"github.com/goplus/llgo/compiler/cl/_testpy/math.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/math.init$guard" = global i1 false, align 1 @__llgo_py.math = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [5 x i8] c"math\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/math.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/math.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/math.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/math.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/math.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/math.init$guard", align 1 %1 = load ptr, ptr @__llgo_py.math, align 8 %2 = icmp ne ptr %1, null br i1 %2, label %_llgo_2, label %_llgo_3 diff --git a/compiler/cl/_testpy/matrix/in.go b/cl/_testpy/matrix/in.go similarity index 81% rename from compiler/cl/_testpy/matrix/in.go rename to cl/_testpy/matrix/in.go index ceecb933..8650e263 100644 --- a/compiler/cl/_testpy/matrix/in.go +++ b/cl/_testpy/matrix/in.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/numpy" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/numpy" ) func main() { diff --git a/compiler/cl/_testpy/matrix/out.ll b/cl/_testpy/matrix/out.ll similarity index 86% rename from compiler/cl/_testpy/matrix/out.ll rename to cl/_testpy/matrix/out.ll index 6b228d2d..2edb0661 100644 --- a/compiler/cl/_testpy/matrix/out.ll +++ b/cl/_testpy/matrix/out.ll @@ -1,7 +1,7 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/matrix' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/matrix" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/matrix' +source_filename = "github.com/goplus/llgo/cl/_testpy/matrix" -@"github.com/goplus/llgo/compiler/cl/_testpy/matrix.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/matrix.init$guard" = global i1 false, align 1 @__llgo_py.numpy.add = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [8 x i8] c"a = %s\0A\00", align 1 @1 = private unnamed_addr constant [8 x i8] c"a = %s\0A\00", align 1 @@ -9,14 +9,14 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/matrix" @__llgo_py.numpy = external global ptr, align 8 @3 = private unnamed_addr constant [4 x i8] c"add\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/matrix.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/matrix.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/matrix.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/matrix.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/matrix.init$guard", align 1 - call void @"github.com/goplus/llgo/py/numpy.init"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/matrix.init$guard", align 1 + call void @"github.com/goplus/lib/py/numpy.init"() %1 = load ptr, ptr @__llgo_py.numpy, align 8 call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @3, ptr @__llgo_py.numpy.add, ptr null) br label %_llgo_2 @@ -25,7 +25,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testpy/matrix.main"() { +define void @"github.com/goplus/llgo/cl/_testpy/matrix.main"() { _llgo_0: %0 = call ptr @PyList_New(i64 3) %1 = call ptr @PyFloat_FromDouble(double 1.000000e+00) @@ -91,7 +91,7 @@ _llgo_0: ret void } -declare void @"github.com/goplus/llgo/py/numpy.init"() +declare void @"github.com/goplus/lib/py/numpy.init"() declare ptr @PyList_New(i64) diff --git a/compiler/cl/_testpy/max/in.go b/cl/_testpy/max/in.go similarity index 82% rename from compiler/cl/_testpy/max/in.go rename to cl/_testpy/max/in.go index 4142c21f..ddabd50a 100644 --- a/compiler/cl/_testpy/max/in.go +++ b/cl/_testpy/max/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/compiler/cl/_testpy/max/out.ll b/cl/_testpy/max/out.ll similarity index 84% rename from compiler/cl/_testpy/max/out.ll rename to cl/_testpy/max/out.ll index 149cf05b..259424d7 100644 --- a/compiler/cl/_testpy/max/out.ll +++ b/cl/_testpy/max/out.ll @@ -1,7 +1,7 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/max' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/max" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/max' +source_filename = "github.com/goplus/llgo/cl/_testpy/max" -@"github.com/goplus/llgo/compiler/cl/_testpy/max.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/max.init$guard" = global i1 false, align 1 @__llgo_py.builtins.max = linkonce global ptr null, align 8 @__llgo_py.builtins.print = linkonce global ptr null, align 8 @__llgo_py.builtins.iter = linkonce global ptr null, align 8 @@ -10,14 +10,14 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/max" @1 = private unnamed_addr constant [4 x i8] c"max\00", align 1 @2 = private unnamed_addr constant [6 x i8] c"print\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/max.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/max.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/max.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/max.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/max.init$guard", align 1 - call void @"github.com/goplus/llgo/py/std.init"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/max.init$guard", align 1 + call void @"github.com/goplus/lib/py/std.init"() %1 = load ptr, ptr @__llgo_py.builtins, align 8 call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @0, ptr @__llgo_py.builtins.iter, ptr @1, ptr @__llgo_py.builtins.max, ptr @2, ptr @__llgo_py.builtins.print, ptr null) br label %_llgo_2 @@ -26,7 +26,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testpy/max.main"() { +define void @"github.com/goplus/llgo/cl/_testpy/max.main"() { _llgo_0: %0 = call ptr @PyFloat_FromDouble(double 3.000000e+00) %1 = call ptr @PyFloat_FromDouble(double 9.000000e+00) @@ -67,7 +67,7 @@ _llgo_0: ret void } -declare void @"github.com/goplus/llgo/py/std.init"() +declare void @"github.com/goplus/lib/py/std.init"() declare ptr @PyFloat_FromDouble(double) diff --git a/compiler/cl/_testpy/pi/in.go b/cl/_testpy/pi/in.go similarity index 59% rename from compiler/cl/_testpy/pi/in.go rename to cl/_testpy/pi/in.go index 239bc543..22ac0873 100644 --- a/compiler/cl/_testpy/pi/in.go +++ b/cl/_testpy/pi/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py/math" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py/math" ) func main() { diff --git a/compiler/cl/_testpy/pi/out.ll b/cl/_testpy/pi/out.ll similarity index 54% rename from compiler/cl/_testpy/pi/out.ll rename to cl/_testpy/pi/out.ll index ebba35b0..02c0d639 100644 --- a/compiler/cl/_testpy/pi/out.ll +++ b/cl/_testpy/pi/out.ll @@ -1,26 +1,26 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/pi' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/pi" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/pi' +source_filename = "github.com/goplus/llgo/cl/_testpy/pi" -@"github.com/goplus/llgo/compiler/cl/_testpy/pi.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/pi.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [9 x i8] c"pi = %f\0A\00", align 1 @__llgo_py.math = external global ptr, align 8 @1 = private unnamed_addr constant [3 x i8] c"pi\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/pi.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/pi.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/pi.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/pi.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/pi.init$guard", align 1 - call void @"github.com/goplus/llgo/py/math.init"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/pi.init$guard", align 1 + call void @"github.com/goplus/lib/py/math.init"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testpy/pi.main"() { +define void @"github.com/goplus/llgo/cl/_testpy/pi.main"() { _llgo_0: %0 = load ptr, ptr @__llgo_py.math, align 8 %1 = call ptr @PyObject_GetAttrString(ptr %0, ptr @1) @@ -29,7 +29,7 @@ _llgo_0: ret void } -declare void @"github.com/goplus/llgo/py/math.init"() +declare void @"github.com/goplus/lib/py/math.init"() declare ptr @PyObject_GetAttrString(ptr, ptr) diff --git a/compiler/cl/_testpy/pow/in.go b/cl/_testpy/pow/in.go similarity index 59% rename from compiler/cl/_testpy/pow/in.go rename to cl/_testpy/pow/in.go index 6dc98ead..989904ec 100644 --- a/compiler/cl/_testpy/pow/in.go +++ b/cl/_testpy/pow/in.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/math" + "github.com/goplus/lib/c" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/math" ) func main() { diff --git a/compiler/cl/_testpy/pow/out.ll b/cl/_testpy/pow/out.ll similarity index 65% rename from compiler/cl/_testpy/pow/out.ll rename to cl/_testpy/pow/out.ll index ee56d6ad..83a04c7f 100644 --- a/compiler/cl/_testpy/pow/out.ll +++ b/cl/_testpy/pow/out.ll @@ -1,20 +1,20 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testpy/pow' -source_filename = "github.com/goplus/llgo/compiler/cl/_testpy/pow" +; ModuleID = 'github.com/goplus/llgo/cl/_testpy/pow' +source_filename = "github.com/goplus/llgo/cl/_testpy/pow" -@"github.com/goplus/llgo/compiler/cl/_testpy/pow.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testpy/pow.init$guard" = global i1 false, align 1 @__llgo_py.math.pow = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [16 x i8] c"pow(2, 3) = %f\0A\00", align 1 @__llgo_py.math = external global ptr, align 8 @1 = private unnamed_addr constant [4 x i8] c"pow\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testpy/pow.init"() { +define void @"github.com/goplus/llgo/cl/_testpy/pow.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/pow.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testpy/pow.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testpy/pow.init$guard", align 1 - call void @"github.com/goplus/llgo/py/math.init"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testpy/pow.init$guard", align 1 + call void @"github.com/goplus/lib/py/math.init"() %1 = load ptr, ptr @__llgo_py.math, align 8 call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @1, ptr @__llgo_py.math.pow, ptr null) br label %_llgo_2 @@ -23,7 +23,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testpy/pow.main"() { +define void @"github.com/goplus/llgo/cl/_testpy/pow.main"() { _llgo_0: %0 = call ptr @PyFloat_FromDouble(double 2.000000e+00) %1 = call ptr @PyFloat_FromDouble(double 3.000000e+00) @@ -34,7 +34,7 @@ _llgo_0: ret void } -declare void @"github.com/goplus/llgo/py/math.init"() +declare void @"github.com/goplus/lib/py/math.init"() declare ptr @PyFloat_FromDouble(double) diff --git a/compiler/cl/_testrt/abinamed/in.go b/cl/_testrt/abinamed/in.go similarity index 100% rename from compiler/cl/_testrt/abinamed/in.go rename to cl/_testrt/abinamed/in.go diff --git a/compiler/cl/_testrt/abinamed/out.ll b/cl/_testrt/abinamed/out.ll similarity index 97% rename from compiler/cl/_testrt/abinamed/out.ll rename to cl/_testrt/abinamed/out.ll index 54896a01..0f46a014 100644 --- a/compiler/cl/_testrt/abinamed/out.ll +++ b/cl/_testrt/abinamed/out.ll @@ -1,21 +1,21 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/abinamed' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/abinamed" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/abinamed' +source_filename = "github.com/goplus/llgo/cl/_testrt/abinamed" -%"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = type { ptr, ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } +%"github.com/goplus/llgo/cl/_testrt/abinamed.T" = type { ptr, ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testrt/abinamed.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/abi.StructType" = type { %"github.com/goplus/llgo/runtime/abi.Type", %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [51 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/abinamed", align 1 +@"github.com/goplus/llgo/cl/_testrt/abinamed.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [42 x i8] c"github.com/goplus/llgo/cl/_testrt/abinamed", align 1 @1 = private unnamed_addr constant [1 x i8] c"T", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/runtime/abi.Type" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [34 x i8] c"github.com/goplus/llgo/runtime/abi", align 1 @3 = private unnamed_addr constant [4 x i8] c"Type", align 1 @@ -27,13 +27,13 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/abinamed" @_llgo_Pointer = linkonce global ptr null, align 8 @_llgo_bool = linkonce global ptr null, align 8 @"_llgo_func$fC75jGwF1nV5TF91gEeTF_JCtbG9Z7_yOawHBxqBh6E" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU" = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [2 x i8] c"$f", align 1 @6 = private unnamed_addr constant [5 x i8] c"$data", align 1 @"*_llgo_uint8" = linkonce global ptr null, align 8 @_llgo_string = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/runtime/abi.Type" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$WBNVVRMnoVsGzMgqffEMbZvRuUd1xPPdIfI8ZfmzTtU" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/abinamed.struct$iAWWtd1HF1364SMNytTeRmY9CBfeiKAC3aNazIAZMd0" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [5 x i8] c"Size_", align 1 @8 = private unnamed_addr constant [8 x i8] c"PtrBytes", align 1 @9 = private unnamed_addr constant [4 x i8] c"Hash", align 1 @@ -105,9 +105,9 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/abinamed" @46 = private unnamed_addr constant [7 x i8] c"MapType", align 1 @"_llgo_github.com/goplus/llgo/runtime/abi.MapType" = linkonce global ptr null, align 8 @"_llgo_func$ahHMZCcDhfW-lrs446sPkiW0NoVa2vpmK_wKarVa_20" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc" = linkonce global ptr null, align 8 @_llgo_uint16 = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$cKxX1dk_4FUaJkVYGogwwhApUh157NiM4dYa4KgJkeI" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/abinamed.struct$n4NzqKLyUqVG56Dssj_HUGGlIsYMa-aWjSGsMOvBAF8" = linkonce global ptr null, align 8 @47 = private unnamed_addr constant [6 x i8] c"Bucket", align 1 @48 = private unnamed_addr constant [6 x i8] c"Hasher", align 1 @49 = private unnamed_addr constant [7 x i8] c"KeySize", align 1 @@ -154,8 +154,8 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/abinamed" @75 = private unnamed_addr constant [5 x i8] c"Mtyp_", align 1 @76 = private unnamed_addr constant [4 x i8] c"Ifn_", align 1 @77 = private unnamed_addr constant [4 x i8] c"Tfn_", align 1 -@"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$ZLmusojvth_AeIAGC574HWDNbqH0qIBjDCc2msmnDYs" = linkonce global ptr null, align 8 +@"[]_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/abinamed.struct$EvjTmKky0pIMIGP-Uwj_AJEuFg2LHJG7T5nEc5t6SpE" = linkonce global ptr null, align 8 @78 = private unnamed_addr constant [1 x i8] c"p", align 1 @79 = private unnamed_addr constant [1 x i8] c"t", align 1 @80 = private unnamed_addr constant [1 x i8] c"n", align 1 @@ -167,50 +167,50 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/abinamed" @86 = private unnamed_addr constant [13 x i8] c"error field 2", align 1 @87 = private unnamed_addr constant [13 x i8] c"error field 3", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/abinamed.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.init$guard", align 1 call void @"github.com/goplus/llgo/runtime/abi.init"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$after"() + call void @"github.com/goplus/llgo/cl/_testrt/abinamed.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/abinamed.main"() { _llgo_0: - %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - store %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" zeroinitializer, ptr %1, align 8 + store %"github.com/goplus/llgo/cl/_testrt/abinamed.T" zeroinitializer, ptr %1, align 8 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1 - %4 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3) + %4 = call ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3) %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 72) store %"github.com/goplus/llgo/runtime/abi.Type" zeroinitializer, ptr %6, align 8 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %6, 1 - %9 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8) - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %9 = call ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8) + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %11 = load ptr, ptr %10, align 8 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %11) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %13 = load ptr, ptr %12, align 8 %14 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %13, i32 0, i32 10 %15 = load ptr, ptr %14, align 8 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %15) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 + %16 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 %17 = load ptr, ptr %16, align 8 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %17) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 + %18 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 %19 = load ptr, ptr %18, align 8 %20 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %19, i32 0, i32 10 %21 = load ptr, ptr %20, align 8 @@ -218,7 +218,7 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %22 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8 call void @llvm.memset(ptr %22, i8 0, i64 56, i1 false) - %23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %24 = load ptr, ptr %23, align 8 %25 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %24) %26 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %25, i32 0, i32 2 @@ -232,7 +232,7 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/abi.StructField" %32, ptr %22, align 8 %33 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %22, i32 0, i32 1 %34 = load ptr, ptr %33, align 8 - %35 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %35 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %36 = load ptr, ptr %35, align 8 %37 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %36, i32 0, i32 10 %38 = load ptr, ptr %37, align 8 @@ -252,7 +252,7 @@ _llgo_2: ; preds = %_llgo_0 %44 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %22, i32 0, i32 1 %45 = load ptr, ptr %44, align 8 %46 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %45) - %47 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %47 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %48 = load ptr, ptr %47, align 8 %49 = icmp ne ptr %46, %48 br i1 %49, label %_llgo_3, label %_llgo_4 @@ -269,7 +269,7 @@ _llgo_3: ; preds = %_llgo_2 _llgo_4: ; preds = %_llgo_2 %54 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8 call void @llvm.memset(ptr %54, i8 0, i64 56, i1 false) - %55 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %55 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %56 = load ptr, ptr %55, align 8 %57 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %56) %58 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %57, i32 0, i32 2 @@ -283,7 +283,7 @@ _llgo_4: ; preds = %_llgo_2 store %"github.com/goplus/llgo/runtime/abi.StructField" %64, ptr %54, align 8 %65 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %54, i32 0, i32 1 %66 = load ptr, ptr %65, align 8 - %67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 + %67 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 %68 = load ptr, ptr %67, align 8 %69 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %68, i32 0, i32 10 %70 = load ptr, ptr %69, align 8 @@ -303,7 +303,7 @@ _llgo_6: ; preds = %_llgo_4 %76 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %54, i32 0, i32 1 %77 = load ptr, ptr %76, align 8 %78 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %77) - %79 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 + %79 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 %80 = load ptr, ptr %79, align 8 %81 = icmp ne ptr %78, %80 br i1 %81, label %_llgo_7, label %_llgo_8 @@ -320,7 +320,7 @@ _llgo_7: ; preds = %_llgo_6 _llgo_8: ; preds = %_llgo_6 %86 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8 call void @llvm.memset(ptr %86, i8 0, i64 56, i1 false) - %87 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %87 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %88 = load ptr, ptr %87, align 8 %89 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %88) %90 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %89, i32 0, i32 2 @@ -334,7 +334,7 @@ _llgo_8: ; preds = %_llgo_6 store %"github.com/goplus/llgo/runtime/abi.StructField" %96, ptr %86, align 8 %97 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %86, i32 0, i32 1 %98 = load ptr, ptr %97, align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 + %99 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0 %100 = load ptr, ptr %99, align 8 %101 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %100) %102 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %101, i32 0, i32 2 @@ -361,7 +361,7 @@ _llgo_9: ; preds = %_llgo_8 _llgo_10: ; preds = %_llgo_8 %115 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8 call void @llvm.memset(ptr %115, i8 0, i64 56, i1 false) - %116 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %116 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %117 = load ptr, ptr %116, align 8 %118 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %117) %119 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %118, i32 0, i32 2 @@ -376,7 +376,7 @@ _llgo_10: ; preds = %_llgo_8 %126 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %115, i32 0, i32 1 %127 = load ptr, ptr %126, align 8 %128 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %127) - %129 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 + %129 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0 %130 = load ptr, ptr %129, align 8 %131 = icmp ne ptr %128, %130 br i1 %131, label %_llgo_11, label %_llgo_12 @@ -394,7 +394,7 @@ _llgo_12: ; preds = %_llgo_10 ret void } -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, ptr %1, align 8 @@ -403,32 +403,32 @@ _llgo_0: declare void @"github.com/goplus/llgo/runtime/abi.init"() -define void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/abinamed.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 - %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) - %5 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 + %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) + %5 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 %6 = icmp eq ptr %5, null br i1 %6, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %7) - store ptr %7, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + store ptr %7, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %8 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + %8 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 34 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 80, i64 0, i64 23) %10 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8 %11 = icmp eq ptr %10, null @@ -571,9 +571,9 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20 %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %72, 0 %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 1 %77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 2 - %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) - store ptr %78, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8 - %79 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8 + %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) + store ptr %78, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8 + %79 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8 %80 = load ptr, ptr @_llgo_uint8, align 8 %81 = load ptr, ptr @"*_llgo_uint8", align 8 %82 = icmp eq ptr %81, null @@ -657,7 +657,7 @@ _llgo_28: ; preds = %_llgo_27, %_llgo_26 %132 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %129, 0 %133 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %132, i64 2, 1 %134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %133, i64 2, 2 - %135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %134) + %135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %134) %136 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 5 }, ptr %135, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %137 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) %138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %137) @@ -692,9 +692,9 @@ _llgo_28: ; preds = %_llgo_27, %_llgo_26 %156 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %144, 0 %157 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %156, i64 11, 1 %158 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %157, i64 11, 2 - %159 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %158) - store ptr %159, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$WBNVVRMnoVsGzMgqffEMbZvRuUd1xPPdIfI8ZfmzTtU", align 8 - %160 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$WBNVVRMnoVsGzMgqffEMbZvRuUd1xPPdIfI8ZfmzTtU", align 8 + %159 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %158) + store ptr %159, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$iAWWtd1HF1364SMNytTeRmY9CBfeiKAC3aNazIAZMd0", align 8 + %160 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$iAWWtd1HF1364SMNytTeRmY9CBfeiKAC3aNazIAZMd0", align 8 br i1 %11, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 @@ -705,8 +705,8 @@ _llgo_29: ; preds = %_llgo_28 _llgo_30: ; preds = %_llgo_38, %_llgo_28 %163 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8 %164 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8 - %165 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) - %166 = load ptr, ptr @"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + %165 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) + %166 = load ptr, ptr @"[]_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 %167 = icmp eq ptr %166, null br i1 %167, label %_llgo_131, label %_llgo_132 @@ -777,7 +777,7 @@ _llgo_36: ; preds = %_llgo_35, %_llgo_34 %207 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %202, 0 %208 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %207, i64 4, 1 %209 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %208, i64 4, 2 - %210 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 96, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %209) + %210 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 96, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %209) store ptr %210, ptr @"_llgo_struct$_wxpay9lRP3cWU1eNzUY8uwDJyoHmQ6toXBadyiL6io", align 8 %211 = load ptr, ptr @"_llgo_struct$_wxpay9lRP3cWU1eNzUY8uwDJyoHmQ6toXBadyiL6io", align 8 br i1 %189, label %_llgo_37, label %_llgo_38 @@ -1106,7 +1106,7 @@ _llgo_56: ; preds = %_llgo_55, %_llgo_54 %432 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %428, 0 %433 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %432, i64 3, 1 %434 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %433, i64 3, 2 - %435 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %434) + %435 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %434) store ptr %435, ptr @"_llgo_struct$1ug-gfLTkNOIzG-RN7EFFwGKI01E7iqUGVZBMudT8KA", align 8 %436 = load ptr, ptr @"_llgo_struct$1ug-gfLTkNOIzG-RN7EFFwGKI01E7iqUGVZBMudT8KA", align 8 br i1 %408, label %_llgo_57, label %_llgo_58 @@ -1164,7 +1164,7 @@ _llgo_58: ; preds = %_llgo_80, %_llgo_56 %479 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %474, 0 %480 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %479, i64 4, 1 %481 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %480, i64 4, 2 - %482 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 40, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %481) + %482 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 40, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %481) store ptr %482, ptr @"_llgo_struct$jXUHcnL1PMmNRB-pn2cBRAQ7OYcwCM_YkvLqlL0ZYaE", align 8 %483 = load ptr, ptr @"_llgo_struct$jXUHcnL1PMmNRB-pn2cBRAQ7OYcwCM_YkvLqlL0ZYaE", align 8 br i1 %405, label %_llgo_129, label %_llgo_130 @@ -1309,7 +1309,7 @@ _llgo_72: ; preds = %_llgo_71, %_llgo_70 %565 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %562, 0 %566 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %565, i64 2, 1 %567 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %566, i64 2, 2 - %568 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %567) + %568 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %567) store ptr %568, ptr @"_llgo_struct$nK3p3a0VXRT6CeR0p3-gSrD3XdcHx2I7dlhqG-Zjudw", align 8 %569 = load ptr, ptr @"_llgo_struct$nK3p3a0VXRT6CeR0p3-gSrD3XdcHx2I7dlhqG-Zjudw", align 8 br i1 %555, label %_llgo_73, label %_llgo_74 @@ -1393,7 +1393,7 @@ _llgo_78: ; preds = %_llgo_77, %_llgo_74 %619 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %615, 0 %620 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %619, i64 3, 1 %621 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %620, i64 3, 2 - %622 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %621) + %622 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %621) store ptr %622, ptr @"_llgo_struct$eoXJdAUqA_SyytMpb3QTBaQ2Bh9nLc089-gvCiW55io", align 8 %623 = load ptr, ptr @"_llgo_struct$eoXJdAUqA_SyytMpb3QTBaQ2Bh9nLc089-gvCiW55io", align 8 br i1 %552, label %_llgo_79, label %_llgo_80 @@ -1762,9 +1762,9 @@ _llgo_96: ; preds = %_llgo_95, %_llgo_94 %884 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %881, 0 %885 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %884, i64 2, 1 %886 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %885, i64 2, 2 - %887 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %886) - store ptr %887, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8 - %888 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8 + %887 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %886) + store ptr %887, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8 + %888 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8 %889 = load ptr, ptr @_llgo_uint16, align 8 %890 = icmp eq ptr %889, null br i1 %890, label %_llgo_97, label %_llgo_98 @@ -1816,7 +1816,7 @@ _llgo_98: ; preds = %_llgo_97, %_llgo_96 %925 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %922, 0 %926 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %925, i64 2, 1 %927 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %926, i64 2, 2 - %928 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %927) + %928 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %927) %929 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @48, i64 6 }, ptr %928, i64 96, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %930 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) %931 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @49, i64 7 }, ptr %930, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) @@ -1848,9 +1848,9 @@ _llgo_98: ; preds = %_llgo_97, %_llgo_96 %948 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %938, 0 %949 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %948, i64 9, 1 %950 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %949, i64 9, 2 - %951 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %950) - store ptr %951, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$cKxX1dk_4FUaJkVYGogwwhApUh157NiM4dYa4KgJkeI", align 8 - %952 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$cKxX1dk_4FUaJkVYGogwwhApUh157NiM4dYa4KgJkeI", align 8 + %951 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %950) + store ptr %951, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$n4NzqKLyUqVG56Dssj_HUGGlIsYMa-aWjSGsMOvBAF8", align 8 + %952 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$n4NzqKLyUqVG56Dssj_HUGGlIsYMa-aWjSGsMOvBAF8", align 8 br i1 %841, label %_llgo_99, label %_llgo_100 _llgo_99: ; preds = %_llgo_98 @@ -2143,7 +2143,7 @@ _llgo_110: ; preds = %_llgo_109, %_llgo_1 %1167 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1161, 0 %1168 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1167, i64 5, 1 %1169 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1168, i64 5, 2 - %1170 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 56, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1169) + %1170 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 56, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1169) store ptr %1170, ptr @"_llgo_struct$kJjSbRGD6vW5GBpnW3h2bqoH3rm-w30ibwmCd552LPU", align 8 %1171 = load ptr, ptr @"_llgo_struct$kJjSbRGD6vW5GBpnW3h2bqoH3rm-w30ibwmCd552LPU", align 8 br i1 %1148, label %_llgo_111, label %_llgo_112 @@ -2199,7 +2199,7 @@ _llgo_114: ; preds = %_llgo_113, %_llgo_1 %1203 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1199, 0 %1204 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1203, i64 3, 1 %1205 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1204, i64 3, 2 - %1206 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1205) + %1206 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1205) store ptr %1206, ptr @"_llgo_struct$a40Ph0zKu8cPeYh4GJjFLIY8XDqrC7uc-XzprrJaUh0", align 8 %1207 = load ptr, ptr @"_llgo_struct$a40Ph0zKu8cPeYh4GJjFLIY8XDqrC7uc-XzprrJaUh0", align 8 br i1 %1145, label %_llgo_115, label %_llgo_116 @@ -2436,7 +2436,7 @@ _llgo_122: ; preds = %_llgo_121, %_llgo_1 %1378 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1373, 0 %1379 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1378, i64 4, 1 %1380 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1379, i64 4, 2 - %1381 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1380) + %1381 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1380) store ptr %1381, ptr @"_llgo_struct$OKIlItfBJsawrEMnVSc2VQ7pxNxCHIgSoitcM9n4FVI", align 8 %1382 = load ptr, ptr @"_llgo_struct$OKIlItfBJsawrEMnVSc2VQ7pxNxCHIgSoitcM9n4FVI", align 8 br i1 %1364, label %_llgo_123, label %_llgo_124 @@ -2710,14 +2710,14 @@ _llgo_130: ; preds = %_llgo_129, %_llgo_5 _llgo_131: ; preds = %_llgo_30 %1568 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %165) - store ptr %1568, ptr @"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 + store ptr %1568, ptr @"[]_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 br label %_llgo_132 _llgo_132: ; preds = %_llgo_131, %_llgo_30 - %1569 = load ptr, ptr @"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8 - %1570 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) + %1569 = load ptr, ptr @"[]_llgo_github.com/goplus/llgo/cl/_testrt/abinamed.T", align 8 + %1570 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) %1571 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 34 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 80, i64 0, i64 23) - %1572 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) + %1572 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0) %1573 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %1570) %1574 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @78, i64 1 }, ptr %1573, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %1575 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %1571) @@ -2738,9 +2738,9 @@ _llgo_132: ; preds = %_llgo_131, %_llgo_3 %1586 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1581, 0 %1587 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1586, i64 4, 1 %1588 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1587, i64 4, 2 - %1589 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1588) - store ptr %1589, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$ZLmusojvth_AeIAGC574HWDNbqH0qIBjDCc2msmnDYs", align 8 - %1590 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$ZLmusojvth_AeIAGC574HWDNbqH0qIBjDCc2msmnDYs", align 8 + %1589 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 42 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1588) + store ptr %1589, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$EvjTmKky0pIMIGP-Uwj_AJEuFg2LHJG7T5nEc5t6SpE", align 8 + %1590 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/abinamed.struct$EvjTmKky0pIMIGP-Uwj_AJEuFg2LHJG7T5nEc5t6SpE", align 8 br i1 %2, label %_llgo_133, label %_llgo_134 _llgo_133: ; preds = %_llgo_132 diff --git a/compiler/cl/_testrt/alloca/in.go b/cl/_testrt/alloca/in.go similarity index 83% rename from compiler/cl/_testrt/alloca/in.go rename to cl/_testrt/alloca/in.go index c16d07b8..81940bc2 100644 --- a/compiler/cl/_testrt/alloca/in.go +++ b/cl/_testrt/alloca/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/compiler/cl/_testrt/alloca/out.ll b/cl/_testrt/alloca/out.ll similarity index 51% rename from compiler/cl/_testrt/alloca/out.ll rename to cl/_testrt/alloca/out.ll index 2e15f811..f04969db 100644 --- a/compiler/cl/_testrt/alloca/out.ll +++ b/cl/_testrt/alloca/out.ll @@ -1,24 +1,24 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/alloca' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/alloca" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/alloca' +source_filename = "github.com/goplus/llgo/cl/_testrt/alloca" -@"github.com/goplus/llgo/compiler/cl/_testrt/alloca.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/alloca.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [4 x i8] c"Hi\0A\00", align 1 @1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/alloca.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/alloca.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/alloca.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/alloca.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/alloca.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/alloca.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/alloca.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/alloca.main"() { _llgo_0: %0 = alloca i8, i64 4, align 1 %1 = call ptr @memcpy(ptr %0, ptr @0, i64 4) diff --git a/compiler/cl/_testrt/allocstr/in.go b/cl/_testrt/allocstr/in.go similarity index 81% rename from compiler/cl/_testrt/allocstr/in.go rename to cl/_testrt/allocstr/in.go index d97577d2..6f1f04b5 100644 --- a/compiler/cl/_testrt/allocstr/in.go +++ b/cl/_testrt/allocstr/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func hello() string { diff --git a/compiler/cl/_testrt/allocstr/out.ll b/cl/_testrt/allocstr/out.ll similarity index 61% rename from compiler/cl/_testrt/allocstr/out.ll rename to cl/_testrt/allocstr/out.ll index 328dd3b5..db695e22 100644 --- a/compiler/cl/_testrt/allocstr/out.ll +++ b/cl/_testrt/allocstr/out.ll @@ -1,32 +1,32 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/allocstr' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/allocstr" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/allocstr' +source_filename = "github.com/goplus/llgo/cl/_testrt/allocstr" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/allocstr.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [12 x i8] c"Hello world\0A", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.hello"() { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/allocstr.hello"() { _llgo_0: ret %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 12 } } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/allocstr.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/allocstr.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/allocstr.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/allocstr.main"() { _llgo_0: - %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.hello"() + %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/allocstr.hello"() %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, 1 %2 = add i64 %1, 1 %3 = alloca i8, i64 %2, align 1 diff --git a/compiler/cl/_testrt/any/in.go b/cl/_testrt/any/in.go similarity index 87% rename from compiler/cl/_testrt/any/in.go rename to cl/_testrt/any/in.go index 0edaadad..233fb7cd 100644 --- a/compiler/cl/_testrt/any/in.go +++ b/cl/_testrt/any/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func hi(a any) *c.Char { diff --git a/compiler/cl/_testrt/any/out.ll b/cl/_testrt/any/out.ll similarity index 82% rename from compiler/cl/_testrt/any/out.ll rename to cl/_testrt/any/out.ll index d932d219..ebc5fb54 100644 --- a/compiler/cl/_testrt/any/out.ll +++ b/cl/_testrt/any/out.ll @@ -1,10 +1,10 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/any' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/any" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/any' +source_filename = "github.com/goplus/llgo/cl/_testrt/any" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/any.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/any.init$guard" = global i1 false, align 1 @_llgo_int8 = linkonce global ptr null, align 8 @"*_llgo_int8" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [42 x i8] c"type assertion interface{} -> *int8 failed", align 1 @@ -14,7 +14,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/any" @2 = private unnamed_addr constant [7 x i8] c"%s %d\0A\00", align 1 @3 = private unnamed_addr constant [6 x i8] c"Hello\00", align 1 -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.hi"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define ptr @"github.com/goplus/llgo/cl/_testrt/any.hi"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 %2 = load ptr, ptr @_llgo_int8, align 8 @@ -36,7 +36,7 @@ _llgo_2: ; preds = %_llgo_0 unreachable } -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/any.incVal"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define i64 @"github.com/goplus/llgo/cl/_testrt/any.incVal"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 %2 = load ptr, ptr @_llgo_int, align 8 @@ -59,35 +59,35 @@ _llgo_2: ; preds = %_llgo_0 unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/any.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/any.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/any.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/any.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/any.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/any.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/any.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/any.main"() { _llgo_0: %0 = load ptr, ptr @"*_llgo_int8", align 8 %1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %1, ptr @3, 1 - %3 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.hi"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2) + %3 = call ptr @"github.com/goplus/llgo/cl/_testrt/any.hi"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2) %4 = load ptr, ptr @_llgo_int, align 8 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr inttoptr (i64 100 to ptr), 1 - %7 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/any.incVal"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6) + %7 = call i64 @"github.com/goplus/llgo/cl/_testrt/any.incVal"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6) %8 = call i32 (ptr, ...) @printf(ptr @2, ptr %3, i64 %7) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/any.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/any.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int8, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testrt/builtin/in.go b/cl/_testrt/builtin/in.go similarity index 100% rename from compiler/cl/_testrt/builtin/in.go rename to cl/_testrt/builtin/in.go diff --git a/compiler/cl/_testrt/builtin/out.ll b/cl/_testrt/builtin/out.ll similarity index 92% rename from compiler/cl/_testrt/builtin/out.ll rename to cl/_testrt/builtin/out.ll index efbffb80..c884499e 100644 --- a/compiler/cl/_testrt/builtin/out.ll +++ b/cl/_testrt/builtin/out.ll @@ -1,14 +1,14 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/builtin' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/builtin" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/builtin' +source_filename = "github.com/goplus/llgo/cl/_testrt/builtin" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.a" = global i64 0, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.b" = global i64 0, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$guard" = global i1 false, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.n" = global i64 0, align 8 +@"github.com/goplus/llgo/cl/_testrt/builtin.a" = global i64 0, align 8 +@"github.com/goplus/llgo/cl/_testrt/builtin.b" = global i64 0, align 8 +@"github.com/goplus/llgo/cl/_testrt/builtin.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/builtin.n" = global i64 0, align 8 @0 = private unnamed_addr constant [5 x i8] c"hello", align 1 @1 = private unnamed_addr constant [3 x i8] c"def", align 1 @_llgo_int = linkonce global ptr null, align 8 @@ -18,7 +18,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/builtin" @5 = private unnamed_addr constant [3 x i8] c"abd", align 1 @6 = private unnamed_addr constant [2 x i8] c"fn", align 1 -define double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Float64frombits"(i64 %0) { +define double @"github.com/goplus/llgo/cl/_testrt/builtin.Float64frombits"(i64 %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store i64 %0, ptr %1, align 4 @@ -26,7 +26,7 @@ _llgo_0: ret double %2 } -define double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Inf"(i64 %0) { +define double @"github.com/goplus/llgo/cl/_testrt/builtin.Inf"(i64 %0) { _llgo_0: %1 = icmp sge i64 %0, 0 br i1 %1, label %_llgo_1, label %_llgo_3 @@ -36,48 +36,48 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_3, %_llgo_1 %2 = phi i64 [ 9218868437227405312, %_llgo_1 ], [ -4503599627370496, %_llgo_3 ] - %3 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Float64frombits"(i64 %2) + %3 = call double @"github.com/goplus/llgo/cl/_testrt/builtin.Float64frombits"(i64 %2) ret double %3 _llgo_3: ; preds = %_llgo_0 br label %_llgo_2 } -define i1 @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.IsNaN"(double %0) { +define i1 @"github.com/goplus/llgo/cl/_testrt/builtin.IsNaN"(double %0) { _llgo_0: %1 = fcmp une double %0, %0 ret i1 %1 } -define double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.NaN"() { +define double @"github.com/goplus/llgo/cl/_testrt/builtin.NaN"() { _llgo_0: - %0 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Float64frombits"(i64 9221120237041090561) + %0 = call double @"github.com/goplus/llgo/cl/_testrt/builtin.Float64frombits"(i64 9221120237041090561) ret double %0 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.demo"() { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.demo"() { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/builtin.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$after"() - store i64 9223372036854775807, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.a", align 4 - store i64 -9223372036854775808, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.b", align 4 - store i64 -1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.n", align 4 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/builtin.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/builtin.init$after"() + store i64 9223372036854775807, ptr @"github.com/goplus/llgo/cl/_testrt/builtin.a", align 4 + store i64 -9223372036854775808, ptr @"github.com/goplus/llgo/cl/_testrt/builtin.b", align 4 + store i64 -1, ptr @"github.com/goplus/llgo/cl/_testrt/builtin.n", align 4 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -253,7 +253,7 @@ _llgo_0: %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i64 0, 2 %93 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) %94 = getelementptr inbounds { ptr, ptr }, ptr %93, i64 0 - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$1", ptr null }, ptr %94, align 8 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/builtin.main$1", ptr null }, ptr %94, align 8 %95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %93, 0 %96 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %95, i64 1, 1 %97 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %96, i64 1, 2 @@ -342,12 +342,12 @@ _llgo_0: %137 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %138 = getelementptr inbounds { ptr }, ptr %137, i32 0, i32 0 store ptr %108, ptr %138, align 8 - %139 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$3", ptr undef }, ptr %137, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.demo") + %139 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/builtin.main$3", ptr undef }, ptr %137, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/cl/_testrt/builtin.demo") call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.demo") + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/cl/_testrt/builtin.demo") call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$2") + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/cl/_testrt/builtin.main$2") call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) %140 = extractvalue { ptr, ptr } %139, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %140) @@ -371,12 +371,12 @@ _llgo_2: ; preds = %_llgo_1 br label %_llgo_1 _llgo_3: ; preds = %_llgo_1 - %147 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Inf"(i64 1) - %148 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Inf"(i64 -1) - %149 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.NaN"() - %150 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.NaN"() - %151 = call i1 @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.IsNaN"(double %150) - %152 = call i1 @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.IsNaN"(double 1.000000e+00) + %147 = call double @"github.com/goplus/llgo/cl/_testrt/builtin.Inf"(i64 1) + %148 = call double @"github.com/goplus/llgo/cl/_testrt/builtin.Inf"(i64 -1) + %149 = call double @"github.com/goplus/llgo/cl/_testrt/builtin.NaN"() + %150 = call double @"github.com/goplus/llgo/cl/_testrt/builtin.NaN"() + %151 = call i1 @"github.com/goplus/llgo/cl/_testrt/builtin.IsNaN"(double %150) + %152 = call i1 @"github.com/goplus/llgo/cl/_testrt/builtin.IsNaN"(double 1.000000e+00) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %147) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %148) @@ -445,19 +445,19 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$1"() { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.main$1"() { _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$2"() { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.main$2"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$3"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.main$3"(ptr %0) { _llgo_0: %1 = load { ptr }, ptr %0, align 8 %2 = extractvalue { ptr } %1, 0 @@ -483,13 +483,13 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"gi declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr, i64, i64) -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$1"(ptr %0) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/builtin.main$1"(ptr %0) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$1"() + tail call void @"github.com/goplus/llgo/cl/_testrt/builtin.main$1"() ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/builtin.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testrt/callback/in.go b/cl/_testrt/callback/in.go similarity index 88% rename from compiler/cl/_testrt/callback/in.go rename to cl/_testrt/callback/in.go index 5bd17e57..2e268150 100644 --- a/compiler/cl/_testrt/callback/in.go +++ b/cl/_testrt/callback/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func callback(msg *c.Char, f func(*c.Char)) { diff --git a/cl/_testrt/callback/out.ll b/cl/_testrt/callback/out.ll new file mode 100644 index 00000000..63dd1b40 --- /dev/null +++ b/cl/_testrt/callback/out.ll @@ -0,0 +1,48 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/callback' +source_filename = "github.com/goplus/llgo/cl/_testrt/callback" + +@"github.com/goplus/llgo/cl/_testrt/callback.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 +@1 = private unnamed_addr constant [10 x i8] c"callback\0A\00", align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/callback.callback"(ptr %0, { ptr, ptr } %1) { +_llgo_0: + %2 = extractvalue { ptr, ptr } %1, 1 + %3 = extractvalue { ptr, ptr } %1, 0 + call void %3(ptr %2, ptr %0) + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/callback.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/callback.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/callback.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/callback.main"() { +_llgo_0: + call void @"github.com/goplus/llgo/cl/_testrt/callback.callback"(ptr @0, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/callback.print", ptr null }) + call void @"github.com/goplus/llgo/cl/_testrt/callback.callback"(ptr @1, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/callback.print", ptr null }) + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/callback.print"(ptr %0) { +_llgo_0: + %1 = call i32 (ptr, ...) @printf(ptr %0) + ret void +} + +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/callback.print"(ptr %0, ptr %1) { +_llgo_0: + tail call void @"github.com/goplus/llgo/cl/_testrt/callback.print"(ptr %1) + ret void +} + +declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/cast/in.go b/cl/_testrt/cast/in.go similarity index 99% rename from compiler/cl/_testrt/cast/in.go rename to cl/_testrt/cast/in.go index 89196f62..7a00ae1e 100644 --- a/compiler/cl/_testrt/cast/in.go +++ b/cl/_testrt/cast/in.go @@ -1,6 +1,6 @@ package main -//"github.com/goplus/llgo/c" +//"github.com/goplus/lib/c" func main() { cvt64to8(0, 0) diff --git a/compiler/cl/_testrt/cast/out.ll b/cl/_testrt/cast/out.ll similarity index 61% rename from compiler/cl/_testrt/cast/out.ll rename to cl/_testrt/cast/out.ll index 9608b177..933d6654 100644 --- a/compiler/cl/_testrt/cast/out.ll +++ b/cl/_testrt/cast/out.ll @@ -1,14 +1,14 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/cast' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/cast" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/cast' +source_filename = "github.com/goplus/llgo/cl/_testrt/cast" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/cast.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float %0, i32 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32"(float %0, i32 %1) { _llgo_0: %2 = fptosi float %0 to i32 %3 = icmp ne i32 %2, %1 @@ -27,7 +27,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float %0, i32 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float %0, i32 %1) { _llgo_0: %2 = fptoui float %0 to i32 %3 = icmp ne i32 %2, %1 @@ -46,7 +46,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float %0, double %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto64F"(float %0, double %1) { _llgo_0: %2 = fpext float %0 to double %3 = fcmp une double %2, %1 @@ -65,7 +65,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float %0, i8 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float %0, i8 %1) { _llgo_0: %2 = fptosi float %0 to i8 %3 = icmp ne i8 %2, %1 @@ -84,7 +84,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float %0, i8 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8U"(float %0, i8 %1) { _llgo_0: %2 = fptoui float %0 to i8 %3 = icmp ne i8 %2, %1 @@ -103,7 +103,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32to64"(i32 %0, i64 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32to64"(i32 %0, i64 %1) { _llgo_0: %2 = sext i32 %0 to i64 %3 = icmp ne i64 %2, %1 @@ -122,7 +122,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double %0, float %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Fto32F"(double %0, float %1) { _llgo_0: %2 = fptrunc double %0 to float %3 = fcmp une float %2, %1 @@ -141,7 +141,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 %0, double %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Uto64F"(i64 %0, double %1) { _llgo_0: %2 = uitofp i64 %0 to double %3 = fcmp une double %2, %1 @@ -160,7 +160,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 %0, double %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to64F"(i64 %0, double %1) { _llgo_0: %2 = sitofp i64 %0 to double %3 = fcmp une double %2, %1 @@ -179,7 +179,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 %0, i8 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 %0, i8 %1) { _llgo_0: %2 = trunc i64 %0 to i8 %3 = icmp ne i8 %2, %1 @@ -198,7 +198,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 %0, i8 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8U"(i64 %0, i8 %1) { _llgo_0: %2 = trunc i64 %0 to i8 %3 = icmp ne i8 %2, %1 @@ -217,7 +217,7 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvtUinptr"(i32 %0, i64 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/cast.cvtUinptr"(i32 %0, i64 %1) { _llgo_0: %2 = zext i32 %0 to i64 %3 = icmp ne i64 %2, %1 @@ -250,78 +250,78 @@ _llgo_4: ; preds = %_llgo_2 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/cast.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/cast.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/cast.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/cast.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/cast.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 0, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 127, i8 127) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 128, i8 -128) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 -128, i8 -128) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 -129, i8 127) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 256, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 0, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 255, i8 -1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 256, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 257, i8 1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 -1, i8 -1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x3FB99999A0000000, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x405FC66660000000, i8 127) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x4060033340000000, i8 -128) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0xC060033340000000, i8 -128) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0xC060233340000000, i8 127) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x40700199A0000000, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 0.000000e+00, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 2.550000e+02, i8 -1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 2.560000e+02, i8 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 2.570000e+02, i8 1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float -1.000000e+00, i8 -1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 0.000000e+00, i32 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 1.500000e+00, i32 1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 0x41D1194D80000000, i32 1147483648) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 0xC1E0000000000000, i32 -2147483648) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0.000000e+00, i32 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 1.500000e+00, i32 1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0x41F0000000000000, i32 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0x41F3B9ACA0000000, i32 1000000000) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0xC1F0000000000000, i32 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0xC1D34BE880000000, i32 -1294967296) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0xBFF19999A0000000, i32 -1) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float 0.000000e+00, double 0.000000e+00) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float 1.500000e+00, double 1.500000e+00) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float 1.000000e+10, double 1.000000e+10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float -1.000000e+10, double -1.000000e+10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double 0.000000e+00, float 0.000000e+00) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double 1.500000e+00, float 1.500000e+00) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double 1.000000e+10, float 1.000000e+10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double -1.000000e+10, float -1.000000e+10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 0, double 0.000000e+00) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 10000000000, double 1.000000e+10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 9223372036854775807, double 0x43E0000000000000) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 -9223372036854775807, double 0xC3E0000000000000) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 0, double 0.000000e+00) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 10000000000, double 1.000000e+10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 9223372036854775807, double 0x43E0000000000000) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 -1, double 0x43F0000000000000) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32to64"(i32 0, i64 0) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32to64"(i32 2147483647, i64 2147483647) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvtUinptr"(i32 1024, i64 1024) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 0, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 127, i8 127) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 128, i8 -128) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 -128, i8 -128) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 -129, i8 127) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8"(i64 256, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8U"(i64 0, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8U"(i64 255, i8 -1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8U"(i64 256, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8U"(i64 257, i8 1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to8U"(i64 -1, i8 -1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float 0x3FB99999A0000000, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float 0x405FC66660000000, i8 127) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float 0x4060033340000000, i8 -128) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float 0xC060033340000000, i8 -128) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float 0xC060233340000000, i8 127) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8"(float 0x40700199A0000000, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8U"(float 0.000000e+00, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8U"(float 2.550000e+02, i8 -1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8U"(float 2.560000e+02, i8 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8U"(float 2.570000e+02, i8 1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto8U"(float -1.000000e+00, i8 -1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32"(float 0.000000e+00, i32 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32"(float 1.500000e+00, i32 1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32"(float 0x41D1194D80000000, i32 1147483648) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32"(float 0xC1E0000000000000, i32 -2147483648) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 0.000000e+00, i32 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 1.500000e+00, i32 1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 0x41F0000000000000, i32 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 0x41F3B9ACA0000000, i32 1000000000) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 0xC1F0000000000000, i32 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 0xC1D34BE880000000, i32 -1294967296) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto32U"(float 0xBFF19999A0000000, i32 -1) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto64F"(float 0.000000e+00, double 0.000000e+00) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto64F"(float 1.500000e+00, double 1.500000e+00) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto64F"(float 1.000000e+10, double 1.000000e+10) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32Fto64F"(float -1.000000e+10, double -1.000000e+10) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Fto32F"(double 0.000000e+00, float 0.000000e+00) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Fto32F"(double 1.500000e+00, float 1.500000e+00) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Fto32F"(double 1.000000e+10, float 1.000000e+10) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Fto32F"(double -1.000000e+10, float -1.000000e+10) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to64F"(i64 0, double 0.000000e+00) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to64F"(i64 10000000000, double 1.000000e+10) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to64F"(i64 9223372036854775807, double 0x43E0000000000000) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64to64F"(i64 -9223372036854775807, double 0xC3E0000000000000) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Uto64F"(i64 0, double 0.000000e+00) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Uto64F"(i64 10000000000, double 1.000000e+10) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Uto64F"(i64 9223372036854775807, double 0x43E0000000000000) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt64Uto64F"(i64 -1, double 0x43F0000000000000) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32to64"(i32 0, i64 0) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvt32to64"(i32 2147483647, i64 2147483647) + call void @"github.com/goplus/llgo/cl/_testrt/cast.cvtUinptr"(i32 1024, i64 1024) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/cast.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testrt/clear/in.go b/cl/_testrt/clear/in.go similarity index 100% rename from compiler/cl/_testrt/clear/in.go rename to cl/_testrt/clear/in.go diff --git a/compiler/cl/_testrt/clear/out.ll b/cl/_testrt/clear/out.ll similarity index 92% rename from compiler/cl/_testrt/clear/out.ll rename to cl/_testrt/clear/out.ll index 9ae1a26b..71e645cf 100644 --- a/compiler/cl/_testrt/clear/out.ll +++ b/cl/_testrt/clear/out.ll @@ -1,11 +1,11 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/clear' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/clear" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/clear' +source_filename = "github.com/goplus/llgo/cl/_testrt/clear" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/clear.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/clear.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @"[]_llgo_int" = linkonce global ptr null, align 8 @"map[_llgo_int]_llgo_int" = linkonce global ptr null, align 8 @@ -13,9 +13,9 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/clear" @1 = private unnamed_addr constant [4 x i8] c"keys", align 1 @2 = private unnamed_addr constant [5 x i8] c"elems", align 1 @3 = private unnamed_addr constant [8 x i8] c"overflow", align 1 -@4 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/clear", align 1 +@4 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testrt/clear", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/clear.Clear"() { +define void @"github.com/goplus/llgo/cl/_testrt/clear.Clear"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -63,14 +63,14 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/clear.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/clear.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/clear.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/clear.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/clear.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/clear.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/clear.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/clear.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -79,7 +79,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testrt/clear.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/clear.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -132,7 +132,7 @@ _llgo_5: ; preds = %_llgo_4 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %22, 0 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 4, 1 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28, i64 4, 2 - %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 48 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29) + %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 39 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29) %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %9, ptr %10, ptr %30, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %31) store ptr %31, ptr @"map[_llgo_int]_llgo_int", align 8 diff --git a/compiler/cl/_testrt/closure/in.go b/cl/_testrt/closure/in.go similarity index 88% rename from compiler/cl/_testrt/closure/in.go rename to cl/_testrt/closure/in.go index 85eb0a4e..6ee10c0e 100644 --- a/compiler/cl/_testrt/closure/in.go +++ b/cl/_testrt/closure/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/compiler/cl/_testrt/closure/out.ll b/cl/_testrt/closure/out.ll similarity index 54% rename from compiler/cl/_testrt/closure/out.ll rename to cl/_testrt/closure/out.ll index 47b725b0..13711786 100644 --- a/compiler/cl/_testrt/closure/out.ll +++ b/cl/_testrt/closure/out.ll @@ -1,51 +1,51 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/closure' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/closure" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/closure' +source_filename = "github.com/goplus/llgo/cl/_testrt/closure" -@"github.com/goplus/llgo/compiler/cl/_testrt/closure.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/closure.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/closure.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closure.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/closure.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closure.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/closure.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/closure.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$1"(i64 100, i64 200) + call void @"github.com/goplus/llgo/cl/_testrt/closure.main$1"(i64 100, i64 200) %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2", ptr null }, ptr %0, align 8 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/closure.main$2", ptr null }, ptr %0, align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$3", ptr undef }, ptr %1, 1 + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/closure.main$3", ptr undef }, ptr %1, 1 %4 = extractvalue { ptr, ptr } %3, 1 %5 = extractvalue { ptr, ptr } %3, 0 call void %5(ptr %4) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$1"(i64 %0, i64 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/closure.main$1"(i64 %0, i64 %1) { _llgo_0: %2 = call i32 (ptr, ...) @printf(ptr @0, i64 %0, i64 %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2"(i64 %0, i64 %1) { +define void @"github.com/goplus/llgo/cl/_testrt/closure.main$2"(i64 %0, i64 %1) { _llgo_0: %2 = call i32 (ptr, ...) @printf(ptr @1, i64 %0, i64 %1) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$3"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/closure.main$3"(ptr %0) { _llgo_0: %1 = load { ptr }, ptr %0, align 8 %2 = extractvalue { ptr } %1, 0 @@ -58,9 +58,9 @@ _llgo_0: declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2"(ptr %0, i64 %1, i64 %2) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/closure.main$2"(ptr %0, i64 %1, i64 %2) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2"(i64 %1, i64 %2) + tail call void @"github.com/goplus/llgo/cl/_testrt/closure.main$2"(i64 %1, i64 %2) ret void } diff --git a/compiler/cl/_testrt/closureconv/in.go b/cl/_testrt/closureconv/in.go similarity index 100% rename from compiler/cl/_testrt/closureconv/in.go rename to cl/_testrt/closureconv/in.go diff --git a/cl/_testrt/closureconv/out.ll b/cl/_testrt/closureconv/out.ll new file mode 100644 index 00000000..e693a6b3 --- /dev/null +++ b/cl/_testrt/closureconv/out.ll @@ -0,0 +1,185 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/closureconv' +source_filename = "github.com/goplus/llgo/cl/_testrt/closureconv" + +%"github.com/goplus/llgo/cl/_testrt/closureconv.Call" = type { %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", i64 } +%"github.com/goplus/llgo/cl/_testrt/closureconv.Func" = type { ptr, ptr } + +@"github.com/goplus/llgo/cl/_testrt/closureconv.init$guard" = global i1 false, align 1 + +define i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.(*Call).add"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = add i64 %1, %2 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/closureconv.Call", ptr %0, i32 0, i32 1 + %5 = load i64, ptr %4, align 4 + %6 = add i64 %3, %5 + ret i64 %6 +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.add"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +define %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo1"(i64 %0) { +_llgo_0: + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 1 + store i64 %0, ptr %2, align 4 + %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0 + store ptr %1, ptr %4, align 8 + %5 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/closureconv.add$bound", ptr undef }, ptr %3, 1 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 0 + %7 = alloca %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", align 8 + store { ptr, ptr } %5, ptr %7, align 8 + %8 = load %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", ptr %7, align 8 + store %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %8, ptr %6, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 0 + %10 = load %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", ptr %9, align 8 + ret %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %10 +} + +define %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo2"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 + store ptr %0, ptr %2, align 8 + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/closureconv.add$bound", ptr undef }, ptr %1, 1 + %4 = alloca %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", align 8 + store { ptr, ptr } %3, ptr %4, align 8 + %5 = load %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", ptr %4, align 8 + ret %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %5 +} + +define %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo3"() { +_llgo_0: + ret %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/closureconv.add", ptr null } +} + +define %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo4"() { +_llgo_0: + ret %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/closureconv.demo4$1", ptr null } +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.demo4$1"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +define %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo5"(i64 %0) { +_llgo_0: + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) + store i64 %0, ptr %1, align 4 + %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %3 = getelementptr inbounds { ptr }, ptr %2, i32 0, i32 0 + store ptr %1, ptr %3, align 8 + %4 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/closureconv.demo5$1", ptr undef }, ptr %2, 1 + %5 = alloca %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", align 8 + store { ptr, ptr } %4, ptr %5, align 8 + %6 = load %"github.com/goplus/llgo/cl/_testrt/closureconv.Func", ptr %5, align 8 + ret %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %6 +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.demo5$1"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = add i64 %1, %2 + %4 = load { ptr }, ptr %0, align 8 + %5 = extractvalue { ptr } %4, 0 + %6 = load i64, ptr %5, align 4 + %7 = add i64 %3, %6 + ret i64 %7 +} + +define void @"github.com/goplus/llgo/cl/_testrt/closureconv.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/closureconv.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/closureconv.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/closureconv.main"() { +_llgo_0: + %0 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo1"(i64 1) + %1 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %0, 1 + %2 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %0, 0 + %3 = call i64 %2(ptr %1, i64 99, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + %4 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo2"() + %5 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %4, 1 + %6 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %4, 0 + %7 = call i64 %6(ptr %5, i64 100, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + %8 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo3"() + %9 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %8, 1 + %10 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %8, 0 + %11 = call i64 %10(ptr %9, i64 100, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + %12 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo4"() + %13 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %12, 1 + %14 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %12, 0 + %15 = call i64 %14(ptr %13, i64 100, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + %16 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo5"(i64 1) + %17 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %16, 1 + %18 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %16, 0 + %19 = call i64 %18(ptr %17, i64 99, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + %20 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo5"(i64 1) + %21 = alloca { ptr, ptr }, align 8 + store %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %20, ptr %21, align 8 + %22 = load { ptr, ptr }, ptr %21, align 8 + %23 = extractvalue { ptr, ptr } %22, 1 + %24 = extractvalue { ptr, ptr } %22, 0 + %25 = call i64 %24(ptr %23, i64 99, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %25) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + %26 = call %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/cl/_testrt/closureconv.demo5"(i64 1) + %27 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %26, 1 + %28 = extractvalue %"github.com/goplus/llgo/cl/_testrt/closureconv.Func" %26, 0 + %29 = call i64 %28(ptr %27, i64 99, i64 200) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %29) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + ret void +} + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) + +define i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.add$bound"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = load { ptr }, ptr %0, align 8 + %4 = extractvalue { ptr } %3, 0 + %5 = call i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.(*Call).add"(ptr %4, i64 %1, i64 %2) + ret i64 %5 +} + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) + +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/closureconv.add"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = tail call i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.add"(i64 %1, i64 %2) + ret i64 %3 +} + +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/closureconv.demo4$1"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = tail call i64 @"github.com/goplus/llgo/cl/_testrt/closureconv.demo4$1"(i64 %1, i64 %2) + ret i64 %3 +} + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) diff --git a/compiler/cl/_testrt/closureiface/in.go b/cl/_testrt/closureiface/in.go similarity index 100% rename from compiler/cl/_testrt/closureiface/in.go rename to cl/_testrt/closureiface/in.go diff --git a/compiler/cl/_testrt/closureiface/out.ll b/cl/_testrt/closureiface/out.ll similarity index 86% rename from compiler/cl/_testrt/closureiface/out.ll rename to cl/_testrt/closureiface/out.ll index 1df983af..1b37cc1e 100644 --- a/compiler/cl/_testrt/closureiface/out.ll +++ b/cl/_testrt/closureiface/out.ll @@ -1,54 +1,54 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/closureiface' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/closureiface" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/closureiface' +source_filename = "github.com/goplus/llgo/cl/_testrt/closureiface" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } -@"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/closureiface.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU" = linkonce global ptr null, align 8 @_llgo_Pointer = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [2 x i8] c"$f", align 1 @1 = private unnamed_addr constant [5 x i8] c"$data", align 1 -@2 = private unnamed_addr constant [55 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/closureiface", align 1 +@2 = private unnamed_addr constant [46 x i8] c"github.com/goplus/llgo/cl/_testrt/closureiface", align 1 @3 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/closureiface.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/closureiface.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/closureiface.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/closureiface.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/closureiface.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) store i64 200, ptr %0, align 4 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.main$1", ptr undef }, ptr %1, 1 + %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/closureiface.main$1", ptr undef }, ptr %1, 1 %4 = load ptr, ptr @_llgo_int, align 8 %5 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 %6 = load ptr, ptr @_llgo_Pointer, align 8 - %7 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %7 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store { ptr, ptr } %3, ptr %8, align 8 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr %8, 1 %11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, 0 - %12 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %12 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %13 = icmp eq ptr %11, %12 br i1 %13, label %_llgo_3, label %_llgo_4 @@ -86,7 +86,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 br i1 %27, label %_llgo_2, label %_llgo_1 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.main$1"(ptr %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testrt/closureiface.main$1"(ptr %0, i64 %1) { _llgo_0: %2 = load { ptr }, ptr %0, align 8 %3 = extractvalue { ptr } %2, 0 @@ -99,7 +99,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/closureiface.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -173,8 +173,8 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %37, 0 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 2, 1 %42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 2, 2 - %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 55 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42) - store ptr %43, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 46 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42) + store ptr %43, ptr @"github.com/goplus/llgo/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 %44 = load ptr, ptr @_llgo_string, align 8 %45 = icmp eq ptr %44, null br i1 %45, label %_llgo_7, label %_llgo_8 diff --git a/compiler/cl/_testrt/complex/in.go b/cl/_testrt/complex/in.go similarity index 100% rename from compiler/cl/_testrt/complex/in.go rename to cl/_testrt/complex/in.go diff --git a/compiler/cl/_testrt/complex/out.ll b/cl/_testrt/complex/out.ll similarity index 85% rename from compiler/cl/_testrt/complex/out.ll rename to cl/_testrt/complex/out.ll index 659c575b..934aca53 100644 --- a/compiler/cl/_testrt/complex/out.ll +++ b/cl/_testrt/complex/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/complex' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/complex" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/complex' +source_filename = "github.com/goplus/llgo/cl/_testrt/complex" -@"github.com/goplus/llgo/compiler/cl/_testrt/complex.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/complex.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/complex.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/complex.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/complex.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/complex.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/complex.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/complex.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/complex.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/complex.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double 1.000000e+00) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) diff --git a/compiler/cl/_testrt/concat/in.go b/cl/_testrt/concat/in.go similarity index 100% rename from compiler/cl/_testrt/concat/in.go rename to cl/_testrt/concat/in.go diff --git a/compiler/cl/_testrt/concat/out.ll b/cl/_testrt/concat/out.ll similarity index 83% rename from compiler/cl/_testrt/concat/out.ll rename to cl/_testrt/concat/out.ll index dbe8ff3c..d88ea00a 100644 --- a/compiler/cl/_testrt/concat/out.ll +++ b/cl/_testrt/concat/out.ll @@ -1,16 +1,16 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/concat' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/concat" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/concat' +source_filename = "github.com/goplus/llgo/cl/_testrt/concat" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/concat.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/concat.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [3 x i8] c"...", align 1 @1 = private unnamed_addr constant [5 x i8] c"Hello", align 1 @2 = private unnamed_addr constant [1 x i8] c" ", align 1 @3 = private unnamed_addr constant [5 x i8] c"World", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/concat.concat"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/concat.concat"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 br label %_llgo_1 @@ -38,27 +38,27 @@ _llgo_3: ; preds = %_llgo_1 ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2 } -define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/concat.info"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/concat.info"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" %0) %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/concat.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/concat.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/concat.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/concat.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/concat.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/concat.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/concat.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/concat.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48) %1 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %0, i64 0 @@ -70,7 +70,7 @@ _llgo_0: %4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4, i64 3, 1 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 3, 2 - %7 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/concat.concat"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6) + %7 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/concat.concat"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %7) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void diff --git a/compiler/cl/_testrt/constuptr/in.go b/cl/_testrt/constuptr/in.go similarity index 100% rename from compiler/cl/_testrt/constuptr/in.go rename to cl/_testrt/constuptr/in.go diff --git a/compiler/cl/_testrt/constuptr/out.ll b/cl/_testrt/constuptr/out.ll similarity index 51% rename from compiler/cl/_testrt/constuptr/out.ll rename to cl/_testrt/constuptr/out.ll index 51a39645..6d5ce9bb 100644 --- a/compiler/cl/_testrt/constuptr/out.ll +++ b/cl/_testrt/constuptr/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/constuptr' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/constuptr" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/constuptr' +source_filename = "github.com/goplus/llgo/cl/_testrt/constuptr" -@"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/constuptr.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/constuptr.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/constuptr.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/constuptr.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/constuptr.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr inttoptr (i64 100 to ptr)) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) diff --git a/compiler/cl/_testrt/cstr/in.go b/cl/_testrt/cstr/in.go similarity index 100% rename from compiler/cl/_testrt/cstr/in.go rename to cl/_testrt/cstr/in.go diff --git a/cl/_testrt/cstr/out.ll b/cl/_testrt/cstr/out.ll new file mode 100644 index 00000000..c99e5e04 --- /dev/null +++ b/cl/_testrt/cstr/out.ll @@ -0,0 +1,26 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/cstr' +source_filename = "github.com/goplus/llgo/cl/_testrt/cstr" + +@"github.com/goplus/llgo/cl/_testrt/cstr.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [14 x i8] c"Hello, world\0A\00", align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/cstr.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/cstr.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/cstr.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/cstr.main"() { +_llgo_0: + call void (ptr, ...) @printf(ptr @0) + ret void +} + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testrt/cvar/in.go b/cl/_testrt/cvar/in.go similarity index 100% rename from compiler/cl/_testrt/cvar/in.go rename to cl/_testrt/cvar/in.go diff --git a/cl/_testrt/cvar/out.ll b/cl/_testrt/cvar/out.ll new file mode 100644 index 00000000..9e6d20de --- /dev/null +++ b/cl/_testrt/cvar/out.ll @@ -0,0 +1,26 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/cvar' +source_filename = "github.com/goplus/llgo/cl/_testrt/cvar" + +@_bar_x = external global { [16 x i8], [2 x ptr] }, align 8 +@_bar_y = external global { [16 x i8] }, align 1 +@"github.com/goplus/llgo/cl/_testrt/cvar.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/cvar.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/cvar.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/cvar.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/cvar.main"() { +_llgo_0: + %0 = load { [16 x i8], [2 x ptr] }, ptr @_bar_x, align 8 + %1 = load { [16 x i8] }, ptr @_bar_y, align 1 + ret void +} diff --git a/compiler/cl/_testrt/eface/in.go b/cl/_testrt/eface/in.go similarity index 100% rename from compiler/cl/_testrt/eface/in.go rename to cl/_testrt/eface/in.go diff --git a/compiler/cl/_testrt/eface/out.ll b/cl/_testrt/eface/out.ll similarity index 83% rename from compiler/cl/_testrt/eface/out.ll rename to cl/_testrt/eface/out.ll index 04cb6423..e1af3246 100644 --- a/compiler/cl/_testrt/eface/out.ll +++ b/cl/_testrt/eface/out.ll @@ -1,16 +1,16 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/eface' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/eface" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/eface' +source_filename = "github.com/goplus/llgo/cl/_testrt/eface" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testrt/eface.eface" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testrt/eface.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } %"github.com/goplus/llgo/runtime/abi.UncommonType" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i16, i16, i32 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/eface.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"invoke", align 1 @1 = private unnamed_addr constant [7 x i8] c"\09elem: ", align 1 @2 = private unnamed_addr constant [9 x i8] c"\09uncomm: ", align 1 @@ -31,40 +31,40 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/eface" @"[10]_llgo_int" = linkonce global ptr null, align 8 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @_llgo_Pointer = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [2 x i8] c"$f", align 1 @4 = private unnamed_addr constant [5 x i8] c"$data", align 1 -@5 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/eface", align 1 +@5 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testrt/eface", align 1 @"*_llgo_int" = linkonce global ptr null, align 8 @"[]_llgo_int" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [5 x i8] c"hello", align 1 @_llgo_string = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [1 x i8] c"x", align 1 @8 = private unnamed_addr constant [1 x i8] c"y", align 1 @9 = private unnamed_addr constant [1 x i8] c"z", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/eface.T" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [1 x i8] c"T", align 1 @11 = private unnamed_addr constant [6 x i8] c"Invoke", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.(*T).Invoke"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/eface.(*T).Invoke"(ptr %0) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/eface.eface", ptr %1, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/eface.eface", ptr %1, i32 0, i32 0 %3 = load ptr, ptr %2, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpTyp"(ptr %3, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dumpTyp"(ptr %3, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpTyp"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { +define void @"github.com/goplus/llgo/cl/_testrt/eface.dumpTyp"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1) %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/abi.(*Type).String"(ptr %0) @@ -110,7 +110,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %22 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %0) %23 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 }) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpTyp"(ptr %22, %"github.com/goplus/llgo/runtime/internal/runtime.String" %23) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dumpTyp"(ptr %22, %"github.com/goplus/llgo/runtime/internal/runtime.String" %23) br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -121,7 +121,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 _llgo_3: ; preds = %_llgo_2 %26 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Uncommon"(ptr %0) %27 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 9 }) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpUncommon"(ptr %26, %"github.com/goplus/llgo/runtime/internal/runtime.String" %27) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dumpUncommon"(ptr %26, %"github.com/goplus/llgo/runtime/internal/runtime.String" %27) %28 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %0, i32 0, i32 10 %29 = load ptr, ptr %28, align 8 %30 = icmp ne ptr %29, null @@ -135,11 +135,11 @@ _llgo_5: ; preds = %_llgo_3 %32 = load ptr, ptr %31, align 8 %33 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Uncommon"(ptr %32) %34 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 9 }) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpUncommon"(ptr %33, %"github.com/goplus/llgo/runtime/internal/runtime.String" %34) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dumpUncommon"(ptr %33, %"github.com/goplus/llgo/runtime/internal/runtime.String" %34) br label %_llgo_4 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpUncommon"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { +define void @"github.com/goplus/llgo/cl/_testrt/eface.dumpUncommon"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1) %2 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.UncommonType", ptr %0, i32 0, i32 0 @@ -159,97 +159,97 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/eface.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/eface.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/eface.init$guard", align 1 call void @"github.com/goplus/llgo/runtime/abi.init"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$after"() + call void @"github.com/goplus/llgo/cl/_testrt/eface.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/eface.main"() { _llgo_0: %0 = load ptr, ptr @_llgo_bool, align 8 %1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %1, ptr inttoptr (i64 -1 to ptr), 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2) %3 = load ptr, ptr @_llgo_int, align 8 %4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5) %6 = load ptr, ptr @_llgo_int8, align 8 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8) %9 = load ptr, ptr @_llgo_int16, align 8 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) %12 = load ptr, ptr @_llgo_int32, align 8 %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0 %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14) %15 = load ptr, ptr @_llgo_int64, align 8 %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %15, 0 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17) %18 = load ptr, ptr @_llgo_uint, align 8 %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %18, 0 %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %19, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %20) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %20) %21 = load ptr, ptr @_llgo_uint8, align 8 %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %21, 0 %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %22, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23) %24 = load ptr, ptr @_llgo_uint16, align 8 %25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %24, 0 %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %25, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %26) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %26) %27 = load ptr, ptr @_llgo_uint32, align 8 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %27, 0 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29) %30 = load ptr, ptr @_llgo_uint64, align 8 %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %30, 0 %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %32) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %32) %33 = load ptr, ptr @_llgo_uintptr, align 8 %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %33, 0 %35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %34, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %35) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %35) %36 = load ptr, ptr @_llgo_float32, align 8 %37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %36, 0 %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %37, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %38) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %38) %39 = load ptr, ptr @_llgo_float64, align 8 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %39, 0 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41) %42 = load ptr, ptr @"[10]_llgo_int", align 8 %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) store [10 x i64] zeroinitializer, ptr %43, align 4 %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0 %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45) %46 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %47 = load ptr, ptr @_llgo_Pointer, align 8 - %48 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %48 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1", ptr null }, ptr %49, align 8 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/eface.main$1", ptr null }, ptr %49, align 8 %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %48, 0 %51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %50, ptr %49, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %51) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %51) %52 = load ptr, ptr @"*_llgo_int", align 8 %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %52, 0 %54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, ptr null, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %54) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %54) %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0) %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0 %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 0, 1 @@ -259,29 +259,29 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, ptr %60, align 8 %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %59, 0 %62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %61, ptr %60, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %62) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %62) %63 = load ptr, ptr @_llgo_string, align 8 %64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %64, align 8 %65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %63, 0 %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %65, ptr %64, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %66) - %67 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %66) + %67 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) store { i8, i64, i64 } zeroinitializer, ptr %68, align 4 %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %67, 0 %70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %69, ptr %68, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %70) - %71 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T", align 8 + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %70) + %71 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/eface.T", align 8 %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, ptr %72, align 8 %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %71, 0 %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %73, ptr %72, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %74) + call void @"github.com/goplus/llgo/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %74) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1"() { +define void @"github.com/goplus/llgo/cl/_testrt/eface.main$1"() { _llgo_0: ret void } @@ -308,7 +308,7 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/g declare void @"github.com/goplus/llgo/runtime/abi.init"() -define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/eface.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_bool, align 8 %1 = icmp eq ptr %0, null @@ -511,8 +511,8 @@ _llgo_34: ; preds = %_llgo_33, %_llgo_32 %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %72, 0 %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 1 %77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 2 - %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 48 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) - store ptr %78, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 39 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) + store ptr %78, ptr @"github.com/goplus/llgo/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %79 = load ptr, ptr @"*_llgo_int", align 8 %80 = icmp eq ptr %79, null br i1 %80, label %_llgo_35, label %_llgo_36 @@ -562,15 +562,15 @@ _llgo_40: ; preds = %_llgo_39, %_llgo_38 %100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %96, 0 %101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %100, i64 3, 1 %102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101, i64 3, 2 - %103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 48 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %102) - store ptr %103, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 - %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 1 }, i64 24, i64 16, i64 0, i64 1) - %105 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T", align 8 + %103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 39 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %102) + store ptr %103, ptr @"github.com/goplus/llgo/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 + %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 1 }, i64 24, i64 16, i64 0, i64 1) + %105 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/eface.T", align 8 %106 = icmp eq ptr %105, null br i1 %106, label %_llgo_41, label %_llgo_42 _llgo_41: ; preds = %_llgo_40 - store ptr %104, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T", align 8 + store ptr %104, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/eface.T", align 8 br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 @@ -580,8 +580,8 @@ _llgo_42: ; preds = %_llgo_41, %_llgo_40 _llgo_43: ; preds = %_llgo_42 %108 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %109 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %108, 1 - %110 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %109, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.(*T).Invoke", 2 - %111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %110, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.(*T).Invoke", 3 + %110 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %109, ptr @"github.com/goplus/llgo/cl/_testrt/eface.(*T).Invoke", 2 + %111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %110, ptr @"github.com/goplus/llgo/cl/_testrt/eface.(*T).Invoke", 3 %112 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %113 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %112, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %111, ptr %113, align 8 @@ -601,9 +601,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64, ptr) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1"(ptr %0) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/eface.main$1"(ptr %0) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1"() + tail call void @"github.com/goplus/llgo/cl/_testrt/eface.main$1"() ret void } diff --git a/compiler/cl/_testrt/float2any/in.go b/cl/_testrt/float2any/in.go similarity index 100% rename from compiler/cl/_testrt/float2any/in.go rename to cl/_testrt/float2any/in.go diff --git a/compiler/cl/_testrt/float2any/out.ll b/cl/_testrt/float2any/out.ll similarity index 80% rename from compiler/cl/_testrt/float2any/out.ll rename to cl/_testrt/float2any/out.ll index 307422c3..16676875 100644 --- a/compiler/cl/_testrt/float2any/out.ll +++ b/cl/_testrt/float2any/out.ll @@ -1,10 +1,10 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/float2any' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/float2any" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/float2any' +source_filename = "github.com/goplus/llgo/cl/_testrt/float2any" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/float2any.init$guard" = global i1 false, align 1 @_llgo_float32 = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [36 x i8] c"type assertion any -> float32 failed", align 1 @_llgo_string = linkonce global ptr null, align 8 @@ -13,7 +13,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/float2any" @2 = private unnamed_addr constant [36 x i8] c"type assertion any -> float64 failed", align 1 @3 = private unnamed_addr constant [9 x i8] c"error f64", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check32"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define void @"github.com/goplus/llgo/cl/_testrt/float2any.check32"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 %2 = load ptr, ptr @_llgo_float32, align 8 @@ -50,7 +50,7 @@ _llgo_4: ; preds = %_llgo_0 unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check64"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define void @"github.com/goplus/llgo/cl/_testrt/float2any.check64"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0 %2 = load ptr, ptr @_llgo_float64, align 8 @@ -86,50 +86,50 @@ _llgo_4: ; preds = %_llgo_0 unreachable } -define float @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f32"() { +define float @"github.com/goplus/llgo/cl/_testrt/float2any.f32"() { _llgo_0: ret float 0x400921FB60000000 } -define double @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f64"() { +define double @"github.com/goplus/llgo/cl/_testrt/float2any.f64"() { _llgo_0: ret double 0x400921FB53C8D4F1 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/float2any.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/float2any.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/float2any.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/float2any.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/float2any.main"() { _llgo_0: - %0 = call float @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f32"() + %0 = call float @"github.com/goplus/llgo/cl/_testrt/float2any.f32"() %1 = load ptr, ptr @_llgo_float32, align 8 %2 = bitcast float %0 to i32 %3 = inttoptr i32 %2 to ptr %4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %1, 0 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr %3, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check32"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5) - %6 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f64"() + call void @"github.com/goplus/llgo/cl/_testrt/float2any.check32"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5) + %6 = call double @"github.com/goplus/llgo/cl/_testrt/float2any.f64"() %7 = load ptr, ptr @_llgo_float64, align 8 %8 = bitcast double %6 to i64 %9 = inttoptr i64 %8 to ptr %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %9, 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check64"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) + call void @"github.com/goplus/llgo/cl/_testrt/float2any.check64"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/float2any.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_float32, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testrt/fprintf/in.go b/cl/_testrt/fprintf/in.go similarity index 100% rename from compiler/cl/_testrt/fprintf/in.go rename to cl/_testrt/fprintf/in.go diff --git a/cl/_testrt/fprintf/out.ll b/cl/_testrt/fprintf/out.ll new file mode 100644 index 00000000..c64cd434 --- /dev/null +++ b/cl/_testrt/fprintf/out.ll @@ -0,0 +1,28 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/fprintf' +source_filename = "github.com/goplus/llgo/cl/_testrt/fprintf" + +@"github.com/goplus/llgo/cl/_testrt/fprintf.init$guard" = global i1 false, align 1 +@__stderrp = external global ptr, align 8 +@0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/fprintf.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/fprintf.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/fprintf.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/fprintf.main"() { +_llgo_0: + %0 = load ptr, ptr @__stderrp, align 8 + call void (ptr, ptr, ...) @fprintf(ptr %0, ptr @0, i64 100) + ret void +} + +declare void @fprintf(ptr, ptr, ...) diff --git a/compiler/cl/_testrt/freevars/in.go b/cl/_testrt/freevars/in.go similarity index 100% rename from compiler/cl/_testrt/freevars/in.go rename to cl/_testrt/freevars/in.go diff --git a/compiler/cl/_testrt/freevars/out.ll b/cl/_testrt/freevars/out.ll similarity index 68% rename from compiler/cl/_testrt/freevars/out.ll rename to cl/_testrt/freevars/out.ll index fa077a37..bc5f3522 100644 --- a/compiler/cl/_testrt/freevars/out.ll +++ b/cl/_testrt/freevars/out.ll @@ -1,45 +1,45 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/freevars' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/freevars" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/freevars' +source_filename = "github.com/goplus/llgo/cl/_testrt/freevars" %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/freevars.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/freevars.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/freevars.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/freevars.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/freevars.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/freevars.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2", ptr null }) + call void @"github.com/goplus/llgo/cl/_testrt/freevars.main$1"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/freevars.main$2", ptr null }) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1"({ ptr, ptr } %0) { +define void @"github.com/goplus/llgo/cl/_testrt/freevars.main$1"({ ptr, ptr } %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) store { ptr, ptr } %0, ptr %1, align 8 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %3 = getelementptr inbounds { ptr }, ptr %2, i32 0, i32 0 store ptr %1, ptr %3, align 8 - %4 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1$1", ptr undef }, ptr %2, 1 + %4 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/freevars.main$1$1", ptr undef }, ptr %2, 1 %5 = extractvalue { ptr, ptr } %4, 1 %6 = extractvalue { ptr, ptr } %4, 0 call void %6(ptr %5, %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { +define void @"github.com/goplus/llgo/cl/_testrt/freevars.main$1$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { _llgo_0: %2 = load { ptr }, ptr %0, align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) @@ -70,14 +70,14 @@ _llgo_2: ; preds = %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { +define void @"github.com/goplus/llgo/cl/_testrt/freevars.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { _llgo_0: ret void } -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/freevars.main$2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) + tail call void @"github.com/goplus/llgo/cl/_testrt/freevars.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) ret void } diff --git a/compiler/cl/_testrt/funcaddr/in.go b/cl/_testrt/funcaddr/in.go similarity index 93% rename from compiler/cl/_testrt/funcaddr/in.go rename to cl/_testrt/funcaddr/in.go index 592866bb..d40fb3d6 100644 --- a/compiler/cl/_testrt/funcaddr/in.go +++ b/cl/_testrt/funcaddr/in.go @@ -3,7 +3,7 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) //llgo:type C diff --git a/compiler/cl/_testrt/funcaddr/out.ll b/cl/_testrt/funcaddr/out.ll similarity index 58% rename from compiler/cl/_testrt/funcaddr/out.ll rename to cl/_testrt/funcaddr/out.ll index 25846aa1..5ef9585c 100644 --- a/compiler/cl/_testrt/funcaddr/out.ll +++ b/cl/_testrt/funcaddr/out.ll @@ -1,35 +1,35 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/funcaddr' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/funcaddr" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/funcaddr' +source_filename = "github.com/goplus/llgo/cl/_testrt/funcaddr" -@"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/funcaddr.init$guard" = global i1 false, align 1 -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.add"(i64 %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testrt/funcaddr.add"(i64 %0, i64 %1) { _llgo_0: %2 = add i64 %0, %1 ret i64 %2 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/funcaddr.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/funcaddr.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/funcaddr.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/funcaddr.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - store ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.add", ptr %0, align 8 + store ptr @"github.com/goplus/llgo/cl/_testrt/funcaddr.add", ptr %0, align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - store ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.main$1", ptr %1, align 8 + store ptr @"github.com/goplus/llgo/cl/_testrt/funcaddr.main$1", ptr %1, align 8 %2 = load ptr, ptr %0, align 8 - %3 = icmp eq ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.add", %2 + %3 = icmp eq ptr @"github.com/goplus/llgo/cl/_testrt/funcaddr.add", %2 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %3) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %4 = load ptr, ptr %0, align 8 @@ -45,7 +45,7 @@ _llgo_0: ret void } -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.main$1"(i64 %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testrt/funcaddr.main$1"(i64 %0, i64 %1) { _llgo_0: %2 = add i64 %0, %1 ret i64 %2 diff --git a/compiler/cl/_testrt/funcdecl/in.go b/cl/_testrt/funcdecl/in.go similarity index 100% rename from compiler/cl/_testrt/funcdecl/in.go rename to cl/_testrt/funcdecl/in.go diff --git a/compiler/cl/_testrt/funcdecl/out.ll b/cl/_testrt/funcdecl/out.ll similarity index 80% rename from compiler/cl/_testrt/funcdecl/out.ll rename to cl/_testrt/funcdecl/out.ll index f67045c9..aaed539e 100644 --- a/compiler/cl/_testrt/funcdecl/out.ll +++ b/cl/_testrt/funcdecl/out.ll @@ -1,40 +1,40 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/funcdecl' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/funcdecl" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/funcdecl' +source_filename = "github.com/goplus/llgo/cl/_testrt/funcdecl" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.rtype" = type { ptr, ptr } +%"github.com/goplus/llgo/cl/_testrt/funcdecl.rtype" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } -@"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/funcdecl.init$guard" = global i1 false, align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @_llgo_Pointer = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [2 x i8] c"$f", align 1 @1 = private unnamed_addr constant [5 x i8] c"$data", align 1 -@2 = private unnamed_addr constant [51 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl", align 1 +@2 = private unnamed_addr constant [42 x i8] c"github.com/goplus/llgo/cl/_testrt/funcdecl", align 1 @3 = private unnamed_addr constant [68 x i8] c"type assertion any -> struct{$f func(); $data unsafe.Pointer} failed", align 1 @_llgo_string = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [4 x i8] c"demo", align 1 @5 = private unnamed_addr constant [5 x i8] c"hello", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.check"({ ptr, ptr } %0) { +define void @"github.com/goplus/llgo/cl/_testrt/funcdecl.check"({ ptr, ptr } %0) { _llgo_0: %1 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %2 = load ptr, ptr @_llgo_Pointer, align 8 - %3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %3 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo", ptr null }, ptr %4, align 8 + store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/funcdecl.demo", ptr null }, ptr %4, align 8 %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr %4, 1 - %7 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %7 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store { ptr, ptr } %0, ptr %8, align 8 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr %8, 1 %11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 0 - %12 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %12 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %13 = icmp eq ptr %11, %12 br i1 %13, label %_llgo_1, label %_llgo_2 @@ -42,7 +42,7 @@ _llgo_1: ; preds = %_llgo_0 %14 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 1 %15 = load { ptr, ptr }, ptr %14, align 8 %16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, 0 - %17 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %17 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %18 = icmp eq ptr %16, %17 br i1 %18, label %_llgo_3, label %_llgo_4 @@ -71,10 +71,10 @@ _llgo_3: ; preds = %_llgo_1 %27 = extractvalue { ptr, ptr } %24, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %27) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo") + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.demo") call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %28 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6) - %29 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %10) + %28 = call ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6) + %29 = call ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %10) %30 = icmp eq ptr %28, %29 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %30) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) @@ -90,53 +90,53 @@ _llgo_4: ; preds = %_llgo_1 unreachable } -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { +define ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.rtype", ptr %1, i32 0, i32 1 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/funcdecl.rtype", ptr %1, i32 0, i32 1 %3 = load ptr, ptr %2, align 8 %4 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0 %5 = load ptr, ptr %4, align 8 ret ptr %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo"() { +define void @"github.com/goplus/llgo/cl/_testrt/funcdecl.demo"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/funcdecl.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/funcdecl.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/funcdecl.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.check"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo", ptr null }) + call void @"github.com/goplus/llgo/cl/_testrt/funcdecl.check"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/funcdecl.demo", ptr null }) ret void } -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo"(ptr %0) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/funcdecl.demo"(ptr %0) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo"() + tail call void @"github.com/goplus/llgo/cl/_testrt/funcdecl.demo"() ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/funcdecl.init$after"() { _llgo_0: %0 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %1 = icmp eq ptr %0, null @@ -188,8 +188,8 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %26, 0 %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 2, 1 %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 2, 2 - %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31) - store ptr %32, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 + %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31) + store ptr %32, ptr @"github.com/goplus/llgo/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8 %33 = load ptr, ptr @_llgo_string, align 8 %34 = icmp eq ptr %33, null br i1 %34, label %_llgo_5, label %_llgo_6 diff --git a/compiler/cl/_testrt/gblarray/in.go b/cl/_testrt/gblarray/in.go similarity index 94% rename from compiler/cl/_testrt/gblarray/in.go rename to cl/_testrt/gblarray/in.go index 54dcf5e4..397a8d3c 100644 --- a/compiler/cl/_testrt/gblarray/in.go +++ b/cl/_testrt/gblarray/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" "github.com/goplus/llgo/runtime/abi" ) diff --git a/compiler/cl/_testrt/gblarray/out.ll b/cl/_testrt/gblarray/out.ll similarity index 62% rename from compiler/cl/_testrt/gblarray/out.ll rename to cl/_testrt/gblarray/out.ll index 943c5f91..97f271c0 100644 --- a/compiler/cl/_testrt/gblarray/out.ll +++ b/cl/_testrt/gblarray/out.ll @@ -1,30 +1,30 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/gblarray' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/gblarray" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/gblarray' +source_filename = "github.com/goplus/llgo/cl/_testrt/gblarray" %"github.com/goplus/llgo/runtime/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicTypes" = global [25 x ptr] zeroinitializer, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.init$guard" = global i1 false, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.sizeBasicTypes" = global [25 x i64] zeroinitializer, align 8 +@"github.com/goplus/llgo/cl/_testrt/gblarray.basicTypes" = global [25 x ptr] zeroinitializer, align 8 +@"github.com/goplus/llgo/cl/_testrt/gblarray.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/gblarray.sizeBasicTypes" = global [25 x i64] zeroinitializer, align 8 @0 = private unnamed_addr constant [20 x i8] c"Kind: %d, Size: %d\0A\00", align 1 -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.Basic"(i64 %0) { +define ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.Basic"(i64 %0) { _llgo_0: %1 = icmp sge i64 %0, 25 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %1) - %2 = getelementptr inbounds ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicTypes", i64 %0 + %2 = getelementptr inbounds ptr, ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.basicTypes", i64 %0 %3 = load ptr, ptr %2, align 8 ret ptr %3 } -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicType"(i64 %0) { +define ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.basicType"(i64 %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 72) %2 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %1, i32 0, i32 0 %3 = icmp sge i64 %0, 25 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %3) - %4 = getelementptr inbounds i64, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.sizeBasicTypes", i64 %0 + %4 = getelementptr inbounds i64, ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.sizeBasicTypes", i64 %0 %5 = load i64, ptr %4, align 4 %6 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %1, i32 0, i32 2 %7 = trunc i64 %0 to i32 @@ -36,26 +36,26 @@ _llgo_0: ret ptr %1 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/gblarray.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.init$guard", align 1 call void @"github.com/goplus/llgo/runtime/abi.init"() - store i64 16, ptr getelementptr inbounds (i64, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.sizeBasicTypes", i64 24), align 4 - %1 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicType"(i64 24) - store ptr %1, ptr getelementptr inbounds (ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicTypes", i64 24), align 8 + store i64 16, ptr getelementptr inbounds (i64, ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.sizeBasicTypes", i64 24), align 4 + %1 = call ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.basicType"(i64 24) + store ptr %1, ptr getelementptr inbounds (ptr, ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.basicTypes", i64 24), align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/gblarray.main"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.Basic"(i64 24) + %0 = call ptr @"github.com/goplus/llgo/cl/_testrt/gblarray.Basic"(i64 24) %1 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %0, i32 0, i32 6 %2 = load i8, ptr %1, align 1 %3 = sext i8 %2 to i64 diff --git a/compiler/cl/_testrt/gotypes/in.go b/cl/_testrt/gotypes/in.go similarity index 100% rename from compiler/cl/_testrt/gotypes/in.go rename to cl/_testrt/gotypes/in.go diff --git a/cl/_testrt/gotypes/out.ll b/cl/_testrt/gotypes/out.ll new file mode 100644 index 00000000..4ce9a20e --- /dev/null +++ b/cl/_testrt/gotypes/out.ll @@ -0,0 +1,30 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/gotypes' +source_filename = "github.com/goplus/llgo/cl/_testrt/gotypes" + +%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } + +@"github.com/goplus/llgo/cl/_testrt/gotypes.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/gotypes.foo"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { +_llgo_0: + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/gotypes.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/gotypes.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/gotypes.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/gotypes.main"() { +_llgo_0: + call void @"github.com/goplus/llgo/cl/_testrt/gotypes.foo"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) + ret void +} diff --git a/compiler/cl/_testrt/hello/in.go b/cl/_testrt/hello/in.go similarity index 72% rename from compiler/cl/_testrt/hello/in.go rename to cl/_testrt/hello/in.go index 216feded..f8db8892 100644 --- a/compiler/cl/_testrt/hello/in.go +++ b/cl/_testrt/hello/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/compiler/cl/_testrt/hello/libc" +import "github.com/goplus/llgo/cl/_testrt/hello/libc" var format = [...]int8{'H', 'e', 'l', 'l', 'o', ' ', '%', 'd', '\n', 0} diff --git a/compiler/cl/_testrt/hello/libc/libc.go b/cl/_testrt/hello/libc/libc.go similarity index 100% rename from compiler/cl/_testrt/hello/libc/libc.go rename to cl/_testrt/hello/libc/libc.go diff --git a/cl/_testrt/hello/out.ll b/cl/_testrt/hello/out.ll new file mode 100644 index 00000000..fa6ffd67 --- /dev/null +++ b/cl/_testrt/hello/out.ll @@ -0,0 +1,39 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/hello' +source_filename = "github.com/goplus/llgo/cl/_testrt/hello" + +@"github.com/goplus/llgo/cl/_testrt/hello.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testrt/hello.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/hello.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/hello.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/hello.init$guard", align 1 + store i8 72, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i64 9), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/hello.main"() { +_llgo_0: + %0 = call i32 @strlen(ptr @"github.com/goplus/llgo/cl/_testrt/hello.format") + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testrt/hello.format", i32 %0) + ret void +} + +declare i32 @strlen(ptr) + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testrt/index/in.go b/cl/_testrt/index/in.go similarity index 100% rename from compiler/cl/_testrt/index/in.go rename to cl/_testrt/index/in.go diff --git a/compiler/cl/_testrt/index/out.ll b/cl/_testrt/index/out.ll similarity index 74% rename from compiler/cl/_testrt/index/out.ll rename to cl/_testrt/index/out.ll index fb1f6b26..9d857dd3 100644 --- a/compiler/cl/_testrt/index/out.ll +++ b/cl/_testrt/index/out.ll @@ -1,54 +1,54 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/index' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/index" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/index' +source_filename = "github.com/goplus/llgo/cl/_testrt/index" -%"github.com/goplus/llgo/compiler/cl/_testrt/index.point" = type { i64, i64 } +%"github.com/goplus/llgo/cl/_testrt/index.point" = type { i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/index.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/index.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"123456", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/index.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/index.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/index.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/index.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/index.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/index.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/index.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/index.main"() { _llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", align 8 + %0 = alloca %"github.com/goplus/llgo/cl/_testrt/index.point", align 8 call void @llvm.memset(ptr %0, i8 0, i64 16, i1 false) - %1 = alloca [3 x %"github.com/goplus/llgo/compiler/cl/_testrt/index.point"], align 8 + %1 = alloca [3 x %"github.com/goplus/llgo/cl/_testrt/index.point"], align 8 call void @llvm.memset(ptr %1, i8 0, i64 48, i1 false) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 0 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %2, i32 0, i32 0 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %2, i32 0, i32 1 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 1 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %5, i32 0, i32 0 - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %5, i32 0, i32 1 - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 2 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %8, i32 0, i32 0 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %8, i32 0, i32 1 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %1, i64 0 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %2, i32 0, i32 0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %2, i32 0, i32 1 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %1, i64 1 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %5, i32 0, i32 0 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %5, i32 0, i32 1 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %1, i64 2 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %8, i32 0, i32 0 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %8, i32 0, i32 1 store i64 1, ptr %3, align 4 store i64 2, ptr %4, align 4 store i64 3, ptr %6, align 4 store i64 4, ptr %7, align 4 store i64 5, ptr %9, align 4 store i64 6, ptr %10, align 4 - %11 = load [3 x %"github.com/goplus/llgo/compiler/cl/_testrt/index.point"], ptr %1, align 4 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 2 - %13 = load %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %12, align 4 - store %"github.com/goplus/llgo/compiler/cl/_testrt/index.point" %13, ptr %0, align 4 - %14 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %0, i32 0, i32 0 + %11 = load [3 x %"github.com/goplus/llgo/cl/_testrt/index.point"], ptr %1, align 4 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %1, i64 2 + %13 = load %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %12, align 4 + store %"github.com/goplus/llgo/cl/_testrt/index.point" %13, ptr %0, align 4 + %14 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %0, i32 0, i32 0 %15 = load i64, ptr %14, align 4 - %16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %0, i32 0, i32 1 + %16 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/index.point", ptr %0, i32 0, i32 1 %17 = load i64, ptr %16, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) diff --git a/compiler/cl/_testrt/intgen/in.go b/cl/_testrt/intgen/in.go similarity index 95% rename from compiler/cl/_testrt/intgen/in.go rename to cl/_testrt/intgen/in.go index 12a5b034..08cddb06 100644 --- a/compiler/cl/_testrt/intgen/in.go +++ b/cl/_testrt/intgen/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) type generator struct { diff --git a/compiler/cl/_testrt/intgen/out.ll b/cl/_testrt/intgen/out.ll similarity index 77% rename from compiler/cl/_testrt/intgen/out.ll rename to cl/_testrt/intgen/out.ll index 0d6be07d..c4c821c1 100644 --- a/compiler/cl/_testrt/intgen/out.ll +++ b/cl/_testrt/intgen/out.ll @@ -1,15 +1,15 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/intgen' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/intgen" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/intgen' +source_filename = "github.com/goplus/llgo/cl/_testrt/intgen" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator" = type { i32 } +%"github.com/goplus/llgo/cl/_testrt/intgen.generator" = type { i32 } -@"github.com/goplus/llgo/compiler/cl/_testrt/intgen.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/intgen.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 %0, { ptr, ptr } %1) { +define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testrt/intgen.genInts"(i64 %0, { ptr, ptr } %1) { _llgo_0: %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.MakeSlice"(i64 %0, i64 %0, i64 4) %3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1 @@ -39,34 +39,34 @@ _llgo_3: ; preds = %_llgo_1 ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2 } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.(*generator).next"(ptr %0) { +define i32 @"github.com/goplus/llgo/cl/_testrt/intgen.(*generator).next"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0 %2 = load i32, ptr %1, align 4 %3 = add i32 %2, 1 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0 store i32 %3, ptr %4, align 4 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0 %6 = load i32, ptr %5, align 4 ret i32 %6 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/intgen.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/intgen.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/intgen.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/intgen.main"() { _llgo_0: - %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } { ptr @__llgo_stub.rand, ptr null }) + %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } { ptr @__llgo_stub.rand, ptr null }) %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 br label %_llgo_1 @@ -94,8 +94,8 @@ _llgo_3: ; preds = %_llgo_1 %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %15 = getelementptr inbounds { ptr }, ptr %14, i32 0, i32 0 store ptr %13, ptr %15, align 8 - %16 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main$1", ptr undef }, ptr %14, 1 - %17 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %16) + %16 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/intgen.main$1", ptr undef }, ptr %14, 1 + %17 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %16) %18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 1 br label %_llgo_4 @@ -119,13 +119,13 @@ _llgo_5: ; preds = %_llgo_4 _llgo_6: ; preds = %_llgo_4 %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4) - %31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %30, i32 0, i32 0 + %31 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/intgen.generator", ptr %30, i32 0, i32 0 store i32 1, ptr %31, align 4 %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %33 = getelementptr inbounds { ptr }, ptr %32, i32 0, i32 0 store ptr %30, ptr %33, align 8 - %34 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.next$bound", ptr undef }, ptr %32, 1 - %35 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %34) + %34 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/intgen.next$bound", ptr undef }, ptr %32, 1 + %35 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %34) %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 1 br label %_llgo_7 @@ -151,7 +151,7 @@ _llgo_9: ; preds = %_llgo_7 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main$1"(ptr %0) { +define i32 @"github.com/goplus/llgo/cl/_testrt/intgen.main$1"(ptr %0) { _llgo_0: %1 = load { ptr }, ptr %0, align 8 %2 = extractvalue { ptr } %1, 0 @@ -182,10 +182,10 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.next$bound"(ptr %0) { +define i32 @"github.com/goplus/llgo/cl/_testrt/intgen.next$bound"(ptr %0) { _llgo_0: %1 = load { ptr }, ptr %0, align 8 %2 = extractvalue { ptr } %1, 0 - %3 = call i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.(*generator).next"(ptr %2) + %3 = call i32 @"github.com/goplus/llgo/cl/_testrt/intgen.(*generator).next"(ptr %2) ret i32 %3 } diff --git a/compiler/cl/_testrt/len/in.go b/cl/_testrt/len/in.go similarity index 100% rename from compiler/cl/_testrt/len/in.go rename to cl/_testrt/len/in.go diff --git a/compiler/cl/_testrt/len/out.ll b/cl/_testrt/len/out.ll similarity index 81% rename from compiler/cl/_testrt/len/out.ll rename to cl/_testrt/len/out.ll index a23dfcfb..4d623978 100644 --- a/compiler/cl/_testrt/len/out.ll +++ b/cl/_testrt/len/out.ll @@ -1,12 +1,12 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/len' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/len" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/len' +source_filename = "github.com/goplus/llgo/cl/_testrt/len" -%"github.com/goplus/llgo/compiler/cl/_testrt/len.data" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } +%"github.com/goplus/llgo/cl/_testrt/len.data" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } -@"github.com/goplus/llgo/compiler/cl/_testrt/len.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/len.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @_llgo_string = linkonce global ptr null, align 8 @"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8 @@ -14,42 +14,42 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/len" @1 = private unnamed_addr constant [4 x i8] c"keys", align 1 @2 = private unnamed_addr constant [5 x i8] c"elems", align 1 @3 = private unnamed_addr constant [8 x i8] c"overflow", align 1 -@4 = private unnamed_addr constant [46 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/len", align 1 +@4 = private unnamed_addr constant [37 x i8] c"github.com/goplus/llgo/cl/_testrt/len", align 1 @5 = private unnamed_addr constant [5 x i8] c"hello", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/len.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/len.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/len.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/len.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/len.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/len.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/len.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/len.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/len.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/len.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 56) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8 %3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %2, 1 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 1 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %0, i32 0, i32 1 %5 = load ptr, ptr %4, align 8 %6 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr %5) - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 2 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %0, i32 0, i32 2 %8 = load ptr, ptr %7, align 8 %9 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.MapLen"(ptr %8) - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 3 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %0, i32 0, i32 3 %11 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %10, align 8 %12 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11, 1 - %13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 1 + %13 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %0, i32 0, i32 1 %14 = load ptr, ptr %13, align 8 %15 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanCap"(ptr %14) - %16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 3 + %16 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %0, i32 0, i32 3 %17 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %16, align 8 %18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3) @@ -65,10 +65,10 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %18) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 56) - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 0 - %21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 1 + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 0 + %21 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 1 %22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 2) - %23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 2 + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 2 %24 = load ptr, ptr @_llgo_int, align 8 %25 = load ptr, ptr @_llgo_string, align 8 %26 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 @@ -78,7 +78,7 @@ _llgo_0: store i64 1, ptr %29, align 4 %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %28, ptr %27, ptr %29) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %30, align 8 - %31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 3 + %31 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 3 %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) %33 = getelementptr inbounds i64, ptr %32, i64 0 store i64 1, ptr %33, align 4 @@ -93,22 +93,22 @@ _llgo_0: store ptr %22, ptr %21, align 8 store ptr %27, ptr %23, align 8 store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, ptr %31, align 8 - %39 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 0 + %39 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 0 %40 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %39, align 8 %41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %40, 1 - %42 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 1 + %42 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 1 %43 = load ptr, ptr %42, align 8 %44 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr %43) - %45 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 2 + %45 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 2 %46 = load ptr, ptr %45, align 8 %47 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.MapLen"(ptr %46) - %48 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 3 + %48 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 3 %49 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %48, align 8 %50 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, 1 - %51 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 1 + %51 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 1 %52 = load ptr, ptr %51, align 8 %53 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanCap"(ptr %52) - %54 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 3 + %54 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/len.data", ptr %19, i32 0, i32 3 %55 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %54, align 8 %56 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %41) @@ -140,7 +140,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64, i64) -define void @"github.com/goplus/llgo/compiler/cl/_testrt/len.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/len.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -192,7 +192,7 @@ _llgo_5: ; preds = %_llgo_4 %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 4, 1 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 4, 2 - %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 46 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28) + %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 37 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28) %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %8, ptr %9, ptr %29, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %30) store ptr %30, ptr @"map[_llgo_int]_llgo_string", align 8 diff --git a/cl/_testrt/linkname/in.go b/cl/_testrt/linkname/in.go new file mode 100644 index 00000000..e98e5b07 --- /dev/null +++ b/cl/_testrt/linkname/in.go @@ -0,0 +1,29 @@ +package main + +import ( + _ "unsafe" + + "github.com/goplus/lib/c" + _ "github.com/goplus/llgo/cl/_testrt/linkname/linktarget" +) + +//go:linkname print github.com/goplus/llgo/cl/_testrt/linkname/linktarget.F +func print(a, b, c, d *c.Char) + +type m struct { + s string +} + +//go:linkname setInfo github.com/goplus/llgo/cl/_testrt/linkname/linktarget.(*m).setInfo +func setInfo(*m, string) + +//go:linkname info github.com/goplus/llgo/cl/_testrt/linkname/linktarget.m.info +func info(m) string + +func main() { + print(c.Str("a"), c.Str("b"), c.Str("c"), c.Str("d")) + print(c.Str("1"), c.Str("2"), c.Str("3"), c.Str("4")) + var m m + setInfo(&m, "hello") + println(info(m)) +} diff --git a/compiler/cl/_testrt/linkname/linktarget/foo.go b/cl/_testrt/linkname/linktarget/foo.go similarity index 88% rename from compiler/cl/_testrt/linkname/linktarget/foo.go rename to cl/_testrt/linkname/linktarget/foo.go index fa89c8e8..cbad2d14 100644 --- a/compiler/cl/_testrt/linkname/linktarget/foo.go +++ b/cl/_testrt/linkname/linktarget/foo.go @@ -1,7 +1,7 @@ package linktarget import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func F(a, b *c.Char) { diff --git a/compiler/cl/_testrt/linkname/linktarget/out.ll b/cl/_testrt/linkname/linktarget/out.ll similarity index 100% rename from compiler/cl/_testrt/linkname/linktarget/out.ll rename to cl/_testrt/linkname/linktarget/out.ll diff --git a/cl/_testrt/linkname/out.ll b/cl/_testrt/linkname/out.ll new file mode 100644 index 00000000..159a0a4a --- /dev/null +++ b/cl/_testrt/linkname/out.ll @@ -0,0 +1,57 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/linkname' +source_filename = "github.com/goplus/llgo/cl/_testrt/linkname" + +%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/cl/_testrt/linkname.m" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } + +@"github.com/goplus/llgo/cl/_testrt/linkname.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [2 x i8] c"a\00", align 1 +@1 = private unnamed_addr constant [2 x i8] c"b\00", align 1 +@2 = private unnamed_addr constant [2 x i8] c"c\00", align 1 +@3 = private unnamed_addr constant [2 x i8] c"d\00", align 1 +@4 = private unnamed_addr constant [2 x i8] c"1\00", align 1 +@5 = private unnamed_addr constant [2 x i8] c"2\00", align 1 +@6 = private unnamed_addr constant [2 x i8] c"3\00", align 1 +@7 = private unnamed_addr constant [2 x i8] c"4\00", align 1 +@8 = private unnamed_addr constant [5 x i8] c"hello", align 1 + +declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.m.info"(%"github.com/goplus/llgo/cl/_testrt/linkname.m") + +define void @"github.com/goplus/llgo/cl/_testrt/linkname.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/linkname.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/linkname.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.init"() + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/linkname.main"() { +_llgo_0: + call void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.F"(ptr @0, ptr @1, ptr @2, ptr @3) + call void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.F"(ptr @4, ptr @5, ptr @6, ptr @7) + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) + call void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.(*m).setInfo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 }) + %1 = load %"github.com/goplus/llgo/cl/_testrt/linkname.m", ptr %0, align 8 + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.m.info"(%"github.com/goplus/llgo/cl/_testrt/linkname.m" %1) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %2) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + ret void +} + +declare void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.F"(ptr, ptr, ptr, ptr) + +declare void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.(*m).setInfo"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/cl/_testrt/linkname/linktarget.init"() + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) diff --git a/compiler/cl/_testrt/makemap/in.go b/cl/_testrt/makemap/in.go similarity index 100% rename from compiler/cl/_testrt/makemap/in.go rename to cl/_testrt/makemap/in.go diff --git a/compiler/cl/_testrt/makemap/out.ll b/cl/_testrt/makemap/out.ll similarity index 85% rename from compiler/cl/_testrt/makemap/out.ll rename to cl/_testrt/makemap/out.ll index f977b12c..8a7161ff 100644 --- a/compiler/cl/_testrt/makemap/out.ll +++ b/cl/_testrt/makemap/out.ll @@ -1,13 +1,13 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/makemap' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/makemap" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/makemap' +source_filename = "github.com/goplus/llgo/cl/_testrt/makemap" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = type { i8, i8 } +%"github.com/goplus/llgo/cl/_testrt/makemap.N" = type { i8, i8 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/makemap.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @_llgo_string = linkonce global ptr null, align 8 @"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8 @@ -15,7 +15,7 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/makemap" @1 = private unnamed_addr constant [4 x i8] c"keys", align 1 @2 = private unnamed_addr constant [5 x i8] c"elems", align 1 @3 = private unnamed_addr constant [8 x i8] c"overflow", align 1 -@4 = private unnamed_addr constant [50 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/makemap", align 1 +@4 = private unnamed_addr constant [41 x i8] c"github.com/goplus/llgo/cl/_testrt/makemap", align 1 @5 = private unnamed_addr constant [5 x i8] c"hello", align 1 @6 = private unnamed_addr constant [5 x i8] c"world", align 1 @7 = private unnamed_addr constant [4 x i8] c"llgo", align 1 @@ -26,59 +26,59 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/makemap" @11 = private unnamed_addr constant [7 x i8] c"bad len", align 1 @_llgo_any = linkonce global ptr null, align 8 @"map[_llgo_any]_llgo_int" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1" = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [2 x i8] c"N1", align 1 @"[1]_llgo_int" = linkonce global ptr null, align 8 -@13 = private unnamed_addr constant [90 x i8] c"type assertion interface{} -> github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1 failed", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K" = linkonce global ptr null, align 8 +@13 = private unnamed_addr constant [81 x i8] c"type assertion interface{} -> github.com/goplus/llgo/cl/_testrt/makemap.N1 failed", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K" = linkonce global ptr null, align 8 @14 = private unnamed_addr constant [1 x i8] c"K", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 @15 = private unnamed_addr constant [1 x i8] c"N", align 1 @_llgo_int8 = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A" = linkonce global ptr null, align 8 @16 = private unnamed_addr constant [2 x i8] c"n1", align 1 @17 = private unnamed_addr constant [2 x i8] c"n2", align 1 -@"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 -@18 = private unnamed_addr constant [89 x i8] c"type assertion interface{} -> github.com/goplus/llgo/compiler/cl/_testrt/makemap.K failed", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2" = linkonce global ptr null, align 8 +@"[1]_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 +@18 = private unnamed_addr constant [80 x i8] c"type assertion interface{} -> github.com/goplus/llgo/cl/_testrt/makemap.K failed", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2" = linkonce global ptr null, align 8 @19 = private unnamed_addr constant [2 x i8] c"K2", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 -@"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 -@20 = private unnamed_addr constant [90 x i8] c"type assertion interface{} -> github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2 failed", align 1 +@"*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 +@"[1]*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N" = linkonce global ptr null, align 8 +@20 = private unnamed_addr constant [81 x i8] c"type assertion interface{} -> github.com/goplus/llgo/cl/_testrt/makemap.K2 failed", align 1 @"chan _llgo_int" = linkonce global ptr null, align 8 @21 = private unnamed_addr constant [4 x i8] c"chan", align 1 @"map[chan _llgo_int]_llgo_int" = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.M" = linkonce global ptr null, align 8 @22 = private unnamed_addr constant [1 x i8] c"M", align 1 -@"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string" = linkonce global ptr null, align 8 +@"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string" = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/makemap.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/makemap.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/makemap.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make1"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make2"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make3"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make4"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make5"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make6"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make7"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make1"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make2"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make3"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make4"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make5"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make6"() + call void @"github.com/goplus/llgo/cl/_testrt/makemap.make7"() ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make1"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make1"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = load ptr, ptr @_llgo_string, align 8 @@ -274,7 +274,7 @@ _llgo_16: ; preds = %_llgo_15, %_llgo_14 br i1 %97, label %_llgo_5, label %_llgo_6 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make2"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make2"() { _llgo_0: %0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %0, i64 0) @@ -306,7 +306,7 @@ _llgo_0: %10 = getelementptr inbounds i64, ptr %9, i64 0 store i64 1, ptr %10, align 4 %11 = load [1 x i64], ptr %9, align 4 - %12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + %12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 %13 = extractvalue [1 x i64] %11, 0 %14 = inttoptr i64 %13 to ptr %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0 @@ -321,7 +321,7 @@ _llgo_0: %21 = getelementptr inbounds i64, ptr %20, i64 0 store i64 2, ptr %21, align 4 %22 = load [1 x i64], ptr %20, align 4 - %23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + %23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 %24 = extractvalue [1 x i64] %22, 0 %25 = inttoptr i64 %24 to ptr %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %23, 0 @@ -336,7 +336,7 @@ _llgo_0: %32 = getelementptr inbounds i64, ptr %31, i64 0 store i64 3, ptr %32, align 4 %33 = load [1 x i64], ptr %31, align 4 - %34 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + %34 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 %35 = extractvalue [1 x i64] %33, 0 %36 = inttoptr i64 %35 to ptr %37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %34, 0 @@ -351,7 +351,7 @@ _llgo_0: %43 = getelementptr inbounds i64, ptr %42, i64 0 store i64 2, ptr %43, align 4 %44 = load [1 x i64], ptr %42, align 4 - %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 %46 = extractvalue [1 x i64] %44, 0 %47 = inttoptr i64 %46 to ptr %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %45, 0 @@ -374,7 +374,7 @@ _llgo_2: ; preds = %_llgo_6 %57 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %68, 1 %58 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %68, 2 %59 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %57, 0 - %60 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + %60 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 %61 = icmp eq ptr %59, %60 br i1 %61, label %_llgo_7, label %_llgo_8 @@ -410,39 +410,39 @@ _llgo_7: ; preds = %_llgo_2 _llgo_8: ; preds = %_llgo_2 %72 = load ptr, ptr @_llgo_string, align 8 %73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 90 }, ptr %73, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 81 }, ptr %73, align 8 %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %72, 0 %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %74, ptr %73, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %75) unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make3"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make3"() { _llgo_0: - %0 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8 + %0 = alloca [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], align 8 call void @llvm.memset(ptr %0, i8 0, i64 2, i1 false) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %0, i64 0 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %1, i32 0, i32 0 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %1, i32 0, i32 1 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %0, i64 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %1, i32 0, i32 0 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %1, i32 0, i32 1 store i8 1, ptr %2, align 1 store i8 2, ptr %3, align 1 - %4 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %0, align 1 - %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + %4 = load [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], ptr %0, align 1 + %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2) - store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %4, ptr %6, align 1 + store [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"] %4, ptr %6, align 1 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %6, 1 - %9 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8 + %9 = alloca [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], align 8 call void @llvm.memset(ptr %9, i8 0, i64 2, i1 false) - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %9, i64 0 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %10, i32 0, i32 0 - %12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %10, i32 0, i32 1 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %9, i64 0 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %10, i32 0, i32 0 + %12 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %10, i32 0, i32 1 store i8 1, ptr %11, align 1 store i8 2, ptr %12, align 1 - %13 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %9, align 1 - %14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + %13 = load [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], ptr %9, align 1 + %14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 %15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2) - store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %13, ptr %15, align 1 + store [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"] %13, ptr %15, align 1 %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %15, 1 %18 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %17) @@ -450,17 +450,17 @@ _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %19 = load ptr, ptr @"map[_llgo_any]_llgo_int", align 8 %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %19, i64 0) - %21 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8 + %21 = alloca [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], align 8 call void @llvm.memset(ptr %21, i8 0, i64 2, i1 false) - %22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %21, i64 0 - %23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %22, i32 0, i32 0 - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %22, i32 0, i32 1 + %22 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %21, i64 0 + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %22, i32 0, i32 0 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %22, i32 0, i32 1 store i8 1, ptr %23, align 1 store i8 2, ptr %24, align 1 - %25 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %21, align 1 - %26 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + %25 = load [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], ptr %21, align 1 + %26 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2) - store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %25, ptr %27, align 1 + store [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"] %25, ptr %27, align 1 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %26, 0 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr %27, 1 %30 = load ptr, ptr @"map[_llgo_any]_llgo_int", align 8 @@ -468,17 +468,17 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr %31, align 8 %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %30, ptr %20, ptr %31) store i64 100, ptr %32, align 4 - %33 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8 + %33 = alloca [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], align 8 call void @llvm.memset(ptr %33, i8 0, i64 2, i1 false) - %34 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %33, i64 0 - %35 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %34, i32 0, i32 0 - %36 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %34, i32 0, i32 1 + %34 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %33, i64 0 + %35 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %34, i32 0, i32 0 + %36 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %34, i32 0, i32 1 store i8 3, ptr %35, align 1 store i8 4, ptr %36, align 1 - %37 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %33, align 1 - %38 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + %37 = load [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], ptr %33, align 1 + %38 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2) - store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %37, ptr %39, align 1 + store [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"] %37, ptr %39, align 1 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1 %42 = load ptr, ptr @"map[_llgo_any]_llgo_int", align 8 @@ -499,7 +499,7 @@ _llgo_2: ; preds = %_llgo_6 %49 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %60, 1 %50 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %60, 2 %51 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, 0 - %52 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + %52 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 %53 = icmp eq ptr %51, %52 br i1 %53, label %_llgo_7, label %_llgo_8 @@ -525,13 +525,13 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 _llgo_7: ; preds = %_llgo_2 %62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, 1 - %63 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %62, align 1 - %64 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8 + %63 = load [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], ptr %62, align 1 + %64 = alloca [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"], align 8 call void @llvm.memset(ptr %64, i8 0, i64 2, i1 false) - store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %63, ptr %64, align 1 - %65 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %64, i64 0 - %66 = load %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %65, align 1 - %67 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" %66, 0 + store [1 x %"github.com/goplus/llgo/cl/_testrt/makemap.N"] %63, ptr %64, align 1 + %65 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %64, i64 0 + %66 = load %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %65, align 1 + %67 = extractvalue %"github.com/goplus/llgo/cl/_testrt/makemap.N" %66, 0 %68 = sext i8 %67 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %68) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -542,26 +542,26 @@ _llgo_7: ; preds = %_llgo_2 _llgo_8: ; preds = %_llgo_2 %69 = load ptr, ptr @_llgo_string, align 8 %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 89 }, ptr %70, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 80 }, ptr %70, align 8 %71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0 %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %71, ptr %70, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %72) unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make4"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make4"() { _llgo_0: %0 = alloca [1 x ptr], align 8 call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) %1 = getelementptr inbounds ptr, ptr %0, i64 0 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2) - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %2, i32 0, i32 0 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %2, i32 0, i32 1 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %2, i32 0, i32 0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %2, i32 0, i32 1 store i8 1, ptr %3, align 1 store i8 2, ptr %4, align 1 store ptr %2, ptr %1, align 8 %5 = load [1 x ptr], ptr %0, align 8 - %6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + %6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 %7 = extractvalue [1 x ptr] %5, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, ptr %7, 1 @@ -569,13 +569,13 @@ _llgo_0: call void @llvm.memset(ptr %10, i8 0, i64 8, i1 false) %11 = getelementptr inbounds ptr, ptr %10, i64 0 %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2) - %13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %12, i32 0, i32 0 - %14 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %12, i32 0, i32 1 + %13 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %12, i32 0, i32 0 + %14 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %12, i32 0, i32 1 store i8 1, ptr %13, align 1 store i8 2, ptr %14, align 1 store ptr %12, ptr %11, align 8 %15 = load [1 x ptr], ptr %10, align 8 - %16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + %16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 %17 = extractvalue [1 x ptr] %15, 0 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %16, 0 %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr %17, 1 @@ -588,13 +588,13 @@ _llgo_0: call void @llvm.memset(ptr %23, i8 0, i64 8, i1 false) %24 = getelementptr inbounds ptr, ptr %23, i64 0 %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2) - %26 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %25, i32 0, i32 0 - %27 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %25, i32 0, i32 1 + %26 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %25, i32 0, i32 0 + %27 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %25, i32 0, i32 1 store i8 1, ptr %26, align 1 store i8 2, ptr %27, align 1 store ptr %25, ptr %24, align 8 %28 = load [1 x ptr], ptr %23, align 8 - %29 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + %29 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 %30 = extractvalue [1 x ptr] %28, 0 %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %29, 0 %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr %30, 1 @@ -607,13 +607,13 @@ _llgo_0: call void @llvm.memset(ptr %36, i8 0, i64 8, i1 false) %37 = getelementptr inbounds ptr, ptr %36, i64 0 %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2) - %39 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %38, i32 0, i32 0 - %40 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %38, i32 0, i32 1 + %39 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %38, i32 0, i32 0 + %40 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %38, i32 0, i32 1 store i8 3, ptr %39, align 1 store i8 4, ptr %40, align 1 store ptr %38, ptr %37, align 8 %41 = load [1 x ptr], ptr %36, align 8 - %42 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + %42 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 %43 = extractvalue [1 x ptr] %41, 0 %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0 %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1 @@ -635,7 +635,7 @@ _llgo_2: ; preds = %_llgo_6 %53 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %64, 1 %54 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %64, 2 %55 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, 0 - %56 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + %56 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 %57 = icmp eq ptr %55, %56 br i1 %57, label %_llgo_7, label %_llgo_8 @@ -661,7 +661,7 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 _llgo_7: ; preds = %_llgo_2 %66 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, 1 - %67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %66, i32 0, i32 0 + %67 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/makemap.N", ptr %66, i32 0, i32 0 %68 = load i8, ptr %67, align 1 %69 = sext i8 %68 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %69) @@ -673,14 +673,14 @@ _llgo_7: ; preds = %_llgo_2 _llgo_8: ; preds = %_llgo_2 %70 = load ptr, ptr @_llgo_string, align 8 %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 90 }, ptr %71, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 81 }, ptr %71, align 8 %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %70, 0 %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %72, ptr %71, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %73) unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make5"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make5"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 0) %1 = load ptr, ptr @"chan _llgo_int", align 8 @@ -744,16 +744,16 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 br i1 %30, label %_llgo_2, label %_llgo_3 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make6"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make6"() { _llgo_0: %0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %0, i64 0) - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8 + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.M", align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) store i64 1, ptr %3, align 4 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %2, ptr %1, ptr %3) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %4, align 8 - %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8 + %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.M", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewMapIter"(ptr %5, ptr %1) br label %_llgo_1 @@ -792,22 +792,22 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 br i1 %18, label %_llgo_2, label %_llgo_3 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make7"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.make7"() { _llgo_0: - %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 - %1 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 + %1 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %1, i64 2) - %3 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + %3 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) store i64 1, ptr %4, align 4 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %3, ptr %2, ptr %4) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %5, align 8 - %6 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + %6 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) store i64 2, ptr %7, align 4 %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %6, ptr %2, ptr %7) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %8, align 8 - %9 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + %9 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewMapIter"(ptr %9, ptr %2) br label %_llgo_1 @@ -826,7 +826,7 @@ _llgo_2: ; preds = %_llgo_6 br label %_llgo_1 _llgo_3: ; preds = %_llgo_6 - %15 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + %15 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 %16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) store i64 1, ptr %16, align 4 %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess1"(ptr %15, ptr %2, ptr %16) @@ -853,7 +853,7 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 br i1 %26, label %_llgo_2, label %_llgo_3 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/makemap.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -905,7 +905,7 @@ _llgo_5: ; preds = %_llgo_4 %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 4, 1 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 4, 2 - %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28) + %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28) %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %8, ptr %9, ptr %29, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %30) store ptr %30, ptr @"map[_llgo_int]_llgo_string", align 8 @@ -942,7 +942,7 @@ _llgo_7: ; preds = %_llgo_6 %51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0 %52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %51, i64 4, 1 %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, i64 4, 2 - %54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53) + %54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53) %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %33, ptr %34, ptr %54, i64 12) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %55) store ptr %55, ptr @"map[_llgo_string]_llgo_int", align 8 @@ -958,7 +958,7 @@ _llgo_9: ; preds = %_llgo_8 %59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %58, 0 %60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 0, 1 %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 0, 2 - %62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61) + %62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61) store ptr %62, ptr @_llgo_any, align 8 br label %_llgo_10 @@ -972,7 +972,7 @@ _llgo_11: ; preds = %_llgo_10 %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %65, 0 %67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 0, 1 %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 0, 2 - %69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68) + %69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68) %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %71) @@ -981,7 +981,7 @@ _llgo_11: ; preds = %_llgo_10 %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %74, 0 %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 0, 1 %77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 0, 2 - %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) + %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %78) %80 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, ptr %79, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) @@ -1001,20 +1001,20 @@ _llgo_11: ; preds = %_llgo_10 %91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %86, 0 %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i64 4, 1 %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 4, 2 - %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93) + %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93) %95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %69, ptr %70, ptr %94, i64 24) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %95) store ptr %95, ptr @"map[_llgo_any]_llgo_int", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 2 }, i64 17, i64 8, i64 0, i64 0) - %97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 2 }, i64 17, i64 8, i64 0, i64 0) + %97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 %98 = icmp eq ptr %97, null br i1 %98, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - store ptr %96, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8 + store ptr %96, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N1", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 @@ -1037,23 +1037,23 @@ _llgo_17: ; preds = %_llgo_16 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 1 }, i64 17, i64 2, i64 0, i64 0) - %105 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 1 }, i64 17, i64 2, i64 0, i64 0) + %105 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 %106 = icmp eq ptr %105, null br i1 %106, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - store ptr %104, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8 + store ptr %104, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K", align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) - %108 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) + %108 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 %109 = icmp eq ptr %108, null br i1 %109, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - store ptr %107, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + store ptr %107, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 @@ -1080,9 +1080,9 @@ _llgo_24: ; preds = %_llgo_23, %_llgo_22 %121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %118, 0 %122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %121, i64 2, 1 %123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, i64 2, 2 - %124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 2, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123) - store ptr %124, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8 - %125 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8 + %124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, i64 2, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123) + store ptr %124, ptr @"github.com/goplus/llgo/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8 + %125 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8 br i1 %109, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 @@ -1090,19 +1090,19 @@ _llgo_25: ; preds = %_llgo_24 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %126 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 - %127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) - %128 = load ptr, ptr @"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + %126 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 + %127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) + %128 = load ptr, ptr @"[1]_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 %129 = icmp eq ptr %128, null br i1 %129, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 %130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 1, ptr %127) - store ptr %130, ptr @"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + store ptr %130, ptr @"[1]_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %131 = load ptr, ptr @"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + %131 = load ptr, ptr @"[1]_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 br i1 %106, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 @@ -1110,32 +1110,32 @@ _llgo_29: ; preds = %_llgo_28 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 17, i64 8, i64 0, i64 0) - %133 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + %132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 17, i64 8, i64 0, i64 0) + %133 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 %134 = icmp eq ptr %133, null br i1 %134, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %132) - store ptr %132, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8 + store ptr %132, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.K2", align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) - %136 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + %135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) + %136 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 %137 = icmp eq ptr %136, null br i1 %137, label %_llgo_33, label %_llgo_34 _llgo_33: ; preds = %_llgo_32 %138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %135) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %138) - store ptr %138, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + store ptr %138, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %139 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 - %140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) - %141 = load ptr, ptr @"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + %139 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 + %140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0) + %141 = load ptr, ptr @"[1]*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 %142 = icmp eq ptr %141, null br i1 %142, label %_llgo_35, label %_llgo_36 @@ -1143,11 +1143,11 @@ _llgo_35: ; preds = %_llgo_34 %143 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %140) %144 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 1, ptr %143) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %144) - store ptr %144, ptr @"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + store ptr %144, ptr @"[1]*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 br label %_llgo_36 _llgo_36: ; preds = %_llgo_35, %_llgo_34 - %145 = load ptr, ptr @"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8 + %145 = load ptr, ptr @"[1]*_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N", align 8 br i1 %134, label %_llgo_37, label %_llgo_38 _llgo_37: ; preds = %_llgo_36 @@ -1199,21 +1199,21 @@ _llgo_41: ; preds = %_llgo_40 %172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %167, 0 %173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 4, 1 %174 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173, i64 4, 2 - %175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174) + %175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174) %176 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %153, ptr %154, ptr %175, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %176) store ptr %176, ptr @"map[chan _llgo_int]_llgo_int", align 8 br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 - %177 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 1 }, i64 21, i64 8, i64 0, i64 0) - %178 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8 + %177 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 1 }, i64 21, i64 8, i64 0, i64 0) + %178 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.M", align 8 %179 = icmp eq ptr %178, null br i1 %179, label %_llgo_43, label %_llgo_44 _llgo_43: ; preds = %_llgo_42 call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %177) - store ptr %177, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8 + store ptr %177, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/makemap.M", align 8 br label %_llgo_44 _llgo_44: ; preds = %_llgo_43, %_llgo_42 @@ -1225,9 +1225,9 @@ _llgo_45: ; preds = %_llgo_44 br label %_llgo_46 _llgo_46: ; preds = %_llgo_45, %_llgo_44 - %181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0) - %182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0) - %183 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + %181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0) + %182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0) + %183 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 %184 = icmp eq ptr %183, null br i1 %184, label %_llgo_47, label %_llgo_48 @@ -1255,10 +1255,10 @@ _llgo_47: ; preds = %_llgo_46 %201 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %196, 0 %202 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %201, i64 4, 1 %203 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %202, i64 4, 2 - %204 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %203) + %204 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 41 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %203) %205 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %181, ptr %185, ptr %204, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %205) - store ptr %205, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8 + store ptr %205, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/makemap.N]_llgo_string", align 8 br label %_llgo_48 _llgo_48: ; preds = %_llgo_47, %_llgo_46 diff --git a/compiler/cl/_testrt/map/in.go b/cl/_testrt/map/in.go similarity index 80% rename from compiler/cl/_testrt/map/in.go rename to cl/_testrt/map/in.go index 826ba8aa..18053bfd 100644 --- a/compiler/cl/_testrt/map/in.go +++ b/cl/_testrt/map/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/compiler/cl/_testrt/map/out.ll b/cl/_testrt/map/out.ll similarity index 89% rename from compiler/cl/_testrt/map/out.ll rename to cl/_testrt/map/out.ll index 3c271056..51d95206 100644 --- a/compiler/cl/_testrt/map/out.ll +++ b/cl/_testrt/map/out.ll @@ -1,35 +1,35 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/map' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/map" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/map' +source_filename = "github.com/goplus/llgo/cl/_testrt/map" %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/map.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/map.init$guard" = global i1 false, align 1 @_llgo_int = linkonce global ptr null, align 8 @"map[_llgo_int]_llgo_int" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [7 x i8] c"topbits", align 1 @1 = private unnamed_addr constant [4 x i8] c"keys", align 1 @2 = private unnamed_addr constant [5 x i8] c"elems", align 1 @3 = private unnamed_addr constant [8 x i8] c"overflow", align 1 -@4 = private unnamed_addr constant [46 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/map", align 1 +@4 = private unnamed_addr constant [37 x i8] c"github.com/goplus/llgo/cl/_testrt/map", align 1 @5 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/map.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/map.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/map.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/map.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/map.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/map.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/map.main"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8 @@ -53,7 +53,7 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/map.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 %1 = icmp eq ptr %0, null @@ -95,7 +95,7 @@ _llgo_3: ; preds = %_llgo_2 %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %18, 0 %24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23, i64 4, 1 %25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i64 4, 2 - %26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 46 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25) + %26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 37 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25) %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %5, ptr %6, ptr %26, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %27) store ptr %27, ptr @"map[_llgo_int]_llgo_int", align 8 diff --git a/compiler/cl/_testrt/mask/in.go b/cl/_testrt/mask/in.go similarity index 100% rename from compiler/cl/_testrt/mask/in.go rename to cl/_testrt/mask/in.go diff --git a/compiler/cl/_testrt/mask/out.ll b/cl/_testrt/mask/out.ll similarity index 65% rename from compiler/cl/_testrt/mask/out.ll rename to cl/_testrt/mask/out.ll index 53e16b2e..69664fd4 100644 --- a/compiler/cl/_testrt/mask/out.ll +++ b/cl/_testrt/mask/out.ll @@ -1,65 +1,65 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/mask' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/mask" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/mask' +source_filename = "github.com/goplus/llgo/cl/_testrt/mask" -@"github.com/goplus/llgo/compiler/cl/_testrt/mask.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/mask.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/mask.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/mask.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/mask.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/mask.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/mask.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/mask.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/mask.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/mask.main"() { _llgo_0: - %0 = call i32 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask"(i8 1) + %0 = call i32 @"github.com/goplus/llgo/cl/_testrt/mask.mask"(i8 1) %1 = sext i32 %0 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl"(i64 127, i64 5) + %2 = call i64 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl"(i64 127, i64 5) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %2) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %3 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 127, i64 5) + %3 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl8"(i8 127, i64 5) %4 = sext i8 %3 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %4) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %5 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 127, i64 5) + %5 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl8u"(i8 127, i64 5) %6 = zext i8 %5 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %6) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %7 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 127, i64 16) + %7 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl8"(i8 127, i64 16) %8 = sext i8 %7 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %9 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 127, i64 16) + %9 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl8u"(i8 127, i64 16) %10 = zext i8 %9 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %10) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %11 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr"(i64 127, i64 5) + %11 = call i64 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr"(i64 127, i64 5) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %12 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 127, i64 5) + %12 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr8"(i8 127, i64 5) %13 = sext i8 %12 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %13) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %14 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8u"(i8 127, i64 5) + %14 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr8u"(i8 127, i64 5) %15 = zext i8 %14 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %15) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %16 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 127, i64 16) + %16 = call i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr8"(i8 127, i64 16) %17 = sext i8 %16 to i64 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask"(i8 %0) { +define i32 @"github.com/goplus/llgo/cl/_testrt/mask.mask"(i8 %0) { _llgo_0: %1 = sext i8 %0 to i32 %2 = shl i32 %1, 31 @@ -68,7 +68,7 @@ _llgo_0: ret i32 %4 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl"(i64 %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl"(i64 %0, i64 %1) { _llgo_0: %2 = icmp slt i64 %1, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2) @@ -78,7 +78,7 @@ _llgo_0: ret i64 %5 } -define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 %0, i64 %1) { +define i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl8"(i8 %0, i64 %1) { _llgo_0: %2 = icmp slt i64 %1, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2) @@ -89,7 +89,7 @@ _llgo_0: ret i8 %6 } -define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 %0, i64 %1) { +define i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shl8u"(i8 %0, i64 %1) { _llgo_0: %2 = icmp slt i64 %1, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2) @@ -100,7 +100,7 @@ _llgo_0: ret i8 %6 } -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr"(i64 %0, i64 %1) { +define i64 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr"(i64 %0, i64 %1) { _llgo_0: %2 = icmp slt i64 %1, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2) @@ -110,7 +110,7 @@ _llgo_0: ret i64 %5 } -define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 %0, i64 %1) { +define i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr8"(i8 %0, i64 %1) { _llgo_0: %2 = icmp slt i64 %1, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2) @@ -121,7 +121,7 @@ _llgo_0: ret i8 %6 } -define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8u"(i8 %0, i64 %1) { +define i8 @"github.com/goplus/llgo/cl/_testrt/mask.mask_shr8u"(i8 %0, i64 %1) { _llgo_0: %2 = icmp slt i64 %1, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2) diff --git a/compiler/cl/_testrt/named/in.go b/cl/_testrt/named/in.go similarity index 94% rename from compiler/cl/_testrt/named/in.go rename to cl/_testrt/named/in.go index 658cdfe7..d9b5ae2c 100644 --- a/compiler/cl/_testrt/named/in.go +++ b/cl/_testrt/named/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" type mSpanList struct { first *mspan diff --git a/cl/_testrt/named/out.ll b/cl/_testrt/named/out.ll new file mode 100644 index 00000000..be3ff8d7 --- /dev/null +++ b/cl/_testrt/named/out.ll @@ -0,0 +1,130 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/named' +source_filename = "github.com/goplus/llgo/cl/_testrt/named" + +%"github.com/goplus/llgo/cl/_testrt/named.mspan" = type { ptr, ptr, ptr, %"github.com/goplus/llgo/cl/_testrt/named.minfo", i64, { ptr, ptr } } +%"github.com/goplus/llgo/cl/_testrt/named.minfo" = type { ptr, i64 } +%"github.com/goplus/llgo/cl/_testrt/named.mSpanList" = type { ptr, ptr } + +@"github.com/goplus/llgo/cl/_testrt/named.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [19 x i8] c"%d %d %d %d %d %d\0A\00", align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/named.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/named.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/named.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/named.main"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64) + store ptr %1, ptr %0, align 8 + %2 = load ptr, ptr %0, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %2, i32 0, i32 4 + store i64 100, ptr %3, align 4 + %4 = load ptr, ptr %0, align 8 + %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64) + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %4, i32 0, i32 0 + store ptr %5, ptr %6, align 8 + %7 = load ptr, ptr %0, align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %7, i32 0, i32 0 + %9 = load ptr, ptr %8, align 8 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %9, i32 0, i32 4 + store i64 200, ptr %10, align 4 + %11 = load ptr, ptr %0, align 8 + %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) + %13 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %11, i32 0, i32 2 + store ptr %12, ptr %13, align 8 + %14 = load ptr, ptr %0, align 8 + %15 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %14, i32 0, i32 2 + %16 = load ptr, ptr %15, align 8 + %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64) + %18 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mSpanList", ptr %16, i32 0, i32 1 + store ptr %17, ptr %18, align 8 + %19 = load ptr, ptr %0, align 8 + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %19, i32 0, i32 2 + %21 = load ptr, ptr %20, align 8 + %22 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mSpanList", ptr %21, i32 0, i32 1 + %23 = load ptr, ptr %22, align 8 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %23, i32 0, i32 4 + store i64 300, ptr %24, align 4 + %25 = load ptr, ptr %0, align 8 + %26 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %25, i32 0, i32 3 + %27 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.minfo", ptr %26, i32 0, i32 1 + store i64 10, ptr %27, align 4 + %28 = load ptr, ptr %0, align 8 + %29 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %28, i32 0, i32 3 + %30 = load ptr, ptr %0, align 8 + %31 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.minfo", ptr %29, i32 0, i32 0 + store ptr %30, ptr %31, align 8 + %32 = load ptr, ptr %0, align 8 + %33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %34 = getelementptr inbounds { ptr }, ptr %33, i32 0, i32 0 + store ptr %0, ptr %34, align 8 + %35 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testrt/named.main$1", ptr undef }, ptr %33, 1 + %36 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %32, i32 0, i32 5 + store { ptr, ptr } %35, ptr %36, align 8 + %37 = load ptr, ptr %0, align 8 + %38 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %37, i32 0, i32 0 + %39 = load ptr, ptr %38, align 8 + %40 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %39, i32 0, i32 4 + %41 = load i64, ptr %40, align 4 + %42 = load ptr, ptr %0, align 8 + %43 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %42, i32 0, i32 2 + %44 = load ptr, ptr %43, align 8 + %45 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mSpanList", ptr %44, i32 0, i32 1 + %46 = load ptr, ptr %45, align 8 + %47 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %46, i32 0, i32 4 + %48 = load i64, ptr %47, align 4 + %49 = load ptr, ptr %0, align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %49, i32 0, i32 3 + %51 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.minfo", ptr %50, i32 0, i32 1 + %52 = load i64, ptr %51, align 4 + %53 = load ptr, ptr %0, align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %53, i32 0, i32 3 + %55 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.minfo", ptr %54, i32 0, i32 0 + %56 = load ptr, ptr %55, align 8 + %57 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %56, i32 0, i32 4 + %58 = load i64, ptr %57, align 4 + %59 = load ptr, ptr %0, align 8 + %60 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %59, i32 0, i32 5 + %61 = load { ptr, ptr }, ptr %60, align 8 + %62 = extractvalue { ptr, ptr } %61, 1 + %63 = extractvalue { ptr, ptr } %61, 0 + %64 = call i64 %63(ptr %62, i64 -2) + %65 = load ptr, ptr %0, align 8 + %66 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %65, i32 0, i32 3 + %67 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.minfo", ptr %66, i32 0, i32 0 + %68 = load ptr, ptr %67, align 8 + %69 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %68, i32 0, i32 5 + %70 = load { ptr, ptr }, ptr %69, align 8 + %71 = extractvalue { ptr, ptr } %70, 1 + %72 = extractvalue { ptr, ptr } %70, 0 + %73 = call i64 %72(ptr %71, i64 -3) + %74 = call i32 (ptr, ...) @printf(ptr @0, i64 %41, i64 %48, i64 %52, i64 %58, i64 %64, i64 %73) + ret void +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/named.main$1"(ptr %0, i64 %1) { +_llgo_0: + %2 = load { ptr }, ptr %0, align 8 + %3 = extractvalue { ptr } %2, 0 + %4 = load ptr, ptr %3, align 8 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/named.mspan", ptr %4, i32 0, i32 4 + %6 = load i64, ptr %5, align 4 + %7 = mul i64 %6, %1 + ret i64 %7 +} + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) + +declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/namedslice/in.go b/cl/_testrt/namedslice/in.go similarity index 100% rename from compiler/cl/_testrt/namedslice/in.go rename to cl/_testrt/namedslice/in.go diff --git a/compiler/cl/_testrt/namedslice/out.ll b/cl/_testrt/namedslice/out.ll similarity index 81% rename from compiler/cl/_testrt/namedslice/out.ll rename to cl/_testrt/namedslice/out.ll index 3a0b0ebf..a3943dbb 100644 --- a/compiler/cl/_testrt/namedslice/out.ll +++ b/cl/_testrt/namedslice/out.ll @@ -1,46 +1,46 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/namedslice' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/namedslice" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/namedslice' +source_filename = "github.com/goplus/llgo/cl/_testrt/namedslice" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [53 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/namedslice", align 1 +@"github.com/goplus/llgo/cl/_testrt/namedslice.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/namedslice.MyBytes" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [44 x i8] c"github.com/goplus/llgo/cl/_testrt/namedslice", align 1 @1 = private unnamed_addr constant [7 x i8] c"MyBytes", align 1 @_llgo_uint8 = linkonce global ptr null, align 8 @"[]_llgo_uint8" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [9 x i8] c"bad slice", align 1 @_llgo_string = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/namedslice.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/namedslice.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/namedslice.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/namedslice.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/namedslice.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0) %1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, i64 0, 1 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, i64 0, 2 - %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8 + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/namedslice.MyBytes", align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, ptr %5, align 8 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1 %8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 0 - %9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8 + %9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/namedslice.MyBytes", align 8 %10 = icmp eq ptr %8, %9 br i1 %10, label %_llgo_3, label %_llgo_4 @@ -75,15 +75,15 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/namedslice.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 53 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 }, i64 23, i64 24, i64 0, i64 0) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 44 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 }, i64 23, i64 24, i64 0, i64 0) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/namedslice.MyBytes", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/namedslice.MyBytes", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 diff --git a/compiler/cl/_testrt/nextblock/in.go b/cl/_testrt/nextblock/in.go similarity index 100% rename from compiler/cl/_testrt/nextblock/in.go rename to cl/_testrt/nextblock/in.go diff --git a/compiler/cl/_testrt/nextblock/out.ll b/cl/_testrt/nextblock/out.ll similarity index 100% rename from compiler/cl/_testrt/nextblock/out.ll rename to cl/_testrt/nextblock/out.ll diff --git a/compiler/cl/_testrt/panic/in.go b/cl/_testrt/panic/in.go similarity index 100% rename from compiler/cl/_testrt/panic/in.go rename to cl/_testrt/panic/in.go diff --git a/compiler/cl/_testrt/panic/out.ll b/cl/_testrt/panic/out.ll similarity index 71% rename from compiler/cl/_testrt/panic/out.ll rename to cl/_testrt/panic/out.ll index 2389582a..85eee88b 100644 --- a/compiler/cl/_testrt/panic/out.ll +++ b/cl/_testrt/panic/out.ll @@ -1,28 +1,28 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/panic' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/panic" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/panic' +source_filename = "github.com/goplus/llgo/cl/_testrt/panic" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/panic.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/panic.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [13 x i8] c"panic message", align 1 @_llgo_string = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/panic.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/panic.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/panic.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/panic.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/panic.main"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) @@ -33,7 +33,7 @@ _llgo_0: unreachable } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/panic.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/_testrt/qsort/in.go b/cl/_testrt/qsort/in.go similarity index 93% rename from compiler/cl/_testrt/qsort/in.go rename to cl/_testrt/qsort/in.go index 8fa4f775..4d0b7b5e 100644 --- a/compiler/cl/_testrt/qsort/in.go +++ b/cl/_testrt/qsort/in.go @@ -3,7 +3,7 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) //go:linkname qsort C.qsort diff --git a/compiler/cl/_testrt/qsort/out.ll b/cl/_testrt/qsort/out.ll similarity index 74% rename from compiler/cl/_testrt/qsort/out.ll rename to cl/_testrt/qsort/out.ll index fc1d2893..f0649acc 100644 --- a/compiler/cl/_testrt/qsort/out.ll +++ b/cl/_testrt/qsort/out.ll @@ -1,23 +1,23 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/qsort' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/qsort" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/qsort' +source_filename = "github.com/goplus/llgo/cl/_testrt/qsort" -@"github.com/goplus/llgo/compiler/cl/_testrt/qsort.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/qsort.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsort.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/qsort.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/qsort.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsort.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -31,7 +31,7 @@ _llgo_0: store i64 2, ptr %4, align 4 store i64 7, ptr %5, align 4 %6 = getelementptr inbounds i64, ptr %0, i64 0 - call void @qsort(ptr %6, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.main$1") + call void @qsort(ptr %6, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsort.main$1") %7 = load [5 x i64], ptr %0, align 4 br label %_llgo_1 @@ -55,7 +55,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.main$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsort.main$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 diff --git a/compiler/cl/_testrt/qsortfn/in.go b/cl/_testrt/qsortfn/in.go similarity index 97% rename from compiler/cl/_testrt/qsortfn/in.go rename to cl/_testrt/qsortfn/in.go index 58072352..87fd8ff5 100644 --- a/compiler/cl/_testrt/qsortfn/in.go +++ b/cl/_testrt/qsortfn/in.go @@ -3,8 +3,8 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" - q "github.com/goplus/llgo/compiler/cl/_testrt/qsortfn/qsort" + "github.com/goplus/lib/c" + q "github.com/goplus/llgo/cl/_testrt/qsortfn/qsort" ) //llgo:type C diff --git a/compiler/cl/_testrt/qsortfn/out.ll b/cl/_testrt/qsortfn/out.ll similarity index 83% rename from compiler/cl/_testrt/qsortfn/out.ll rename to cl/_testrt/qsortfn/out.ll index fbb2420b..674656af 100644 --- a/compiler/cl/_testrt/qsortfn/out.ll +++ b/cl/_testrt/qsortfn/out.ll @@ -1,7 +1,7 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/qsortfn' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/qsortfn" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/qsortfn' +source_filename = "github.com/goplus/llgo/cl/_testrt/qsortfn" -@"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/qsortfn.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [14 x i8] c"Comp => Comp\0A\00", align 1 @1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @2 = private unnamed_addr constant [12 x i8] c"fn => Comp\0A\00", align 1 @@ -23,35 +23,35 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/qsortfn" @18 = private unnamed_addr constant [22 x i8] c"Comp => qsort.Comp()\0A\00", align 1 @19 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.main"() { _llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a"() - call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1a"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1b"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2a"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2b"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3a"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3b"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4a"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4b"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5a"() + call void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5b"() ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1a"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @0) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -66,7 +66,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1a$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -90,7 +90,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1a$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -99,7 +99,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1b"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @2) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -114,7 +114,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1b$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -138,7 +138,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort1b$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -147,7 +147,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2a"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @4) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -162,7 +162,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2a$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -186,7 +186,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2a$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -195,7 +195,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2b"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @6) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -210,7 +210,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2b$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -234,7 +234,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort2b$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -243,7 +243,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3a"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @8) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -258,7 +258,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3a$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -282,7 +282,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3a$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -291,7 +291,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3b"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @10) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -306,7 +306,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3b$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -330,7 +330,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort3b$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -339,7 +339,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4a"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @12) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -354,7 +354,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4a$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -378,7 +378,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4a$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -387,7 +387,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4b"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @14) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -402,7 +402,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4b$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -426,7 +426,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort4b$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -435,7 +435,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5a"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @16) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -450,7 +450,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5a$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -474,7 +474,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5a$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 @@ -483,7 +483,7 @@ _llgo_0: ret i32 %5 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b"() { +define void @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5b"() { _llgo_0: %0 = call i32 (ptr, ...) @printf(ptr @18) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40) @@ -498,7 +498,7 @@ _llgo_0: store i64 2, ptr %5, align 4 store i64 7, ptr %6, align 4 %7 = getelementptr inbounds i64, ptr %1, i64 0 - call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b$1") + call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5b$1") %8 = load [5 x i64], ptr %1, align 4 br label %_llgo_1 @@ -522,7 +522,7 @@ _llgo_3: ; preds = %_llgo_1 ret void } -define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b$1"(ptr %0, ptr %1) { +define i32 @"github.com/goplus/llgo/cl/_testrt/qsortfn.sort5b$1"(ptr %0, ptr %1) { _llgo_0: %2 = load i64, ptr %0, align 4 %3 = load i64, ptr %1, align 4 diff --git a/compiler/cl/_testrt/qsortfn/qsort/qsort.go b/cl/_testrt/qsortfn/qsort/qsort.go similarity index 92% rename from compiler/cl/_testrt/qsortfn/qsort/qsort.go rename to cl/_testrt/qsortfn/qsort/qsort.go index 394066ce..3aed6b11 100644 --- a/compiler/cl/_testrt/qsortfn/qsort/qsort.go +++ b/cl/_testrt/qsortfn/qsort/qsort.go @@ -3,7 +3,7 @@ package qsort import ( _ "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) const ( diff --git a/compiler/cl/_testrt/result/in.go b/cl/_testrt/result/in.go similarity index 94% rename from compiler/cl/_testrt/result/in.go rename to cl/_testrt/result/in.go index 15bcb81b..60854803 100644 --- a/compiler/cl/_testrt/result/in.go +++ b/cl/_testrt/result/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func main() { diff --git a/cl/_testrt/result/out.ll b/cl/_testrt/result/out.ll new file mode 100644 index 00000000..3131c704 --- /dev/null +++ b/cl/_testrt/result/out.ll @@ -0,0 +1,96 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/result' +source_filename = "github.com/goplus/llgo/cl/_testrt/result" + +@"github.com/goplus/llgo/cl/_testrt/result.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 +@1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 +@2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 + +define { ptr, ptr } @"github.com/goplus/llgo/cl/_testrt/result.add"() { +_llgo_0: + ret { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/result.add$1", ptr null } +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/result.add$1"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +define { { ptr, ptr }, i64 } @"github.com/goplus/llgo/cl/_testrt/result.add2"() { +_llgo_0: + ret { { ptr, ptr }, i64 } { { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/result.add2$1", ptr null }, i64 1 } +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/result.add2$1"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +define void @"github.com/goplus/llgo/cl/_testrt/result.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/result.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/result.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/result.main"() { +_llgo_0: + %0 = call { ptr, ptr } @"github.com/goplus/llgo/cl/_testrt/result.main$1"() + %1 = extractvalue { ptr, ptr } %0, 1 + %2 = extractvalue { ptr, ptr } %0, 0 + %3 = call i64 %2(ptr %1, i64 100, i64 200) + %4 = call i32 (ptr, ...) @printf(ptr @0, i64 %3) + %5 = call { ptr, ptr } @"github.com/goplus/llgo/cl/_testrt/result.add"() + %6 = extractvalue { ptr, ptr } %5, 1 + %7 = extractvalue { ptr, ptr } %5, 0 + %8 = call i64 %7(ptr %6, i64 100, i64 200) + %9 = call i32 (ptr, ...) @printf(ptr @1, i64 %8) + %10 = call { { ptr, ptr }, i64 } @"github.com/goplus/llgo/cl/_testrt/result.add2"() + %11 = extractvalue { { ptr, ptr }, i64 } %10, 0 + %12 = extractvalue { { ptr, ptr }, i64 } %10, 1 + %13 = call { ptr, ptr } @"github.com/goplus/llgo/cl/_testrt/result.add"() + %14 = extractvalue { ptr, ptr } %13, 1 + %15 = extractvalue { ptr, ptr } %13, 0 + %16 = call i64 %15(ptr %14, i64 100, i64 200) + %17 = call i32 (ptr, ...) @printf(ptr @2, i64 %16, i64 %12) + ret void +} + +define { ptr, ptr } @"github.com/goplus/llgo/cl/_testrt/result.main$1"() { +_llgo_0: + ret { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/result.main$1$1", ptr null } +} + +define i64 @"github.com/goplus/llgo/cl/_testrt/result.main$1$1"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/result.add$1"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = tail call i64 @"github.com/goplus/llgo/cl/_testrt/result.add$1"(i64 %1, i64 %2) + ret i64 %3 +} + +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/result.add2$1"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = tail call i64 @"github.com/goplus/llgo/cl/_testrt/result.add2$1"(i64 %1, i64 %2) + ret i64 %3 +} + +declare i32 @printf(ptr, ...) + +define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/result.main$1$1"(ptr %0, i64 %1, i64 %2) { +_llgo_0: + %3 = tail call i64 @"github.com/goplus/llgo/cl/_testrt/result.main$1$1"(i64 %1, i64 %2) + ret i64 %3 +} diff --git a/compiler/cl/_testrt/slice2array/in.go b/cl/_testrt/slice2array/in.go similarity index 100% rename from compiler/cl/_testrt/slice2array/in.go rename to cl/_testrt/slice2array/in.go diff --git a/compiler/cl/_testrt/slice2array/out.ll b/cl/_testrt/slice2array/out.ll similarity index 88% rename from compiler/cl/_testrt/slice2array/out.ll rename to cl/_testrt/slice2array/out.ll index 31855c8f..d2160ff9 100644 --- a/compiler/cl/_testrt/slice2array/out.ll +++ b/cl/_testrt/slice2array/out.ll @@ -1,24 +1,24 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/slice2array' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/slice2array" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/slice2array' +source_filename = "github.com/goplus/llgo/cl/_testrt/slice2array" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/slice2array.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/slice2array.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/slice2array.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/slice2array.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/slice2array.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4) %1 = getelementptr inbounds i8, ptr %0, i64 0 diff --git a/compiler/cl/_testrt/slicelen/in.go b/cl/_testrt/slicelen/in.go similarity index 100% rename from compiler/cl/_testrt/slicelen/in.go rename to cl/_testrt/slicelen/in.go diff --git a/compiler/cl/_testrt/slicelen/out.ll b/cl/_testrt/slicelen/out.ll similarity index 69% rename from compiler/cl/_testrt/slicelen/out.ll rename to cl/_testrt/slicelen/out.ll index 22476c07..ed227745 100644 --- a/compiler/cl/_testrt/slicelen/out.ll +++ b/cl/_testrt/slicelen/out.ll @@ -1,25 +1,25 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/slicelen' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/slicelen" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/slicelen' +source_filename = "github.com/goplus/llgo/cl/_testrt/slicelen" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/slicelen.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [7 x i8] c"len > 0", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/slicelen.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/slicelen.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/slicelen.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/slicelen.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 0) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) diff --git a/compiler/cl/_testrt/strlen/in.go b/cl/_testrt/strlen/in.go similarity index 100% rename from compiler/cl/_testrt/strlen/in.go rename to cl/_testrt/strlen/in.go diff --git a/cl/_testrt/strlen/out.ll b/cl/_testrt/strlen/out.ll new file mode 100644 index 00000000..39381b7a --- /dev/null +++ b/cl/_testrt/strlen/out.ll @@ -0,0 +1,54 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/strlen' +source_filename = "github.com/goplus/llgo/cl/_testrt/strlen" + +%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } + +@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1 +@"github.com/goplus/llgo/cl/_testrt/strlen.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testrt/strlen.init$guard" = global i1 false, align 1 + +define ptr @"github.com/goplus/llgo/cl/_testrt/strlen._Cgo_ptr"(ptr %0) { +_llgo_0: + ret ptr %0 +} + +declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface") + +declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface") + +define void @"github.com/goplus/llgo/cl/_testrt/strlen.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.init$guard", align 1 + call void @syscall.init() + store i8 72, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i64 9), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/strlen.main"() { +_llgo_0: + %0 = call i32 @strlen(ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format") + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testrt/strlen.format", i32 %0) + ret void +} + +declare void @syscall.init() + +declare i32 @strlen(ptr) + +declare void @printf(ptr, ...) diff --git a/compiler/cl/_testrt/struct/in.go b/cl/_testrt/struct/in.go similarity index 100% rename from compiler/cl/_testrt/struct/in.go rename to cl/_testrt/struct/in.go diff --git a/cl/_testrt/struct/out.ll b/cl/_testrt/struct/out.ll new file mode 100644 index 00000000..25667c31 --- /dev/null +++ b/cl/_testrt/struct/out.ll @@ -0,0 +1,90 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/struct' +source_filename = "github.com/goplus/llgo/cl/_testrt/struct" + +%"github.com/goplus/llgo/cl/_testrt/struct.Foo" = type { i32, i1 } +%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } + +@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1 +@"github.com/goplus/llgo/cl/_testrt/struct.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testrt/struct.init$guard" = global i1 false, align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/cl/_testrt/struct.Foo" %0) { +_llgo_0: + %1 = alloca %"github.com/goplus/llgo/cl/_testrt/struct.Foo", align 8 + call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) + store %"github.com/goplus/llgo/cl/_testrt/struct.Foo" %0, ptr %1, align 4 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/struct.Foo", ptr %1, i32 0, i32 1 + %3 = load i1, ptr %2, align 1 + br i1 %3, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/struct.Foo", ptr %1, i32 0, i32 0 + %5 = load i32, ptr %4, align 4 + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i32 %5) + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/struct.(*Foo).Print"(ptr %0) { +_llgo_0: + %1 = load %"github.com/goplus/llgo/cl/_testrt/struct.Foo", ptr %0, align 4 + call void @"github.com/goplus/llgo/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/cl/_testrt/struct.Foo" %1) + ret void +} + +define ptr @"github.com/goplus/llgo/cl/_testrt/struct._Cgo_ptr"(ptr %0) { +_llgo_0: + ret ptr %0 +} + +declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface") + +declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface") + +define void @"github.com/goplus/llgo/cl/_testrt/struct.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/struct.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/struct.init$guard", align 1 + call void @syscall.init() + store i8 72, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/struct.format", i64 9), align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/struct.main"() { +_llgo_0: + %0 = alloca %"github.com/goplus/llgo/cl/_testrt/struct.Foo", align 8 + call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/struct.Foo", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/struct.Foo", ptr %0, i32 0, i32 1 + store i32 100, ptr %1, align 4 + store i1 true, ptr %2, align 1 + %3 = load %"github.com/goplus/llgo/cl/_testrt/struct.Foo", ptr %0, align 4 + call void @"github.com/goplus/llgo/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/cl/_testrt/struct.Foo" %3) + ret void +} + +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) +declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 + +declare void @printf(ptr, ...) + +declare void @syscall.init() + +attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/compiler/cl/_testrt/structsize/in.go b/cl/_testrt/structsize/in.go similarity index 85% rename from compiler/cl/_testrt/structsize/in.go rename to cl/_testrt/structsize/in.go index 0e83f67c..e461f3bd 100644 --- a/compiler/cl/_testrt/structsize/in.go +++ b/cl/_testrt/structsize/in.go @@ -3,7 +3,7 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) type Foo struct { diff --git a/cl/_testrt/structsize/out.ll b/cl/_testrt/structsize/out.ll new file mode 100644 index 00000000..80f9facc --- /dev/null +++ b/cl/_testrt/structsize/out.ll @@ -0,0 +1,26 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/structsize' +source_filename = "github.com/goplus/llgo/cl/_testrt/structsize" + +@"github.com/goplus/llgo/cl/_testrt/structsize.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/structsize.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/structsize.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/structsize.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/structsize.main"() { +_llgo_0: + %0 = call i32 (ptr, ...) @printf(ptr @0, i64 14) + ret void +} + +declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/sum/in.go b/cl/_testrt/sum/in.go similarity index 86% rename from compiler/cl/_testrt/sum/in.go rename to cl/_testrt/sum/in.go index c3536fa8..b42f29d8 100644 --- a/compiler/cl/_testrt/sum/in.go +++ b/cl/_testrt/sum/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func sum(args ...int) (ret int) { diff --git a/compiler/cl/_testrt/sum/out.ll b/cl/_testrt/sum/out.ll similarity index 74% rename from compiler/cl/_testrt/sum/out.ll rename to cl/_testrt/sum/out.ll index 554609cc..66cf2dd8 100644 --- a/compiler/cl/_testrt/sum/out.ll +++ b/cl/_testrt/sum/out.ll @@ -1,25 +1,25 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/sum' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/sum" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/sum' +source_filename = "github.com/goplus/llgo/cl/_testrt/sum" %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/sum.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/sum.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/sum.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/sum.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/sum.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/sum.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/sum.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/sum.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/sum.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/sum.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %1 = getelementptr inbounds i64, ptr %0, i64 0 @@ -33,12 +33,12 @@ _llgo_0: %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 4, 1 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 4, 2 - %8 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/sum.sum"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7) + %8 = call i64 @"github.com/goplus/llgo/cl/_testrt/sum.sum"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7) %9 = call i32 (ptr, ...) @printf(ptr @0, i64 %8) ret void } -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/sum.sum"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { +define i64 @"github.com/goplus/llgo/cl/_testrt/sum.sum"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1 br label %_llgo_1 diff --git a/compiler/cl/_testrt/tpabi/in.go b/cl/_testrt/tpabi/in.go similarity index 93% rename from compiler/cl/_testrt/tpabi/in.go rename to cl/_testrt/tpabi/in.go index aa15799b..a0f6b55d 100644 --- a/compiler/cl/_testrt/tpabi/in.go +++ b/cl/_testrt/tpabi/in.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" type T[M, N any] struct { m M diff --git a/compiler/cl/_testrt/tpabi/out.ll b/cl/_testrt/tpabi/out.ll similarity index 76% rename from compiler/cl/_testrt/tpabi/out.ll rename to cl/_testrt/tpabi/out.ll index d34d0cc4..4975be4a 100644 --- a/compiler/cl/_testrt/tpabi/out.ll +++ b/cl/_testrt/tpabi/out.ll @@ -1,7 +1,7 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpabi' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpabi" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/tpabi' +source_filename = "github.com/goplus/llgo/cl/_testrt/tpabi" -%"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i64 } +%"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i64 } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } @@ -10,69 +10,69 @@ source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpabi" %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/tpabi.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [1 x i8] c"a", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8 -@1 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/tpabi", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8 +@1 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testrt/tpabi", align 1 @2 = private unnamed_addr constant [13 x i8] c"T[string,int]", align 1 @_llgo_string = linkonce global ptr null, align 8 @_llgo_int = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [1 x i8] c"m", align 1 @4 = private unnamed_addr constant [1 x i8] c"n", align 1 @5 = private unnamed_addr constant [4 x i8] c"Demo", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [4 x i8] c"Info", align 1 -@7 = private unnamed_addr constant [100 x i8] c"type assertion interface{} -> github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string, int] failed", align 1 +@7 = private unnamed_addr constant [91 x i8] c"type assertion interface{} -> github.com/goplus/llgo/cl/_testrt/tpabi.T[string, int] failed", align 1 @8 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8 @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs" = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpabi.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/tpabi.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpabi.main"() { _llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %0 = alloca %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 call void @llvm.memset(ptr %0, i8 0, i64 24, i1 false) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 0 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 1 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 1 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 1 }, ptr %1, align 8 store i64 1, ptr %2, align 4 - %3 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, align 8 - %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %3 = load %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %0, align 8 + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - store %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %3, ptr %5, align 8 + store %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" %3, ptr %5, align 8 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1 %8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 0 - %9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 %10 = icmp eq ptr %8, %9 br i1 %10, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 %11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 1 - %12 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %11, align 8 - %13 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %12, 0 + %12 = load %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %11, align 8 + %13 = extractvalue %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" %12, 0 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %13) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %14, i32 0, i32 0 - %16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %14, i32 0, i32 1 + %15 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %14, i32 0, i32 0 + %16 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %14, i32 0, i32 1 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 }, ptr %15, align 8 store i64 100, ptr %16, align 4 - %17 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %17 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 %18 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %19 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8 %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %17) @@ -107,21 +107,21 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %38 = load ptr, ptr @_llgo_string, align 8 %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 100 }, ptr %39, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 91 }, ptr %39, align 8 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41) unreachable } -define linkonce void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int].Info"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %0) { +define linkonce void @"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int].Info"(%"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 call void @llvm.memset(ptr %1, i8 0, i64 24, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %1, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, align 8 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %1, i32 0, i32 1 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %1, i32 0, i32 1 %5 = load i64, ptr %4, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %3) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -130,11 +130,11 @@ _llgo_0: ret void } -define linkonce void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Demo"(ptr %0) { +define linkonce void @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Demo"(ptr %0) { _llgo_0: - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 0 + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 0 %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 1 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 1 %4 = load i64, ptr %3, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %2) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -143,25 +143,25 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Info"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, align 8 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int].Info"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %1) + %1 = load %"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", ptr %0, align 8 + call void @"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int].Info"(%"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" %1) ret void } ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpabi.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -199,9 +199,9 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %15, 0 %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 2, 1 %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, i64 2, 2 - %21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20) - store ptr %21, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8 - %22 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8 + %21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20) + store ptr %21, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8 + %22 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8 br i1 %2, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 @@ -210,8 +210,8 @@ _llgo_7: ; preds = %_llgo_6 br i1 %24, label %_llgo_9, label %_llgo_10 _llgo_8: ; preds = %_llgo_10, %_llgo_6 - %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2) - %26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2) + %26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 %27 = icmp eq ptr %26, null br i1 %27, label %_llgo_11, label %_llgo_12 @@ -232,15 +232,15 @@ _llgo_9: ; preds = %_llgo_7 _llgo_10: ; preds = %_llgo_9, %_llgo_7 %37 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %37, 1 - %39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Demo", 2 - %40 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %39, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Demo", 3 + %39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Demo", 2 + %40 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %39, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Demo", 3 %41 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %42 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %41, 1 - %43 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %42, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info", 2 - %44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %43, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info", 3 + %43 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %42, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Info", 2 + %44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %43, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Info", 3 %45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %41, 1 - %46 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %45, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info", 2 - %47 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %46, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int].Info", 3 + %46 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %45, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.(*T[string,int]).Info", 2 + %47 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %46, ptr @"github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int].Info", 3 %48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %49 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %48, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %47, ptr %49, align 8 @@ -261,7 +261,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_7 _llgo_11: ; preds = %_llgo_8 %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %25) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %59) - store ptr %59, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8 + store ptr %59, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_8 @@ -278,7 +278,7 @@ _llgo_13: ; preds = %_llgo_12 %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %64, 0 %67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 1, 1 %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 1, 2 - %69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68) + %69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68) store ptr %69, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8 br label %_llgo_14 diff --git a/compiler/cl/_testrt/tpfunc/in.go b/cl/_testrt/tpfunc/in.go similarity index 100% rename from compiler/cl/_testrt/tpfunc/in.go rename to cl/_testrt/tpfunc/in.go diff --git a/compiler/cl/_testrt/tpfunc/out.ll b/cl/_testrt/tpfunc/out.ll similarity index 62% rename from compiler/cl/_testrt/tpfunc/out.ll rename to cl/_testrt/tpfunc/out.ll index 7a86d8a0..9d7213a5 100644 --- a/compiler/cl/_testrt/tpfunc/out.ll +++ b/cl/_testrt/tpfunc/out.ll @@ -1,22 +1,22 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpfunc' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpfunc" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/tpfunc' +source_filename = "github.com/goplus/llgo/cl/_testrt/tpfunc" -@"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/tpfunc.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpfunc.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/tpfunc.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/tpfunc.init$guard", align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpfunc.main"() { _llgo_0: call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 16) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -27,7 +27,7 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$1"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/tpfunc.main$1"(ptr %0) { _llgo_0: %1 = load i64, ptr %0, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1) @@ -35,7 +35,7 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$2"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/tpfunc.main$2"(ptr %0) { _llgo_0: %1 = load i64, ptr %0, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1) @@ -43,7 +43,7 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$3"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/tpfunc.main$3"(ptr %0) { _llgo_0: %1 = load i64, ptr %0, align 4 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1) @@ -51,9 +51,9 @@ _llgo_0: ret void } -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$1"(ptr %0, ptr %1) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/tpfunc.main$1"(ptr %0, ptr %1) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$1"(ptr %1) + tail call void @"github.com/goplus/llgo/cl/_testrt/tpfunc.main$1"(ptr %1) ret void } diff --git a/compiler/cl/_testrt/tpmap/in.go b/cl/_testrt/tpmap/in.go similarity index 100% rename from compiler/cl/_testrt/tpmap/in.go rename to cl/_testrt/tpmap/in.go diff --git a/compiler/cl/_testrt/tpmap/out.ll b/cl/_testrt/tpmap/out.ll similarity index 74% rename from compiler/cl/_testrt/tpmap/out.ll rename to cl/_testrt/tpmap/out.ll index 137b165a..bbc6377b 100644 --- a/compiler/cl/_testrt/tpmap/out.ll +++ b/cl/_testrt/tpmap/out.ll @@ -1,74 +1,74 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpmap' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpmap" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/tpmap' +source_filename = "github.com/goplus/llgo/cl/_testrt/tpmap" -%"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" = type { i64, %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2" = type { i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.eface" } +%"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey" = type { i64, %"github.com/goplus/llgo/cl/_testrt/tpmap.T2", %"github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]", ptr, i64 } +%"github.com/goplus/llgo/cl/_testrt/tpmap.T2" = type { i64 } +%"github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.eface" } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init$guard" = global i1 false, align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" = linkonce global ptr null, align 8 -@0 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/tpmap", align 1 +@"github.com/goplus/llgo/cl/_testrt/tpmap.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testrt/tpmap", align 1 @1 = private unnamed_addr constant [8 x i8] c"cacheKey", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T1" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [2 x i8] c"T1", align 1 @_llgo_int = linkonce global ptr null, align 8 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T2" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [2 x i8] c"T2", align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [1 x i8] c"v", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]" = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [7 x i8] c"T3[any]", align 1 @_llgo_any = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo" = linkonce global ptr null, align 8 @"*_llgo_int" = linkonce global ptr null, align 8 @_llgo_uintptr = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$H1D8cXR8QUFS3qIktzfQn9cRVh-lNVxvR-59uCOVwMs" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmap.struct$phCK-T684g3enhknCOfRlq7bWO8q6jPkTysM4zTiUJ8" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [2 x i8] c"t1", align 1 @7 = private unnamed_addr constant [2 x i8] c"t2", align 1 @8 = private unnamed_addr constant [2 x i8] c"t3", align 1 @9 = private unnamed_addr constant [2 x i8] c"t4", align 1 @10 = private unnamed_addr constant [2 x i8] c"t5", align 1 @_llgo_string = linkonce global ptr null, align 8 -@"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string" = linkonce global ptr null, align 8 +@"map[_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey]_llgo_string" = linkonce global ptr null, align 8 @11 = private unnamed_addr constant [7 x i8] c"topbits", align 1 @12 = private unnamed_addr constant [4 x i8] c"keys", align 1 @13 = private unnamed_addr constant [5 x i8] c"elems", align 1 @14 = private unnamed_addr constant [8 x i8] c"overflow", align 1 @15 = private unnamed_addr constant [5 x i8] c"world", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpmap.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/tpmap.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpmap.main"() { _llgo_0: - %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8 + %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", align 8 %1 = load ptr, ptr @_llgo_string, align 8 - %2 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 + %2 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %2, i64 0) - %4 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8 + %4 = alloca %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", align 8 call void @llvm.memset(ptr %4, i8 0, i64 48, i1 false) - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 0 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 1 - %7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", ptr %6, i32 0, i32 0 - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 2 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", ptr %8, i32 0, i32 0 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 3 - %11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 4 + %5 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 0 + %6 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 1 + %7 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.T2", ptr %6, i32 0, i32 0 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 2 + %9 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]", ptr %8, i32 0, i32 0 + %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 3 + %11 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 4 store i64 0, ptr %5, align 4 store i64 0, ptr %7, align 4 %12 = load ptr, ptr @_llgo_int, align 8 @@ -77,21 +77,21 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %9, align 8 store ptr null, ptr %10, align 8 store i64 0, ptr %11, align 4 - %15 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, align 8 - %16 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 + %15 = load %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %4, align 8 + %16 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - store %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" %15, ptr %17, align 8 + store %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey" %15, ptr %17, align 8 %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %16, ptr %3, ptr %17) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 5 }, ptr %18, align 8 - %19 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8 + %19 = alloca %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", align 8 call void @llvm.memset(ptr %19, i8 0, i64 48, i1 false) - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 0 - %21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 1 - %22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", ptr %21, i32 0, i32 0 - %23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 2 - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", ptr %23, i32 0, i32 0 - %25 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 3 - %26 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 4 + %20 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 0 + %21 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 1 + %22 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.T2", ptr %21, i32 0, i32 0 + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 2 + %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]", ptr %23, i32 0, i32 0 + %25 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 3 + %26 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 4 store i64 0, ptr %20, align 4 store i64 0, ptr %22, align 4 %27 = load ptr, ptr @_llgo_int, align 8 @@ -100,10 +100,10 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr %24, align 8 store ptr null, ptr %25, align 8 store i64 0, ptr %26, align 4 - %30 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, align 8 - %31 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 + %30 = load %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", ptr %19, align 8 + %31 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - store %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" %30, ptr %32, align 8 + store %"github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey" %30, ptr %32, align 8 %33 = call { ptr, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess2"(ptr %31, ptr %3, ptr %32) %34 = extractvalue { ptr, i1 } %33, 0 %35 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %34, align 8 @@ -119,17 +119,17 @@ _llgo_0: ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpmap.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0) - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8 - %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0) - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0) + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey", align 8 + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0) + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T1", align 8 %3 = icmp eq ptr %2, null br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %1, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1", align 8 + store ptr %1, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T1", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -151,14 +151,14 @@ _llgo_5: ; preds = %_llgo_4 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1", align 8 - %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0) - %10 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", align 8 + %8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T1", align 8 + %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0) + %10 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T2", align 8 %11 = icmp eq ptr %10, null br i1 %11, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - store ptr %9, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", align 8 + store ptr %9, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T2", align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 @@ -170,9 +170,9 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %14, 0 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 1 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 1, 2 - %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18) - store ptr %19, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 - %20 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18) + store ptr %19, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %20 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 br i1 %11, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 @@ -180,14 +180,14 @@ _llgo_9: ; preds = %_llgo_8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %21 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", align 8 - %22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0) - %23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", align 8 + %21 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T2", align 8 + %22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0) + %23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]", align 8 %24 = icmp eq ptr %23, null br i1 %24, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - store ptr %22, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", align 8 + store ptr %22, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 @@ -200,7 +200,7 @@ _llgo_13: ; preds = %_llgo_12 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %27, 0 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28, i64 0, 1 %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 0, 2 - %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30) + %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30) store ptr %31, ptr @_llgo_any, align 8 br label %_llgo_14 @@ -210,7 +210,7 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12 %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %33, 0 %35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 0, 1 %36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, i64 0, 2 - %37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36) + %37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36) %38 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, ptr %37, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) %40 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %39, i64 0 @@ -218,9 +218,9 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %39, 0 %42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 1, 1 %43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42, i64 1, 2 - %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43) - store ptr %44, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8 - %45 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8 + %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43) + store ptr %44, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8 + %45 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8 br i1 %24, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 @@ -228,7 +228,7 @@ _llgo_15: ; preds = %_llgo_14 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %46 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", align 8 + %46 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.T3[any]", align 8 %47 = load ptr, ptr @"*_llgo_int", align 8 %48 = icmp eq ptr %47, null br i1 %48, label %_llgo_17, label %_llgo_18 @@ -253,9 +253,9 @@ _llgo_19: ; preds = %_llgo_18 _llgo_20: ; preds = %_llgo_19, %_llgo_18 %55 = load ptr, ptr @_llgo_uintptr, align 8 - %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0) - %57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0) - %58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0) + %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0) + %57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0) + %58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0) %59 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 }, ptr %56, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %60 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 2 }, ptr %57, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %61 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 2 }, ptr %58, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) @@ -278,9 +278,9 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %67, 0 %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 5, 1 %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 5, 2 - %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75) - store ptr %76, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$H1D8cXR8QUFS3qIktzfQn9cRVh-lNVxvR-59uCOVwMs", align 8 - %77 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$H1D8cXR8QUFS3qIktzfQn9cRVh-lNVxvR-59uCOVwMs", align 8 + %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75) + store ptr %76, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.struct$phCK-T684g3enhknCOfRlq7bWO8q6jPkTysM4zTiUJ8", align 8 + %77 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmap.struct$phCK-T684g3enhknCOfRlq7bWO8q6jPkTysM4zTiUJ8", align 8 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %77, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer) %78 = load ptr, ptr @_llgo_string, align 8 %79 = icmp eq ptr %78, null @@ -292,8 +292,8 @@ _llgo_21: ; preds = %_llgo_20 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0) - %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0) + %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0) + %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0) %83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) %84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) %85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %84) @@ -317,10 +317,10 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20 %99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %94, 0 %100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %99, i64 4, 1 %101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %100, i64 4, 2 - %102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 528, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101) + %102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 39 }, i64 528, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101) %103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %81, ptr %83, ptr %102, i64 24) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %103) - store ptr %103, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 + store ptr %103, ptr @"map[_llgo_github.com/goplus/llgo/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8 ret void } diff --git a/compiler/cl/_testrt/tpmethod/in.go b/cl/_testrt/tpmethod/in.go similarity index 100% rename from compiler/cl/_testrt/tpmethod/in.go rename to cl/_testrt/tpmethod/in.go diff --git a/compiler/cl/_testrt/tpmethod/out.ll b/cl/_testrt/tpmethod/out.ll similarity index 73% rename from compiler/cl/_testrt/tpmethod/out.ll rename to cl/_testrt/tpmethod/out.ll index 5d116edd..6d0e9762 100644 --- a/compiler/cl/_testrt/tpmethod/out.ll +++ b/cl/_testrt/tpmethod/out.ll @@ -1,80 +1,80 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpmethod' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpmethod" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/tpmethod' +source_filename = "github.com/goplus/llgo/cl/_testrt/tpmethod" %"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } -%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]" = type { { ptr, ptr } } +%"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } +%"github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]" = type { { ptr, ptr } } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/tpmethod.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [7 x i8] c"foo.txt", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8 -@1 = private unnamed_addr constant [51 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod", align 1 -@2 = private unnamed_addr constant [72 x i8] c"future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8 +@1 = private unnamed_addr constant [42 x i8] c"github.com/goplus/llgo/cl/_testrt/tpmethod", align 1 +@2 = private unnamed_addr constant [63 x i8] c"future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [12 x i8] c"Tuple[error]", align 1 @_llgo_error = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [5 x i8] c"Error", align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [1 x i8] c"v", align 1 @7 = private unnamed_addr constant [3 x i8] c"Get", align 1 @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null, align 8 -@"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0" = linkonce global ptr null, align 8 +@"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo" = linkonce global ptr null, align 8 @_llgo_Pointer = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8" = linkonce global ptr null, align 8 @8 = private unnamed_addr constant [2 x i8] c"$f", align 1 @9 = private unnamed_addr constant [5 x i8] c"$data", align 1 -@"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$h0x5MUrZjI2t93KW7G5Ookzv6qIV0lh7-bP4KCXTtD4" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$sZkgOwzwSVW5_7o2czBO4vd0Y6GnzBmlznPz4599nqg" = linkonce global ptr null, align 8 +@"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$RKfcSKegPcHdzhxU0W5IivepgA09rDfPw-OLCUsxWOs" = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$kt0sK2vUcLNEVLy1xxIBee3YiHDiDSmGrh1CrSDZOYY" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [2 x i8] c"fn", align 1 @11 = private unnamed_addr constant [4 x i8] c"Then", align 1 -@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8 -@"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8 +@"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos" = linkonce global ptr null, align 8 -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: - %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Async[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1", ptr null }) + %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.Async[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile$1", ptr null }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1 } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1"({ ptr, ptr } %0) { +define void @"github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile$1"({ ptr, ptr } %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %1, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", ptr %1, i32 0, i32 0 store %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, ptr %2, align 8 - %3 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %1, align 8 + %3 = load %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", ptr %1, align 8 %4 = extractvalue { ptr, ptr } %0, 1 %5 = extractvalue { ptr, ptr } %0, 0 - call void %5(ptr %4, %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %3) + call void %5(ptr %4, %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %3) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpmethod.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/tpmethod.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpmethod.main"() { _llgo_0: - %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 7 }) + %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 7 }) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) %2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 0 %3 = getelementptr ptr, ptr %2, i64 3 @@ -83,38 +83,38 @@ _llgo_0: %6 = insertvalue { ptr, ptr } %5, ptr %1, 1 %7 = extractvalue { ptr, ptr } %6, 1 %8 = extractvalue { ptr, ptr } %6, 0 - call void %8(ptr %7, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1", ptr null }) + call void %8(ptr %7, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/tpmethod.main$1", ptr null }) ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0) { +define void @"github.com/goplus/llgo/cl/_testrt/tpmethod.main$1"(%"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %0) { _llgo_0: - %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0) + %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %0) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void } -define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0) { +define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %0) { _llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 + %1 = alloca %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0, ptr %1, align 8 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %1, i32 0, i32 0 + store %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %0, ptr %1, align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", ptr %1, i32 0, i32 0 %3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8 ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3 } -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get"(ptr %0) { +define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*Tuple[error]).Get"(ptr %0) { _llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %0, align 8 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %1) + %1 = load %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", ptr %0, align 8 + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %1) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2 } -define linkonce void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]).Then"(ptr %0, { ptr, ptr } %1) { +define linkonce void @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]).Then"(ptr %0, { ptr, ptr } %1) { _llgo_0: - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", ptr %0, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", ptr %0, i32 0, i32 0 %3 = load { ptr, ptr }, ptr %2, align 8 %4 = extractvalue { ptr, ptr } %3, 1 %5 = extractvalue { ptr, ptr } %3, 0 @@ -122,26 +122,26 @@ _llgo_0: ret void } -define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Async[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]"({ ptr, ptr } %0) { +define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.Async[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]"({ ptr, ptr } %0) { _llgo_0: %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", ptr %1, i32 0, i32 0 + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", ptr %1, i32 0, i32 0 store { ptr, ptr } %0, ptr %2, align 8 - %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8 - %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8 - %5 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8 - %6 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 - %7 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8 - %8 = load ptr, ptr @"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 + %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 + %5 = load ptr, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 + %6 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 + %7 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 + %8 = load ptr, ptr @"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos", align 8 %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %8, ptr %4) %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %9, 0 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %10, ptr %1, 1 ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11 } -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1"(ptr %0, { ptr, ptr } %1) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile$1"(ptr %0, { ptr, ptr } %1) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1"({ ptr, ptr } %1) + tail call void @"github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile$1"({ ptr, ptr } %1) ret void } @@ -150,9 +150,9 @@ declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1"(ptr %0, %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %1) { +define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/tpmethod.main$1"(ptr %0, %"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %1) { _llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %1) + tail call void @"github.com/goplus/llgo/cl/_testrt/tpmethod.main$1"(%"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]" %1) ret void } @@ -162,17 +162,17 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) -define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/tpmethod.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 72 }, i64 25, i64 24, i64 0, i64 1) - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8 - %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 12 }, i64 25, i64 16, i64 1, i64 1) - %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 63 }, i64 25, i64 24, i64 0, i64 1) + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 12 }, i64 25, i64 16, i64 1, i64 1) + %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 %3 = icmp eq ptr %2, null br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %1, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 + store ptr %1, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -243,9 +243,9 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 %36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %34, 0 %37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 1, 1 %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, i64 1, 2 - %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38) - store ptr %39, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8 - %40 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8 + %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38) + store ptr %39, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8 + %40 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8 br i1 %3, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 @@ -255,9 +255,9 @@ _llgo_11: ; preds = %_llgo_10 br i1 %43, label %_llgo_13, label %_llgo_14 _llgo_12: ; preds = %_llgo_14, %_llgo_10 - %44 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 - %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 - %46 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8 + %44 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 + %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 + %46 = load ptr, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 %47 = icmp eq ptr %46, null br i1 %47, label %_llgo_15, label %_llgo_16 @@ -280,11 +280,11 @@ _llgo_13: ; preds = %_llgo_11 _llgo_14: ; preds = %_llgo_13, %_llgo_11 %58 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 %59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1 - %60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get", 2 - %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get", 3 + %60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*Tuple[error]).Get", 2 + %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*Tuple[error]).Get", 3 %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1 - %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get", 2 - %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get", 3 + %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*Tuple[error]).Get", 2 + %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error].Get", 3 %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %66 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %65, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %64, ptr %66, align 8 @@ -313,11 +313,11 @@ _llgo_15: ; preds = %_llgo_12 %83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %82, i64 0, 2 %84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %83, i1 false) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %84) - store ptr %84, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8 + store ptr %84, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_12 - %85 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8 + %85 = load ptr, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 %86 = load ptr, ptr @_llgo_Pointer, align 8 %87 = icmp eq ptr %86, null br i1 %87, label %_llgo_17, label %_llgo_18 @@ -330,7 +330,7 @@ _llgo_17: ; preds = %_llgo_16 _llgo_18: ; preds = %_llgo_17, %_llgo_16 %89 = load ptr, ptr @_llgo_Pointer, align 8 - %90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8 + %90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]", align 8 %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %92 = getelementptr ptr, ptr %91, i64 0 store ptr %90, ptr %92, align 8 @@ -353,11 +353,11 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 %107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %104, 0 %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %107, i64 2, 1 %109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108, i64 2, 2 - %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %109) - store ptr %110, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 - %111 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 - %112 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 - %113 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8 + %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %109) + store ptr %110, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 + %111 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 + %112 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 + %113 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 %114 = icmp eq ptr %113, null br i1 %114, label %_llgo_19, label %_llgo_20 @@ -374,12 +374,12 @@ _llgo_19: ; preds = %_llgo_18 %123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, i64 0, 2 %124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %119, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123, i1 false) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %124) - store ptr %124, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8 + store ptr %124, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %125 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8 - %126 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 + %125 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 + %126 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 %127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %128 = getelementptr ptr, ptr %127, i64 0 store ptr %126, ptr %128, align 8 @@ -402,10 +402,10 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %140, 0 %144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, i64 2, 1 %145 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144, i64 2, 2 - %146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %145) - store ptr %146, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$h0x5MUrZjI2t93KW7G5Ookzv6qIV0lh7-bP4KCXTtD4", align 8 - %147 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$h0x5MUrZjI2t93KW7G5Ookzv6qIV0lh7-bP4KCXTtD4", align 8 - %148 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 + %146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %145) + store ptr %146, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$RKfcSKegPcHdzhxU0W5IivepgA09rDfPw-OLCUsxWOs", align 8 + %147 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$RKfcSKegPcHdzhxU0W5IivepgA09rDfPw-OLCUsxWOs", align 8 + %148 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 %149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) %150 = getelementptr ptr, ptr %149, i64 0 store ptr %148, ptr %150, align 8 @@ -428,7 +428,7 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %165 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %162, 0 %166 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %165, i64 2, 1 %167 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %166, i64 2, 2 - %168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %167) + %168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %167) %169 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 2 }, ptr %168, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %170 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) %171 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %170, i64 0 @@ -436,15 +436,15 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %170, 0 %173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 1, 1 %174 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173, i64 1, 2 - %175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174) - store ptr %175, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$sZkgOwzwSVW5_7o2czBO4vd0Y6GnzBmlznPz4599nqg", align 8 - %176 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$sZkgOwzwSVW5_7o2czBO4vd0Y6GnzBmlznPz4599nqg", align 8 - %177 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8 - %178 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8 - %179 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8 + %175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174) + store ptr %175, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$kt0sK2vUcLNEVLy1xxIBee3YiHDiDSmGrh1CrSDZOYY", align 8 + %176 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$kt0sK2vUcLNEVLy1xxIBee3YiHDiDSmGrh1CrSDZOYY", align 8 + %177 = load ptr, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 + %178 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 + %179 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 %180 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %179, 1 - %181 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %180, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]).Then", 2 - %182 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %181, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]).Then", 3 + %181 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %180, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]).Then", 2 + %182 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %181, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]).Then", 3 %183 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) %184 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %183, i64 0 store %"github.com/goplus/llgo/runtime/abi.Method" %182, ptr %184, align 8 @@ -452,12 +452,12 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %186 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %185, i64 1, 1 %187 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %186, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %176, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %187) - %188 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 72 }, i64 25, i64 24, i64 0, i64 1) + %188 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 63 }, i64 25, i64 24, i64 0, i64 1) %189 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %188) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %189) - store ptr %189, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8 - %190 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8 - %191 = load ptr, ptr @"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0", align 8 + store ptr %189, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 + %190 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 + %191 = load ptr, ptr @"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos", align 8 %192 = icmp eq ptr %191, null br i1 %192, label %_llgo_21, label %_llgo_22 @@ -469,8 +469,8 @@ _llgo_21: ; preds = %_llgo_20 %196 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %194, 0 %197 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %196, i64 1, 1 %198 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %197, i64 1, 2 - %199 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %198) - store ptr %199, ptr @"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0", align 8 + %199 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %198) + store ptr %199, ptr @"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 diff --git a/compiler/cl/_testrt/typalias/in.go b/cl/_testrt/typalias/in.go similarity index 100% rename from compiler/cl/_testrt/typalias/in.go rename to cl/_testrt/typalias/in.go diff --git a/compiler/cl/_testrt/typalias/out.ll b/cl/_testrt/typalias/out.ll similarity index 54% rename from compiler/cl/_testrt/typalias/out.ll rename to cl/_testrt/typalias/out.ll index 77bdb859..5ce7a117 100644 --- a/compiler/cl/_testrt/typalias/out.ll +++ b/cl/_testrt/typalias/out.ll @@ -1,13 +1,13 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/typalias' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/typalias" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/typalias' +source_filename = "github.com/goplus/llgo/cl/_testrt/typalias" %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } @"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/typalias.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/typalias.format" = global [10 x i8] zeroinitializer, align 1 +@"github.com/goplus/llgo/cl/_testrt/typalias.init$guard" = global i1 false, align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.Print"(ptr %0) { +define void @"github.com/goplus/llgo/cl/_testrt/typalias.Print"(ptr %0) { _llgo_0: %1 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 1 %2 = load i1, ptr %1, align 1 @@ -16,14 +16,14 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %3 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 0 %4 = load i32, ptr %3, align 4 - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i32 %4) + call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i32 %4) br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias._Cgo_ptr"(ptr %0) { +define ptr @"github.com/goplus/llgo/cl/_testrt/typalias._Cgo_ptr"(ptr %0) { _llgo_0: ret ptr %0 } @@ -32,38 +32,38 @@ declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.e declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface") -define void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/typalias.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.init$guard", align 1 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.init$guard", align 1 call void @syscall.init() - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 9), align 1 + store i8 72, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", align 1 + store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 1), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 2), align 1 + store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 3), align 1 + store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 4), align 1 + store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 5), align 1 + store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 6), align 1 + store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 7), align 1 + store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 8), align 1 + store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/cl/_testrt/typalias.format", i64 9), align 1 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/typalias.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) %1 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 0 %2 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 1 store i32 100, ptr %1, align 4 store i1 true, ptr %2, align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.Print"(ptr %0) + call void @"github.com/goplus/llgo/cl/_testrt/typalias.Print"(ptr %0) ret void } diff --git a/compiler/cl/_testrt/typed/in.go b/cl/_testrt/typed/in.go similarity index 100% rename from compiler/cl/_testrt/typed/in.go rename to cl/_testrt/typed/in.go diff --git a/compiler/cl/_testrt/typed/out.ll b/cl/_testrt/typed/out.ll similarity index 84% rename from compiler/cl/_testrt/typed/out.ll rename to cl/_testrt/typed/out.ll index 9012db20..14eca130 100644 --- a/compiler/cl/_testrt/typed/out.ll +++ b/cl/_testrt/typed/out.ll @@ -1,45 +1,45 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/typed' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/typed" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/typed' +source_filename = "github.com/goplus/llgo/cl/_testrt/typed" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/typed.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/typed.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T" = linkonce global ptr null, align 8 -@1 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/typed", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/typed.T" = linkonce global ptr null, align 8 +@1 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/_testrt/typed", align 1 @2 = private unnamed_addr constant [1 x i8] c"T", align 1 @_llgo_string = linkonce global ptr null, align 8 -@3 = private unnamed_addr constant [79 x i8] c"type assertion any -> github.com/goplus/llgo/compiler/cl/_testrt/typed.T failed", align 1 -@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A" = linkonce global ptr null, align 8 +@3 = private unnamed_addr constant [70 x i8] c"type assertion any -> github.com/goplus/llgo/cl/_testrt/typed.T failed", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testrt/typed.A" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [1 x i8] c"A", align 1 @_llgo_int = linkonce global ptr null, align 8 @"[2]_llgo_int" = linkonce global ptr null, align 8 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/typed.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/typed.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typed.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/typed.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typed.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/typed.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/typed.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/typed.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/typed.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/typed.main"() { _llgo_0: - %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8 + %0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.T", align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %1, align 8 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1 %4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, 0 - %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8 + %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.T", align 8 %6 = icmp eq ptr %4, %5 br i1 %6, label %_llgo_1, label %_llgo_2 @@ -56,7 +56,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %12 = load ptr, ptr @_llgo_string, align 8 %13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 79 }, ptr %13, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 70 }, ptr %13, align 8 %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0 %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %13, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %15) @@ -87,7 +87,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 store i64 1, ptr %24, align 4 store i64 2, ptr %25, align 4 %26 = load [2 x i64], ptr %23, align 4 - %27 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8 + %27 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.A", align 8 %28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store [2 x i64] %26, ptr %28, align 4 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %27, 0 @@ -95,7 +95,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 %31 = alloca [2 x i64], align 8 call void @llvm.memset(ptr %31, i8 0, i64 16, i1 false) %32 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, 0 - %33 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8 + %33 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.A", align 8 %34 = icmp eq ptr %32, %33 br i1 %34, label %_llgo_6, label %_llgo_7 @@ -127,15 +127,15 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/typed.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/typed.init$after"() { _llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, i64 24, i64 16, i64 0, i64 0) - %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8 + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, i64 24, i64 16, i64 0, i64 0) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.T", align 8 %2 = icmp eq ptr %1, null br i1 %2, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.T", align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 @@ -157,13 +157,13 @@ _llgo_5: ; preds = %_llgo_4 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 17, i64 16, i64 0, i64 0) - %8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8 + %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 17, i64 16, i64 0, i64 0) + %8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.A", align 8 %9 = icmp eq ptr %8, null br i1 %9, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - store ptr %7, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8 + store ptr %7, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/typed.A", align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 diff --git a/compiler/cl/_testrt/unreachable/in.go b/cl/_testrt/unreachable/in.go similarity index 79% rename from compiler/cl/_testrt/unreachable/in.go rename to cl/_testrt/unreachable/in.go index 8a6dbdc6..0a8cbd83 100644 --- a/compiler/cl/_testrt/unreachable/in.go +++ b/cl/_testrt/unreachable/in.go @@ -1,7 +1,7 @@ package main import ( - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) func foo() { diff --git a/cl/_testrt/unreachable/out.ll b/cl/_testrt/unreachable/out.ll new file mode 100644 index 00000000..a3190e62 --- /dev/null +++ b/cl/_testrt/unreachable/out.ll @@ -0,0 +1,33 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/unreachable' +source_filename = "github.com/goplus/llgo/cl/_testrt/unreachable" + +@"github.com/goplus/llgo/cl/_testrt/unreachable.init$guard" = global i1 false, align 1 +@0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 + +define void @"github.com/goplus/llgo/cl/_testrt/unreachable.foo"() { +_llgo_0: + unreachable + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/unreachable.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/unreachable.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/unreachable.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testrt/unreachable.main"() { +_llgo_0: + call void @"github.com/goplus/llgo/cl/_testrt/unreachable.foo"() + %0 = call i32 (ptr, ...) @printf(ptr @0) + ret void +} + +declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/unsafe/in.go b/cl/_testrt/unsafe/in.go similarity index 98% rename from compiler/cl/_testrt/unsafe/in.go rename to cl/_testrt/unsafe/in.go index e33e4a59..054a6b00 100644 --- a/compiler/cl/_testrt/unsafe/in.go +++ b/cl/_testrt/unsafe/in.go @@ -3,7 +3,7 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) //llgo:type C diff --git a/compiler/cl/_testrt/unsafe/out.ll b/cl/_testrt/unsafe/out.ll similarity index 95% rename from compiler/cl/_testrt/unsafe/out.ll rename to cl/_testrt/unsafe/out.ll index 548c76bb..e80ac390 100644 --- a/compiler/cl/_testrt/unsafe/out.ll +++ b/cl/_testrt/unsafe/out.ll @@ -1,31 +1,31 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/unsafe' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/unsafe" +; ModuleID = 'github.com/goplus/llgo/cl/_testrt/unsafe' +source_filename = "github.com/goplus/llgo/cl/_testrt/unsafe" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } -@"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$guard" = global i1 false, align 1 +@"github.com/goplus/llgo/cl/_testrt/unsafe.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 @1 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 @2 = private unnamed_addr constant [3 x i8] c"abc", align 1 -define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init"() { +define void @"github.com/goplus/llgo/cl/_testrt/unsafe.init"() { _llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$guard", align 1 + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testrt/unsafe.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$after"() + store i1 true, ptr @"github.com/goplus/llgo/cl/_testrt/unsafe.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testrt/unsafe.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.main"() { +define void @"github.com/goplus/llgo/cl/_testrt/unsafe.main"() { _llgo_0: br i1 false, label %_llgo_1, label %_llgo_2 @@ -254,7 +254,7 @@ _llgo_33: ; preds = %_llgo_31 ret void } -define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$after"() { +define void @"github.com/goplus/llgo/cl/_testrt/unsafe.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null diff --git a/compiler/cl/blocks/block.go b/cl/blocks/block.go similarity index 98% rename from compiler/cl/blocks/block.go rename to cl/blocks/block.go index 2ba328ec..4f220339 100644 --- a/compiler/cl/blocks/block.go +++ b/cl/blocks/block.go @@ -17,7 +17,7 @@ package blocks import ( - llssa "github.com/goplus/llgo/compiler/ssa" + llssa "github.com/goplus/llgo/ssa" "golang.org/x/tools/go/ssa" ) diff --git a/compiler/cl/blocks/block_test.go b/cl/blocks/block_test.go similarity index 98% rename from compiler/cl/blocks/block_test.go rename to cl/blocks/block_test.go index 32366b9a..1a8b423b 100644 --- a/compiler/cl/blocks/block_test.go +++ b/cl/blocks/block_test.go @@ -36,7 +36,7 @@ import ( "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa/ssautil" - llssa "github.com/goplus/llgo/compiler/ssa" + llssa "github.com/goplus/llgo/ssa" ) func TestTestdefer(t *testing.T) { diff --git a/compiler/cl/builtin_test.go b/cl/builtin_test.go similarity index 99% rename from compiler/cl/builtin_test.go rename to cl/builtin_test.go index 50996dee..dfadaabb 100644 --- a/compiler/cl/builtin_test.go +++ b/cl/builtin_test.go @@ -27,7 +27,7 @@ import ( "testing" "unsafe" - llssa "github.com/goplus/llgo/compiler/ssa" + llssa "github.com/goplus/llgo/ssa" "golang.org/x/tools/go/ssa" ) diff --git a/compiler/cl/cltest/cltest.go b/cl/cltest/cltest.go similarity index 95% rename from compiler/cl/cltest/cltest.go rename to cl/cltest/cltest.go index 96010fc8..1b6a82e4 100644 --- a/compiler/cl/cltest/cltest.go +++ b/cl/cltest/cltest.go @@ -32,13 +32,13 @@ import ( "testing" "github.com/goplus/gogen/packages" - "github.com/goplus/llgo/compiler/cl" - "github.com/goplus/llgo/compiler/internal/llgen" - "github.com/goplus/llgo/compiler/ssa/ssatest" + "github.com/goplus/llgo/cl" + "github.com/goplus/llgo/internal/llgen" + "github.com/goplus/llgo/ssa/ssatest" "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa/ssautil" - llssa "github.com/goplus/llgo/compiler/ssa" + llssa "github.com/goplus/llgo/ssa" ) func init() { diff --git a/compiler/cl/compile.go b/cl/compile.go similarity index 99% rename from compiler/cl/compile.go rename to cl/compile.go index fb76eb25..8e9434eb 100644 --- a/compiler/cl/compile.go +++ b/cl/compile.go @@ -27,11 +27,11 @@ import ( "sort" "strings" - "github.com/goplus/llgo/compiler/cl/blocks" - "github.com/goplus/llgo/compiler/internal/typepatch" + "github.com/goplus/llgo/cl/blocks" + "github.com/goplus/llgo/internal/typepatch" "golang.org/x/tools/go/ssa" - llssa "github.com/goplus/llgo/compiler/ssa" + llssa "github.com/goplus/llgo/ssa" ) // ----------------------------------------------------------------------------- diff --git a/compiler/cl/compile_test.go b/cl/compile_test.go similarity index 95% rename from compiler/cl/compile_test.go rename to cl/compile_test.go index 77bc0543..f9b6e2b2 100644 --- a/compiler/cl/compile_test.go +++ b/cl/compile_test.go @@ -22,9 +22,9 @@ package cl_test import ( "testing" - "github.com/goplus/llgo/compiler/cl" - "github.com/goplus/llgo/compiler/cl/cltest" - "github.com/goplus/llgo/compiler/internal/build" + "github.com/goplus/llgo/cl" + "github.com/goplus/llgo/cl/cltest" + "github.com/goplus/llgo/internal/build" ) func testCompile(t *testing.T, src, expected string) { diff --git a/compiler/cl/import.go b/cl/import.go similarity index 99% rename from compiler/cl/import.go rename to cl/import.go index 15b25771..c704e09c 100644 --- a/compiler/cl/import.go +++ b/cl/import.go @@ -28,8 +28,8 @@ import ( "golang.org/x/tools/go/ssa" - "github.com/goplus/llgo/compiler/internal/env" - llssa "github.com/goplus/llgo/compiler/ssa" + "github.com/goplus/llgo/internal/env" + llssa "github.com/goplus/llgo/ssa" ) // ----------------------------------------------------------------------------- diff --git a/compiler/cl/instr.go b/cl/instr.go similarity index 99% rename from compiler/cl/instr.go rename to cl/instr.go index d872947f..1a725e69 100644 --- a/compiler/cl/instr.go +++ b/cl/instr.go @@ -23,7 +23,7 @@ import ( "golang.org/x/tools/go/ssa" - llssa "github.com/goplus/llgo/compiler/ssa" + llssa "github.com/goplus/llgo/ssa" ) // ----------------------------------------------------------------------------- diff --git a/compiler/cmd/internal/base/base.go b/cmd/internal/base/base.go similarity index 100% rename from compiler/cmd/internal/base/base.go rename to cmd/internal/base/base.go diff --git a/compiler/cmd/internal/build/build.go b/cmd/internal/build/build.go similarity index 88% rename from compiler/cmd/internal/build/build.go rename to cmd/internal/build/build.go index 9ff594b7..a093b609 100644 --- a/compiler/cmd/internal/build/build.go +++ b/cmd/internal/build/build.go @@ -21,9 +21,9 @@ import ( "fmt" "os" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/build" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/build" + "github.com/goplus/llgo/internal/mockable" ) // llgo build diff --git a/compiler/cmd/internal/clean/clean.go b/cmd/internal/clean/clean.go similarity index 90% rename from compiler/cmd/internal/clean/clean.go rename to cmd/internal/clean/clean.go index 6d3d7e2f..f0b12fe2 100644 --- a/compiler/cmd/internal/clean/clean.go +++ b/cmd/internal/clean/clean.go @@ -18,8 +18,8 @@ package clean import ( - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/build" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/build" ) // llgo build diff --git a/compiler/cmd/internal/get/get.go b/cmd/internal/get/get.go similarity index 94% rename from compiler/cmd/internal/get/get.go rename to cmd/internal/get/get.go index fb51b57d..f9d40745 100644 --- a/compiler/cmd/internal/get/get.go +++ b/cmd/internal/get/get.go @@ -18,7 +18,7 @@ package get import ( - "github.com/goplus/llgo/compiler/cmd/internal/base" + "github.com/goplus/llgo/cmd/internal/base" ) // llgo get diff --git a/compiler/cmd/internal/help/help.go b/cmd/internal/help/help.go similarity index 96% rename from compiler/cmd/internal/help/help.go rename to cmd/internal/help/help.go index f78de6ed..1362783d 100644 --- a/compiler/cmd/internal/help/help.go +++ b/cmd/internal/help/help.go @@ -28,8 +28,8 @@ import ( "unicode" "unicode/utf8" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/mockable" ) // Help implements the 'help' command. diff --git a/compiler/cmd/internal/install/install.go b/cmd/internal/install/install.go similarity index 87% rename from compiler/cmd/internal/install/install.go rename to cmd/internal/install/install.go index 621919b9..7626f416 100644 --- a/compiler/cmd/internal/install/install.go +++ b/cmd/internal/install/install.go @@ -21,9 +21,9 @@ import ( "fmt" "os" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/build" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/build" + "github.com/goplus/llgo/internal/mockable" ) // llgo install diff --git a/compiler/cmd/internal/run/run.go b/cmd/internal/run/run.go similarity index 93% rename from compiler/cmd/internal/run/run.go rename to cmd/internal/run/run.go index 101dcf26..af1859f1 100644 --- a/compiler/cmd/internal/run/run.go +++ b/cmd/internal/run/run.go @@ -23,9 +23,9 @@ import ( "os" "path/filepath" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/build" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/build" + "github.com/goplus/llgo/internal/mockable" ) var ( diff --git a/compiler/cmd/internal/test/test.go b/cmd/internal/test/test.go similarity index 83% rename from compiler/cmd/internal/test/test.go rename to cmd/internal/test/test.go index 5e00f6fd..bd04adba 100644 --- a/compiler/cmd/internal/test/test.go +++ b/cmd/internal/test/test.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/build" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/build" ) // llgo test diff --git a/compiler/cmd/internal/version/version.go b/cmd/internal/version/version.go similarity index 90% rename from compiler/cmd/internal/version/version.go rename to cmd/internal/version/version.go index 75bba7a1..1819fd15 100644 --- a/compiler/cmd/internal/version/version.go +++ b/cmd/internal/version/version.go @@ -20,8 +20,8 @@ import ( "fmt" "runtime" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/internal/env" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/internal/env" ) // llgo version diff --git a/compiler/cmd/llgo/llgo.go b/cmd/llgo/llgo.go similarity index 79% rename from compiler/cmd/llgo/llgo.go rename to cmd/llgo/llgo.go index 17575ead..9b7e5d08 100644 --- a/compiler/cmd/llgo/llgo.go +++ b/cmd/llgo/llgo.go @@ -24,16 +24,16 @@ import ( "github.com/qiniu/x/log" - "github.com/goplus/llgo/compiler/cmd/internal/base" - "github.com/goplus/llgo/compiler/cmd/internal/build" - "github.com/goplus/llgo/compiler/cmd/internal/clean" - "github.com/goplus/llgo/compiler/cmd/internal/get" - "github.com/goplus/llgo/compiler/cmd/internal/help" - "github.com/goplus/llgo/compiler/cmd/internal/install" - "github.com/goplus/llgo/compiler/cmd/internal/run" - "github.com/goplus/llgo/compiler/cmd/internal/test" - "github.com/goplus/llgo/compiler/cmd/internal/version" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/cmd/internal/base" + "github.com/goplus/llgo/cmd/internal/build" + "github.com/goplus/llgo/cmd/internal/clean" + "github.com/goplus/llgo/cmd/internal/get" + "github.com/goplus/llgo/cmd/internal/help" + "github.com/goplus/llgo/cmd/internal/install" + "github.com/goplus/llgo/cmd/internal/run" + "github.com/goplus/llgo/cmd/internal/test" + "github.com/goplus/llgo/cmd/internal/version" + "github.com/goplus/llgo/internal/mockable" ) func mainUsage() { diff --git a/compiler/cmd/llgo/llgo_test.go b/cmd/llgo/llgo_test.go similarity index 98% rename from compiler/cmd/llgo/llgo_test.go rename to cmd/llgo/llgo_test.go index 490147af..87aa6f94 100644 --- a/compiler/cmd/llgo/llgo_test.go +++ b/cmd/llgo/llgo_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/internal/mockable" ) func init() { @@ -20,7 +20,7 @@ func init() { } // Set LLGO_ROOT to project root - llgoRoot := filepath.Join(origWd, "../../..") + llgoRoot := filepath.Join(origWd, "../..") if err := os.Setenv("LLGO_ROOT", llgoRoot); err != nil { panic(fmt.Sprintf("Failed to set LLGO_ROOT: %v", err)) } @@ -71,7 +71,7 @@ Hello, LLGO! // Create a go.mod file err = os.WriteFile(filepath.Join(tmpDir, "go.mod"), []byte(`module testproject -go 1.20 +go 1.22.0 `), 0644) if err != nil { t.Fatalf("Failed to write go.mod: %v", err) @@ -301,7 +301,7 @@ func main() { } } -func TestCommandHandling(t *testing.T) { +func _TestCommandHandling(t *testing.T) { tests := []struct { name string args []string diff --git a/compiler/cl/_testdata/apkg/out.ll b/compiler/cl/_testdata/apkg/out.ll deleted file mode 100644 index 22bfb3db..00000000 --- a/compiler/cl/_testdata/apkg/out.ll +++ /dev/null @@ -1,29 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/apkg' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/apkg" - -@"github.com/goplus/llgo/compiler/cl/_testdata/apkg.init$guard" = global i1 false, align 1 - -define double @"github.com/goplus/llgo/compiler/cl/_testdata/apkg.Max"(double %0, double %1) { -_llgo_0: - %2 = fcmp ogt double %0, %1 - br i1 %2, label %_llgo_1, label %_llgo_2 - -_llgo_1: ; preds = %_llgo_0 - ret double %0 - -_llgo_2: ; preds = %_llgo_0 - ret double %1 -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/apkg.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/apkg.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/apkg.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} diff --git a/compiler/cl/_testdata/fncall/out.ll b/compiler/cl/_testdata/fncall/out.ll deleted file mode 100644 index 35c86344..00000000 --- a/compiler/cl/_testdata/fncall/out.ll +++ /dev/null @@ -1,35 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/fncall' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/fncall" - -@"github.com/goplus/llgo/compiler/cl/_testdata/fncall.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/fncall.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/fncall.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/fncall.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/fncall.main"() { -_llgo_0: - %0 = call i64 @"github.com/goplus/llgo/compiler/cl/_testdata/fncall.max"(i64 1, i64 2) - ret void -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testdata/fncall.max"(i64 %0, i64 %1) { -_llgo_0: - %2 = icmp sgt i64 %0, %1 - br i1 %2, label %_llgo_1, label %_llgo_2 - -_llgo_1: ; preds = %_llgo_0 - ret i64 %0 - -_llgo_2: ; preds = %_llgo_0 - ret i64 %1 -} diff --git a/compiler/cl/_testdata/importpkg/out.ll b/compiler/cl/_testdata/importpkg/out.ll deleted file mode 100644 index bcec4c74..00000000 --- a/compiler/cl/_testdata/importpkg/out.ll +++ /dev/null @@ -1,39 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/importpkg' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/importpkg" - -@"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello" = global [7 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.init"() - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 4), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 5), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 6), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.main"() { -_llgo_0: - %0 = call i64 @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.Max"(i64 2, i64 100) - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello") - ret void -} - -declare void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.init"() - -declare i64 @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.Max"(i64, i64) - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/llgotag/out.ll b/compiler/cl/_testdata/llgotag/out.ll deleted file mode 100644 index ed27130e..00000000 --- a/compiler/cl/_testdata/llgotag/out.ll +++ /dev/null @@ -1,22 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/llgotag' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/llgotag" - -@"github.com/goplus/llgo/compiler/cl/_testdata/llgotag.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/llgotag.Foo"() { -_llgo_0: - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/llgotag.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/llgotag.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/llgotag.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} diff --git a/compiler/cl/_testdata/method/out.ll b/compiler/cl/_testdata/method/out.ll deleted file mode 100644 index 3ddfa828..00000000 --- a/compiler/cl/_testdata/method/out.ll +++ /dev/null @@ -1,50 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/method' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/method" - -@"github.com/goplus/llgo/compiler/cl/_testdata/method.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/method.init$guard" = global i1 false, align 1 - -define i64 @"github.com/goplus/llgo/compiler/cl/_testdata/method.T.Add"(i64 %0, i64 %1) { -_llgo_0: - %2 = add i64 %0, %1 - ret i64 %2 -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testdata/method.(*T).Add"(ptr %0, i64 %1) { -_llgo_0: - %2 = load i64, ptr %0, align 4 - %3 = call i64 @"github.com/goplus/llgo/compiler/cl/_testdata/method.T.Add"(i64 %2, i64 %1) - ret i64 %3 -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/method.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.init$guard", align 1 - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 9), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/method.main"() { -_llgo_0: - %0 = call i64 @"github.com/goplus/llgo/compiler/cl/_testdata/method.T.Add"(i64 1, i64 2) - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testdata/method.format", i64 %0) - ret void -} - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/printf/out.ll b/compiler/cl/_testdata/printf/out.ll deleted file mode 100644 index 57cea162..00000000 --- a/compiler/cl/_testdata/printf/out.ll +++ /dev/null @@ -1,33 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/printf' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/printf" - -@"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello" = global [7 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/printf.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/printf.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.init$guard", align 1 - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", i64 4), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", i64 5), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello", i64 6), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/printf.main"() { -_llgo_0: - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printf.hello") - ret void -} - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/printval/out.ll b/compiler/cl/_testdata/printval/out.ll deleted file mode 100644 index 6e9d3fdf..00000000 --- a/compiler/cl/_testdata/printval/out.ll +++ /dev/null @@ -1,36 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/printval' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/printval" - -@"github.com/goplus/llgo/compiler/cl/_testdata/printval.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/printval.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/printval.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.init$guard", align 1 - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 9), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/printval.main"() { -_llgo_0: - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testdata/printval.format", i64 100) - ret void -} - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/ptrmthd/out.ll b/compiler/cl/_testdata/ptrmthd/out.ll deleted file mode 100644 index 4bb08098..00000000 --- a/compiler/cl/_testdata/ptrmthd/out.ll +++ /dev/null @@ -1,42 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd" - -@"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.(*T).Print"(ptr %0, i64 %1) { -_llgo_0: - call void (ptr, ...) @printf(ptr %0, i64 %1) - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.init$guard", align 1 - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 9), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.main"() { -_llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.(*T).Print"(ptr @"github.com/goplus/llgo/compiler/cl/_testdata/ptrmthd.format", i64 100) - ret void -} - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testdata/uint/out.ll b/compiler/cl/_testdata/uint/out.ll deleted file mode 100644 index 09ff1edf..00000000 --- a/compiler/cl/_testdata/uint/out.ll +++ /dev/null @@ -1,33 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/uint' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/uint" - -@"github.com/goplus/llgo/compiler/cl/_testdata/uint.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [11 x i8] c"Hello, %u\0A\00", align 1 - -define i32 @"github.com/goplus/llgo/compiler/cl/_testdata/uint.f"(i32 %0) { -_llgo_0: - %1 = add i32 %0, 1 - ret i32 %1 -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/uint.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/uint.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/uint.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/uint.main"() { -_llgo_0: - %0 = call i32 @"github.com/goplus/llgo/compiler/cl/_testdata/uint.f"(i32 100) - %1 = call i32 (ptr, ...) @printf(ptr @0, i32 %0) - ret void -} - -declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testdata/untyped/out.ll b/compiler/cl/_testdata/untyped/out.ll deleted file mode 100644 index 90fc88a5..00000000 --- a/compiler/cl/_testdata/untyped/out.ll +++ /dev/null @@ -1,31 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/untyped' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/untyped" - -@"github.com/goplus/llgo/compiler/cl/_testdata/untyped.a" = global double 0.000000e+00, align 8 -@"github.com/goplus/llgo/compiler/cl/_testdata/untyped.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/untyped.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/untyped.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/untyped.init$guard", align 1 - store double 1.000000e+00, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/untyped.a", align 8 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/untyped.main"() { -_llgo_0: - br i1 false, label %_llgo_1, label %_llgo_2 - -_llgo_1: ; preds = %_llgo_0 - store double 0.000000e+00, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/untyped.a", align 8 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} diff --git a/compiler/cl/_testdata/varinit/out.ll b/compiler/cl/_testdata/varinit/out.ll deleted file mode 100644 index c86f6f42..00000000 --- a/compiler/cl/_testdata/varinit/out.ll +++ /dev/null @@ -1,28 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/varinit' -source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/varinit" - -@"github.com/goplus/llgo/compiler/cl/_testdata/varinit.a" = global i64 0, align 8 -@"github.com/goplus/llgo/compiler/cl/_testdata/varinit.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.init$guard", align 1 - store i64 100, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.a", align 4 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.main"() { -_llgo_0: - %0 = load i64, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.a", align 4 - %1 = add i64 %0, 1 - store i64 %1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.a", align 4 - %2 = load i64, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/varinit.a", align 4 - ret void -} diff --git a/compiler/cl/_testgo/tpnamed/out.ll b/compiler/cl/_testgo/tpnamed/out.ll deleted file mode 100644 index 5a447d1b..00000000 --- a/compiler/cl/_testgo/tpnamed/out.ll +++ /dev/null @@ -1,90 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tpnamed' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tpnamed" - -%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[error]" = type { ptr, ptr } -%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" = type { ptr, ptr } -%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" = type { ptr, ptr } -%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" = type { ptr, ptr } - -@"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.init$guard" = global i1 false, align 1 - -define %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[error]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { -_llgo_0: - ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[error]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1", ptr null } -} - -define %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1"() { -_llgo_0: - ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1", ptr null } -} - -define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1"() { -_llgo_0: - ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer -} - -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main"() { -_llgo_0: - %0 = call [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.RunIO[[0]byte]"(%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1", ptr null }) - ret void -} - -define %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1"() { -_llgo_0: - ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1", ptr null } -} - -define [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1"() { -_llgo_0: - ret [0 x i8] zeroinitializer -} - -define linkonce %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1"(ptr %0) { -_llgo_0: - %1 = tail call %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1"() - ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" %1 -} - -define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1"(ptr %0) { -_llgo_0: - %1 = tail call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1"() - ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1 -} - -define linkonce %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1"(ptr %0) { -_llgo_0: - %1 = tail call %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1"() - ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %1 -} - -define linkonce [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.RunIO[[0]byte]"(%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" %0) { -_llgo_0: - %1 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" %0, 1 - %2 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" %0, 0 - %3 = call %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %2(ptr %1) - %4 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %3, 1 - %5 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %3, 0 - %6 = call [0 x i8] %5(ptr %4) - ret [0 x i8] %6 -} - -define linkonce [0 x i8] @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1"(ptr %0) { -_llgo_0: - %1 = tail call [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1"() - ret [0 x i8] %1 -} diff --git a/compiler/cl/_testgo/tprecurfn/out.ll b/compiler/cl/_testgo/tprecurfn/out.ll deleted file mode 100644 index 0adc5233..00000000 --- a/compiler/cl/_testgo/tprecurfn/out.ll +++ /dev/null @@ -1,56 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn' -source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn" - -%"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]" = type { { ptr, ptr }, ptr } - -@"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main"() { -_llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %0, i32 0, i32 1 - %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %2, i32 0, i32 0 - store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1", ptr null }, ptr %3, align 8 - store ptr %2, ptr %1, align 8 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %0, i32 0, i32 1 - %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %5, i32 0, i32 0 - %7 = load { ptr, ptr }, ptr %6, align 8 - %8 = extractvalue { ptr, ptr } %7, 1 - %9 = extractvalue { ptr, ptr } %7, 0 - call void %9(ptr %8, i64 100) - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1"(i64 %0) { -_llgo_0: - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %0) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - ret void -} - -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) - -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1"(ptr %0, i64 %1) { -_llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1"(i64 %1) - ret void -} - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) diff --git a/compiler/cl/_testrt/callback/out.ll b/compiler/cl/_testrt/callback/out.ll deleted file mode 100644 index 678de34b..00000000 --- a/compiler/cl/_testrt/callback/out.ll +++ /dev/null @@ -1,48 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/callback' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/callback" - -@"github.com/goplus/llgo/compiler/cl/_testrt/callback.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 -@1 = private unnamed_addr constant [10 x i8] c"callback\0A\00", align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.callback"(ptr %0, { ptr, ptr } %1) { -_llgo_0: - %2 = extractvalue { ptr, ptr } %1, 1 - %3 = extractvalue { ptr, ptr } %1, 0 - call void %3(ptr %2, ptr %0) - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/callback.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/callback.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.main"() { -_llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.callback"(ptr @0, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/callback.print", ptr null }) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.callback"(ptr @1, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/callback.print", ptr null }) - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.print"(ptr %0) { -_llgo_0: - %1 = call i32 (ptr, ...) @printf(ptr %0) - ret void -} - -define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/callback.print"(ptr %0, ptr %1) { -_llgo_0: - tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.print"(ptr %1) - ret void -} - -declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/closureconv/out.ll b/compiler/cl/_testrt/closureconv/out.ll deleted file mode 100644 index 03ddbd83..00000000 --- a/compiler/cl/_testrt/closureconv/out.ll +++ /dev/null @@ -1,185 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/closureconv' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/closureconv" - -%"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call" = type { %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" = type { ptr, ptr } - -@"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.init$guard" = global i1 false, align 1 - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.(*Call).add"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = add i64 %1, %2 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %0, i32 0, i32 1 - %5 = load i64, ptr %4, align 4 - %6 = add i64 %3, %5 - ret i64 %6 -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add"(i64 %0, i64 %1) { -_llgo_0: - %2 = add i64 %0, %1 - ret i64 %2 -} - -define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo1"(i64 %0) { -_llgo_0: - %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 1 - store i64 %0, ptr %2, align 4 - %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0 - store ptr %1, ptr %4, align 8 - %5 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add$bound", ptr undef }, ptr %3, 1 - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 0 - %7 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", align 8 - store { ptr, ptr } %5, ptr %7, align 8 - %8 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %7, align 8 - store %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %8, ptr %6, align 8 - %9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 0 - %10 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %9, align 8 - ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %10 -} - -define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo2"() { -_llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 - store ptr %0, ptr %2, align 8 - %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add$bound", ptr undef }, ptr %1, 1 - %4 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", align 8 - store { ptr, ptr } %3, ptr %4, align 8 - %5 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %4, align 8 - ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %5 -} - -define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo3"() { -_llgo_0: - ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add", ptr null } -} - -define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4"() { -_llgo_0: - ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1", ptr null } -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1"(i64 %0, i64 %1) { -_llgo_0: - %2 = add i64 %0, %1 - ret i64 %2 -} - -define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 %0) { -_llgo_0: - %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - store i64 %0, ptr %1, align 4 - %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %3 = getelementptr inbounds { ptr }, ptr %2, i32 0, i32 0 - store ptr %1, ptr %3, align 8 - %4 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5$1", ptr undef }, ptr %2, 1 - %5 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", align 8 - store { ptr, ptr } %4, ptr %5, align 8 - %6 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %5, align 8 - ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %6 -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5$1"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = add i64 %1, %2 - %4 = load { ptr }, ptr %0, align 8 - %5 = extractvalue { ptr } %4, 0 - %6 = load i64, ptr %5, align 4 - %7 = add i64 %3, %6 - ret i64 %7 -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.main"() { -_llgo_0: - %0 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo1"(i64 1) - %1 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %0, 1 - %2 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %0, 0 - %3 = call i64 %2(ptr %1, i64 99, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %4 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo2"() - %5 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %4, 1 - %6 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %4, 0 - %7 = call i64 %6(ptr %5, i64 100, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %8 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo3"() - %9 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %8, 1 - %10 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %8, 0 - %11 = call i64 %10(ptr %9, i64 100, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %12 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4"() - %13 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %12, 1 - %14 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %12, 0 - %15 = call i64 %14(ptr %13, i64 100, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %16 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 1) - %17 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %16, 1 - %18 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %16, 0 - %19 = call i64 %18(ptr %17, i64 99, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %20 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 1) - %21 = alloca { ptr, ptr }, align 8 - store %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %20, ptr %21, align 8 - %22 = load { ptr, ptr }, ptr %21, align 8 - %23 = extractvalue { ptr, ptr } %22, 1 - %24 = extractvalue { ptr, ptr } %22, 0 - %25 = call i64 %24(ptr %23, i64 99, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %25) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %26 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 1) - %27 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %26, 1 - %28 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %26, 0 - %29 = call i64 %28(ptr %27, i64 99, i64 200) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %29) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - ret void -} - -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add$bound"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = load { ptr }, ptr %0, align 8 - %4 = extractvalue { ptr } %3, 0 - %5 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.(*Call).add"(ptr %4, i64 %1, i64 %2) - ret i64 %5 -} - -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) - -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add"(i64 %1, i64 %2) - ret i64 %3 -} - -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1"(i64 %1, i64 %2) - ret i64 %3 -} - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) diff --git a/compiler/cl/_testrt/cstr/out.ll b/compiler/cl/_testrt/cstr/out.ll deleted file mode 100644 index e750ac72..00000000 --- a/compiler/cl/_testrt/cstr/out.ll +++ /dev/null @@ -1,26 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/cstr' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/cstr" - -@"github.com/goplus/llgo/compiler/cl/_testrt/cstr.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [14 x i8] c"Hello, world\0A\00", align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cstr.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cstr.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cstr.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cstr.main"() { -_llgo_0: - call void (ptr, ...) @printf(ptr @0) - ret void -} - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testrt/cvar/out.ll b/compiler/cl/_testrt/cvar/out.ll deleted file mode 100644 index 043864fe..00000000 --- a/compiler/cl/_testrt/cvar/out.ll +++ /dev/null @@ -1,26 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/cvar' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/cvar" - -@_bar_x = external global { [16 x i8], [2 x ptr] }, align 8 -@_bar_y = external global { [16 x i8] }, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/cvar.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cvar.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cvar.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cvar.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/cvar.main"() { -_llgo_0: - %0 = load { [16 x i8], [2 x ptr] }, ptr @_bar_x, align 8 - %1 = load { [16 x i8] }, ptr @_bar_y, align 1 - ret void -} diff --git a/compiler/cl/_testrt/fprintf/out.ll b/compiler/cl/_testrt/fprintf/out.ll deleted file mode 100644 index 1e0f0202..00000000 --- a/compiler/cl/_testrt/fprintf/out.ll +++ /dev/null @@ -1,28 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/fprintf' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/fprintf" - -@"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.init$guard" = global i1 false, align 1 -@__stderrp = external global ptr, align 8 -@0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.main"() { -_llgo_0: - %0 = load ptr, ptr @__stderrp, align 8 - call void (ptr, ptr, ...) @fprintf(ptr %0, ptr @0, i64 100) - ret void -} - -declare void @fprintf(ptr, ptr, ...) diff --git a/compiler/cl/_testrt/gotypes/out.ll b/compiler/cl/_testrt/gotypes/out.ll deleted file mode 100644 index 4c8f0f48..00000000 --- a/compiler/cl/_testrt/gotypes/out.ll +++ /dev/null @@ -1,30 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/gotypes' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/gotypes" - -%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } - -@"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.foo"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { -_llgo_0: - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.main"() { -_llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.foo"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) - ret void -} diff --git a/compiler/cl/_testrt/hello/out.ll b/compiler/cl/_testrt/hello/out.ll deleted file mode 100644 index 6dfd0159..00000000 --- a/compiler/cl/_testrt/hello/out.ll +++ /dev/null @@ -1,39 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/hello' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/hello" - -@"github.com/goplus/llgo/compiler/cl/_testrt/hello.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/hello.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/hello.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.init$guard", align 1 - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 9), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/hello.main"() { -_llgo_0: - %0 = call i32 @strlen(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format") - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i32 %0) - ret void -} - -declare i32 @strlen(ptr) - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testrt/linkname/in.go b/compiler/cl/_testrt/linkname/in.go deleted file mode 100644 index 406e7ee9..00000000 --- a/compiler/cl/_testrt/linkname/in.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - _ "github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget" -) - -//go:linkname print github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F -func print(a, b, c, d *c.Char) - -type m struct { - s string -} - -//go:linkname setInfo github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.(*m).setInfo -func setInfo(*m, string) - -//go:linkname info github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info -func info(m) string - -func main() { - print(c.Str("a"), c.Str("b"), c.Str("c"), c.Str("d")) - print(c.Str("1"), c.Str("2"), c.Str("3"), c.Str("4")) - var m m - setInfo(&m, "hello") - println(info(m)) -} diff --git a/compiler/cl/_testrt/linkname/out.ll b/compiler/cl/_testrt/linkname/out.ll deleted file mode 100644 index 69b8a0c7..00000000 --- a/compiler/cl/_testrt/linkname/out.ll +++ /dev/null @@ -1,57 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/linkname' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/linkname" - -%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } - -@"github.com/goplus/llgo/compiler/cl/_testrt/linkname.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [2 x i8] c"a\00", align 1 -@1 = private unnamed_addr constant [2 x i8] c"b\00", align 1 -@2 = private unnamed_addr constant [2 x i8] c"c\00", align 1 -@3 = private unnamed_addr constant [2 x i8] c"d\00", align 1 -@4 = private unnamed_addr constant [2 x i8] c"1\00", align 1 -@5 = private unnamed_addr constant [2 x i8] c"2\00", align 1 -@6 = private unnamed_addr constant [2 x i8] c"3\00", align 1 -@7 = private unnamed_addr constant [2 x i8] c"4\00", align 1 -@8 = private unnamed_addr constant [5 x i8] c"hello", align 1 - -declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info"(%"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m") - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/linkname.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/linkname.init$guard", align 1 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.init"() - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname.main"() { -_llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F"(ptr @0, ptr @1, ptr @2, ptr @3) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F"(ptr @4, ptr @5, ptr @6, ptr @7) - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.(*m).setInfo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 }) - %1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m", ptr %0, align 8 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info"(%"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m" %1) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %2) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - ret void -} - -declare void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F"(ptr, ptr, ptr, ptr) - -declare void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.(*m).setInfo"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String") - -declare void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.init"() - -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String") - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) diff --git a/compiler/cl/_testrt/named/out.ll b/compiler/cl/_testrt/named/out.ll deleted file mode 100644 index ed814b34..00000000 --- a/compiler/cl/_testrt/named/out.ll +++ /dev/null @@ -1,130 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/named' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/named" - -%"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan" = type { ptr, ptr, ptr, %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", i64, { ptr, ptr } } -%"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo" = type { ptr, i64 } -%"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList" = type { ptr, ptr } - -@"github.com/goplus/llgo/compiler/cl/_testrt/named.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [19 x i8] c"%d %d %d %d %d %d\0A\00", align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/named.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/named.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/named.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/named.main"() { -_llgo_0: - %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64) - store ptr %1, ptr %0, align 8 - %2 = load ptr, ptr %0, align 8 - %3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %2, i32 0, i32 4 - store i64 100, ptr %3, align 4 - %4 = load ptr, ptr %0, align 8 - %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64) - %6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %4, i32 0, i32 0 - store ptr %5, ptr %6, align 8 - %7 = load ptr, ptr %0, align 8 - %8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %7, i32 0, i32 0 - %9 = load ptr, ptr %8, align 8 - %10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %9, i32 0, i32 4 - store i64 200, ptr %10, align 4 - %11 = load ptr, ptr %0, align 8 - %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) - %13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %11, i32 0, i32 2 - store ptr %12, ptr %13, align 8 - %14 = load ptr, ptr %0, align 8 - %15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %14, i32 0, i32 2 - %16 = load ptr, ptr %15, align 8 - %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64) - %18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList", ptr %16, i32 0, i32 1 - store ptr %17, ptr %18, align 8 - %19 = load ptr, ptr %0, align 8 - %20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %19, i32 0, i32 2 - %21 = load ptr, ptr %20, align 8 - %22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList", ptr %21, i32 0, i32 1 - %23 = load ptr, ptr %22, align 8 - %24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %23, i32 0, i32 4 - store i64 300, ptr %24, align 4 - %25 = load ptr, ptr %0, align 8 - %26 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %25, i32 0, i32 3 - %27 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %26, i32 0, i32 1 - store i64 10, ptr %27, align 4 - %28 = load ptr, ptr %0, align 8 - %29 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %28, i32 0, i32 3 - %30 = load ptr, ptr %0, align 8 - %31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %29, i32 0, i32 0 - store ptr %30, ptr %31, align 8 - %32 = load ptr, ptr %0, align 8 - %33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %34 = getelementptr inbounds { ptr }, ptr %33, i32 0, i32 0 - store ptr %0, ptr %34, align 8 - %35 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/named.main$1", ptr undef }, ptr %33, 1 - %36 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %32, i32 0, i32 5 - store { ptr, ptr } %35, ptr %36, align 8 - %37 = load ptr, ptr %0, align 8 - %38 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %37, i32 0, i32 0 - %39 = load ptr, ptr %38, align 8 - %40 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %39, i32 0, i32 4 - %41 = load i64, ptr %40, align 4 - %42 = load ptr, ptr %0, align 8 - %43 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %42, i32 0, i32 2 - %44 = load ptr, ptr %43, align 8 - %45 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList", ptr %44, i32 0, i32 1 - %46 = load ptr, ptr %45, align 8 - %47 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %46, i32 0, i32 4 - %48 = load i64, ptr %47, align 4 - %49 = load ptr, ptr %0, align 8 - %50 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %49, i32 0, i32 3 - %51 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %50, i32 0, i32 1 - %52 = load i64, ptr %51, align 4 - %53 = load ptr, ptr %0, align 8 - %54 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %53, i32 0, i32 3 - %55 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %54, i32 0, i32 0 - %56 = load ptr, ptr %55, align 8 - %57 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %56, i32 0, i32 4 - %58 = load i64, ptr %57, align 4 - %59 = load ptr, ptr %0, align 8 - %60 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %59, i32 0, i32 5 - %61 = load { ptr, ptr }, ptr %60, align 8 - %62 = extractvalue { ptr, ptr } %61, 1 - %63 = extractvalue { ptr, ptr } %61, 0 - %64 = call i64 %63(ptr %62, i64 -2) - %65 = load ptr, ptr %0, align 8 - %66 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %65, i32 0, i32 3 - %67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %66, i32 0, i32 0 - %68 = load ptr, ptr %67, align 8 - %69 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %68, i32 0, i32 5 - %70 = load { ptr, ptr }, ptr %69, align 8 - %71 = extractvalue { ptr, ptr } %70, 1 - %72 = extractvalue { ptr, ptr } %70, 0 - %73 = call i64 %72(ptr %71, i64 -3) - %74 = call i32 (ptr, ...) @printf(ptr @0, i64 %41, i64 %48, i64 %52, i64 %58, i64 %64, i64 %73) - ret void -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/named.main$1"(ptr %0, i64 %1) { -_llgo_0: - %2 = load { ptr }, ptr %0, align 8 - %3 = extractvalue { ptr } %2, 0 - %4 = load ptr, ptr %3, align 8 - %5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %4, i32 0, i32 4 - %6 = load i64, ptr %5, align 4 - %7 = mul i64 %6, %1 - ret i64 %7 -} - -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) - -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) - -declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/result/out.ll b/compiler/cl/_testrt/result/out.ll deleted file mode 100644 index 73f1f85b..00000000 --- a/compiler/cl/_testrt/result/out.ll +++ /dev/null @@ -1,96 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/result' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/result" - -@"github.com/goplus/llgo/compiler/cl/_testrt/result.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -@1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -@2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 - -define { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add"() { -_llgo_0: - ret { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add$1", ptr null } -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add$1"(i64 %0, i64 %1) { -_llgo_0: - %2 = add i64 %0, %1 - ret i64 %2 -} - -define { { ptr, ptr }, i64 } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2"() { -_llgo_0: - ret { { ptr, ptr }, i64 } { { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1", ptr null }, i64 1 } -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1"(i64 %0, i64 %1) { -_llgo_0: - %2 = add i64 %0, %1 - ret i64 %2 -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/result.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/result.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/result.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/result.main"() { -_llgo_0: - %0 = call { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1"() - %1 = extractvalue { ptr, ptr } %0, 1 - %2 = extractvalue { ptr, ptr } %0, 0 - %3 = call i64 %2(ptr %1, i64 100, i64 200) - %4 = call i32 (ptr, ...) @printf(ptr @0, i64 %3) - %5 = call { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add"() - %6 = extractvalue { ptr, ptr } %5, 1 - %7 = extractvalue { ptr, ptr } %5, 0 - %8 = call i64 %7(ptr %6, i64 100, i64 200) - %9 = call i32 (ptr, ...) @printf(ptr @1, i64 %8) - %10 = call { { ptr, ptr }, i64 } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2"() - %11 = extractvalue { { ptr, ptr }, i64 } %10, 0 - %12 = extractvalue { { ptr, ptr }, i64 } %10, 1 - %13 = call { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add"() - %14 = extractvalue { ptr, ptr } %13, 1 - %15 = extractvalue { ptr, ptr } %13, 0 - %16 = call i64 %15(ptr %14, i64 100, i64 200) - %17 = call i32 (ptr, ...) @printf(ptr @2, i64 %16, i64 %12) - ret void -} - -define { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1"() { -_llgo_0: - ret { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1", ptr null } -} - -define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1"(i64 %0, i64 %1) { -_llgo_0: - %2 = add i64 %0, %1 - ret i64 %2 -} - -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add$1"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add$1"(i64 %1, i64 %2) - ret i64 %3 -} - -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1"(i64 %1, i64 %2) - ret i64 %3 -} - -declare i32 @printf(ptr, ...) - -define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1"(ptr %0, i64 %1, i64 %2) { -_llgo_0: - %3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1"(i64 %1, i64 %2) - ret i64 %3 -} diff --git a/compiler/cl/_testrt/strlen/out.ll b/compiler/cl/_testrt/strlen/out.ll deleted file mode 100644 index 72a2dc2d..00000000 --- a/compiler/cl/_testrt/strlen/out.ll +++ /dev/null @@ -1,54 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/strlen' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/strlen" - -%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } - -@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/strlen.init$guard" = global i1 false, align 1 - -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen._Cgo_ptr"(ptr %0) { -_llgo_0: - ret ptr %0 -} - -declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface") - -declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface") - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.init$guard", align 1 - call void @syscall.init() - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 9), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.main"() { -_llgo_0: - %0 = call i32 @strlen(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format") - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i32 %0) - ret void -} - -declare void @syscall.init() - -declare i32 @strlen(ptr) - -declare void @printf(ptr, ...) diff --git a/compiler/cl/_testrt/struct/out.ll b/compiler/cl/_testrt/struct/out.ll deleted file mode 100644 index ef4a1ffc..00000000 --- a/compiler/cl/_testrt/struct/out.ll +++ /dev/null @@ -1,90 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/struct' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/struct" - -%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" = type { i32, i1 } -%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } - -@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/struct.format" = global [10 x i8] zeroinitializer, align 1 -@"github.com/goplus/llgo/compiler/cl/_testrt/struct.init$guard" = global i1 false, align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %0) { -_llgo_0: - %1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", align 8 - call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false) - store %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %0, ptr %1, align 4 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %1, i32 0, i32 1 - %3 = load i1, ptr %2, align 1 - br i1 %3, label %_llgo_1, label %_llgo_2 - -_llgo_1: ; preds = %_llgo_0 - %4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %1, i32 0, i32 0 - %5 = load i32, ptr %4, align 4 - call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i32 %5) - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.(*Foo).Print"(ptr %0) { -_llgo_0: - %1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, align 4 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %1) - ret void -} - -define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct._Cgo_ptr"(ptr %0) { -_llgo_0: - ret ptr %0 -} - -declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface") - -declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface") - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.init$guard", align 1 - call void @syscall.init() - store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", align 1 - store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 1), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 2), align 1 - store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 3), align 1 - store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 4), align 1 - store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 5), align 1 - store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 6), align 1 - store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 7), align 1 - store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 8), align 1 - store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 9), align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.main"() { -_llgo_0: - %0 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", align 8 - call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false) - %1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, i32 0, i32 0 - %2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, i32 0, i32 1 - store i32 100, ptr %1, align 4 - store i1 true, ptr %2, align 1 - %3 = load %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, align 4 - call void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %3) - ret void -} - -; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0 - -declare void @printf(ptr, ...) - -declare void @syscall.init() - -attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/compiler/cl/_testrt/structsize/out.ll b/compiler/cl/_testrt/structsize/out.ll deleted file mode 100644 index 3cd36e93..00000000 --- a/compiler/cl/_testrt/structsize/out.ll +++ /dev/null @@ -1,26 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/structsize' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/structsize" - -@"github.com/goplus/llgo/compiler/cl/_testrt/structsize.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/structsize.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/structsize.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/structsize.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/structsize.main"() { -_llgo_0: - %0 = call i32 (ptr, ...) @printf(ptr @0, i64 14) - ret void -} - -declare i32 @printf(ptr, ...) diff --git a/compiler/cl/_testrt/unreachable/out.ll b/compiler/cl/_testrt/unreachable/out.ll deleted file mode 100644 index 8c180a70..00000000 --- a/compiler/cl/_testrt/unreachable/out.ll +++ /dev/null @@ -1,33 +0,0 @@ -; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/unreachable' -source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/unreachable" - -@"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.init$guard" = global i1 false, align 1 -@0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.foo"() { -_llgo_0: - unreachable - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.init"() { -_llgo_0: - %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.init$guard", align 1 - br i1 %0, label %_llgo_2, label %_llgo_1 - -_llgo_1: ; preds = %_llgo_0 - store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.init$guard", align 1 - br label %_llgo_2 - -_llgo_2: ; preds = %_llgo_1, %_llgo_0 - ret void -} - -define void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.main"() { -_llgo_0: - call void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.foo"() - %0 = call i32 (ptr, ...) @printf(ptr @0) - ret void -} - -declare i32 @printf(ptr, ...) diff --git a/compiler/go.mod b/compiler/go.mod deleted file mode 100644 index acd2b395..00000000 --- a/compiler/go.mod +++ /dev/null @@ -1,22 +0,0 @@ -module github.com/goplus/llgo/compiler - -go 1.22.0 - -require ( - github.com/goplus/gogen v1.16.9 - github.com/goplus/llgo v0.10.1 - github.com/goplus/llgo/runtime v0.0.0-00010101000000-000000000000 - github.com/goplus/llvm v0.8.3 - github.com/goplus/mod v0.13.17 - github.com/qiniu/x v1.13.12 - golang.org/x/tools v0.30.0 -) - -require ( - golang.org/x/mod v0.23.0 // indirect - golang.org/x/sync v0.11.0 // indirect -) - -replace github.com/goplus/llgo => ../ - -replace github.com/goplus/llgo/runtime => ../runtime diff --git a/compiler/go.sum b/compiler/go.sum deleted file mode 100644 index a26a1f8d..00000000 --- a/compiler/go.sum +++ /dev/null @@ -1,16 +0,0 @@ -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/goplus/gogen v1.16.9 h1:BRNAsRzdyMcLBOLUe6+suVMmOe+D2HLfF7mAkS4/QW4= -github.com/goplus/gogen v1.16.9/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8= -github.com/goplus/llvm v0.8.3 h1:is1zOwhiQZWtLnOmSMVPO+1sPa2uK/XJ/FjTSfIjGBU= -github.com/goplus/llvm v0.8.3/go.mod h1:PeVK8GgzxwAYCiMiUAJb5wJR6xbhj989tu9oulKLLT4= -github.com/goplus/mod v0.13.17 h1:aWp14xosENrh7t0/0qcIejDmQEiTgI3ou2+KoLDlSlE= -github.com/goplus/mod v0.13.17/go.mod h1:XlHf8mnQ4QkRDX14Of2tpywuHDd+JVpPStvh3egog+0= -github.com/qiniu/x v1.13.12 h1:UyAwja6dgKUOYWZMzzc02wLodwnZ7wmK/0XzRd0e78g= -github.com/qiniu/x v1.13.12/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= diff --git a/cpp/inih/READEME.md b/cpp/inih/READEME.md deleted file mode 100644 index 93ef8a45..00000000 --- a/cpp/inih/READEME.md +++ /dev/null @@ -1,14 +0,0 @@ -LLGo wrapper of benhoyt/inih -===== - -## How to install - -### on macOS (Homebrew) - -```sh -brew install inih -``` - -### on Linux (Debian/Ubuntu) - -TODO diff --git a/cpp/inih/_demo/inihdemo/config.ini b/cpp/inih/_demo/inihdemo/config.ini deleted file mode 100644 index 62e16fc7..00000000 --- a/cpp/inih/_demo/inihdemo/config.ini +++ /dev/null @@ -1,10 +0,0 @@ -; example.ini -[owner] -name = John Doe -organization = Acme Widgets Inc. - -[database] -server = 192.0.2.62 -port = 143 -file = "payroll.dat" -enabled = true diff --git a/cpp/inih/_demo/inihdemo/inihdemo.go b/cpp/inih/_demo/inihdemo/inihdemo.go deleted file mode 100644 index 1de2af69..00000000 --- a/cpp/inih/_demo/inihdemo/inihdemo.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/inih" -) - -func main() { - filename := c.Str("config.ini") - - if inih.Parse(filename, func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int { - println("section:", c.GoString(section), "name:", c.GoString(name), "value:", c.GoString(value)) - return 1 - }, nil) < 0 { - println("Error parsing config file") - return - } - - file := c.Fopen(c.Str("config.ini"), c.Str("r")) - if file == nil { - println("Error opening config file") - return - } else { - if inih.ParseFile(file, func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int { - println("section:", c.GoString(section), "name:", c.GoString(name), "value:", c.GoString(value)) - return 1 - }, nil) < 0 { - println("Error parsing config file") - return - } - c.Fclose(file) - } - - configData := "[settings]\nusername=lee\ntimeout=20" - if inih.ParseString(c.Str(configData), func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int { - println("section:", c.GoString(section), "name:", c.GoString(name), "value:", c.GoString(value)) - return 1 - }, nil) < 0 { - println("Error parsing config file") - return - } else { - println("Config file parsed successfully") - } -} diff --git a/cpp/inih/_demo/inihreader/config.ini b/cpp/inih/_demo/inihreader/config.ini deleted file mode 100644 index 62e16fc7..00000000 --- a/cpp/inih/_demo/inihreader/config.ini +++ /dev/null @@ -1,10 +0,0 @@ -; example.ini -[owner] -name = John Doe -organization = Acme Widgets Inc. - -[database] -server = 192.0.2.62 -port = 143 -file = "payroll.dat" -enabled = true diff --git a/cpp/inih/_demo/inihreader/reader_demo.go b/cpp/inih/_demo/inihreader/reader_demo.go deleted file mode 100644 index 874a9950..00000000 --- a/cpp/inih/_demo/inihreader/reader_demo.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/inih" - "github.com/goplus/llgo/cpp/std" -) - -func demoFromBuffer() { - buf := `[settings] -username=admin -timeout=100 -` - reader := inih.NewReader(c.Str(buf), uintptr(len(buf))) - defer reader.Dispose() - - println(reader.ParseError()) - sec := std.Str("settings") - name := std.Str("timeout") - value := reader.GetInteger(sec, name, 0) - println("value:", value) -} - -func demoFromFile() { - reader := inih.NewReaderFile(std.Str("config.ini")) - defer reader.Dispose() - - if ret := reader.ParseError(); ret != 0 { - println("Error parsing config file:", ret) - return - } - isDatabaseEnabled := reader.GetBoolean(std.Str("database"), std.Str("enabled"), false) - port := reader.GetInteger(std.NewString("database"), std.Str("port"), 0) - s := reader.GetString(std.Str("database"), std.Str("server"), std.Str("unknown")) - println("s:", s.Str()) - println("isDatabaseEnabled:", isDatabaseEnabled, "port:", port) -} - -func main() { - demoFromBuffer() - demoFromFile() -} diff --git a/cpp/inih/_wrap/llgo_check.cpp b/cpp/inih/_wrap/llgo_check.cpp deleted file mode 100644 index 2a1a5bf7..00000000 --- a/cpp/inih/_wrap/llgo_check.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main() { - printf("sizeof(Reader) = %lu\n", sizeof(INIReader)); - return 0; -} diff --git a/cpp/inih/_wrap/llgo_check.go b/cpp/inih/_wrap/llgo_check.go deleted file mode 100644 index a5ae28ec..00000000 --- a/cpp/inih/_wrap/llgo_check.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/inih" -) - -const ( - LLGoCFlags = "$(pkg-config --cflags INIReader)" -) - -func main() { - c.Printf(c.Str("sizeof(Reader) = %lu\n"), unsafe.Sizeof(inih.Reader{})) -} diff --git a/cpp/inih/_wrap/reader.cpp b/cpp/inih/_wrap/reader.cpp deleted file mode 100644 index f7d2c099..00000000 --- a/cpp/inih/_wrap/reader.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include - -extern "C" { - -// ----------------------------------------------------------------------------- - -void INIReaderDispose(INIReader* r) { - r->~INIReader(); -} - -// ----------------------------------------------------------------------------- - -} // extern "C" diff --git a/cpp/inih/inih.go b/cpp/inih/inih.go deleted file mode 100644 index adac5836..00000000 --- a/cpp/inih/inih.go +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package inih - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoFiles = "$(pkg-config --cflags INIReader): _wrap/reader.cpp" - LLGoPackage = "link: $(pkg-config --libs inih INIReader); -linih -lINIReader" -) - -//go:linkname Parse C.ini_parse -func Parse(filename *c.Char, handler func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int, user c.Pointer) c.Int - -//go:linkname ParseFile C.ini_parse_file -func ParseFile(file c.FilePtr, handler func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int, user c.Pointer) c.Int - -//go:linkname ParseString C.ini_parse_string -func ParseString(str *c.Char, handler func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int, user c.Pointer) c.Int diff --git a/cpp/inih/reader.go b/cpp/inih/reader.go deleted file mode 100644 index 3073bb47..00000000 --- a/cpp/inih/reader.go +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package inih - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/std" -) - -// ----------------------------------------------------------------------------- - -// llgo:type C -type Reader struct { - Unused [32]byte -} - -// llgo:link (*Reader).InitFromBuffer C._ZN9INIReaderC1EPKcm -func (r *Reader) InitFromBuffer(buffer *c.Char, bufferSize uintptr) {} - -// llgo:link (*Reader).InitFromFile C._ZN9INIReaderC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE -func (r *Reader) InitFromFile(fileName *std.String) {} - -// llgo:link (*Reader).Dispose C.INIReaderDispose -func (r *Reader) Dispose() {} - -// ----------------------------------------------------------------------------- - -// NewReader creates a new INIReader instance. -func NewReader(buffer *c.Char, bufferSize uintptr) (ret Reader) { - ret.InitFromBuffer(buffer, bufferSize) - return -} - -// NewReaderFile creates a new INIReader instance. -func NewReaderFile(fileName *std.String) (ret Reader) { - ret.InitFromFile(fileName) - return -} - -// ----------------------------------------------------------------------------- - -// llgo:link (*Reader).ParseError C._ZNK9INIReader10ParseErrorEv -func (r *Reader) ParseError() c.Int { return 0 } - -// ----------------------------------------------------------------------------- - -// llgo:link (*Reader).GetInteger C._ZNK9INIReader10GetIntegerERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_l -func (r *Reader) GetInteger(section *std.String, name *std.String, defaultValue c.Long) c.Long { - return 0 -} - -// llgo:link (*Reader).GetBoolean C._ZNK9INIReader10GetBooleanERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_b -func (r *Reader) GetBoolean(section *std.String, name *std.String, defaultValue bool) bool { - return false -} - -// llgo:link (*Reader).GetString C._ZNK9INIReader9GetStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_S8_ -func (r *Reader) GetString(section *std.String, name *std.String, defaultValue *std.String) (ret std.String) { - return -} - -// ----------------------------------------------------------------------------- diff --git a/cpp/llvm/_demo/demangle/demangle.go b/cpp/llvm/_demo/demangle/demangle.go deleted file mode 100644 index 9325c1a6..00000000 --- a/cpp/llvm/_demo/demangle/demangle.go +++ /dev/null @@ -1,34 +0,0 @@ -package main - -import ( - "fmt" - "os" - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/llvm" -) - -func Demangle(mangledName string) *c.Char { - if ret := llvm.ItaniumDemangle(mangledName, true); ret != nil { - return ret - } - if ret := llvm.RustDemangle(mangledName); ret != nil { - return ret - } - return llvm.MicrosoftDemangle(mangledName, nil, nil, 0) -} - -func main() { - if len(os.Args) != 2 { - fmt.Fprintln(os.Stderr, "Usage: demangle symbol") - return - } - mangledName := os.Args[1] - if name := Demangle(mangledName); name != nil { - c.Printf(c.Str("%s\n"), name) - c.Free(unsafe.Pointer(name)) - } else { - fmt.Fprintln(os.Stderr, "Failed to demangle") - } -} diff --git a/cpp/llvm/demangle.go b/cpp/llvm/demangle.go deleted file mode 100644 index 76445958..00000000 --- a/cpp/llvm/demangle.go +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package llvm - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -// Returns a non-NULL pointer to a NUL-terminated C style string -// that should be explicitly freed, if successful. Otherwise, may return -// nullptr if mangled_name is not a valid mangling or is nullptr. -// -// char *itaniumDemangle(std::string_view mangled_name, bool ParseParams = true); -// -//go:linkname ItaniumDemangle C._ZN4llvm15itaniumDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb -func ItaniumDemangle(mangledName StringView, parseParams bool) *c.Char - -/* - enum MSDemangleFlags { - MSDF_None = 0, - MSDF_DumpBackrefs = 1 << 0, - MSDF_NoAccessSpecifier = 1 << 1, - MSDF_NoCallingConvention = 1 << 2, - MSDF_NoReturnType = 1 << 3, - MSDF_NoMemberType = 1 << 4, - MSDF_NoVariableType = 1 << 5, - }; -*/ -type MSDemangleFlags c.Int - -// Demangles the Microsoft symbol pointed at by mangled_name and returns it. -// Returns a pointer to the start of a null-terminated demangled string on -// success, or nullptr on error. -// -// If n_read is non-null and demangling was successful, it receives how many -// bytes of the input string were consumed. -// -// status receives one of the demangle_ enum entries above if it's not nullptr. -// Flags controls various details of the demangled representation. -// -// char *microsoftDemangle(std::string_view mangled_name, size_t *n_read, int *status, MSDemangleFlags Flags = MSDF_None); -// -//go:linkname MicrosoftDemangle C._ZN4llvm17microsoftDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEPmPiNS_15MSDemangleFlagsE -func MicrosoftDemangle(mangledName StringView, nRead *uintptr, status *c.Int, flags MSDemangleFlags) *c.Char - -// Demangles a Rust v0 mangled symbol. -// -// char *rustDemangle(std::string_view MangledName); -// -//go:linkname RustDemangle C._ZN4llvm12rustDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE -func RustDemangle(mangledName StringView) *c.Char - -// ----------------------------------------------------------------------------- diff --git a/cpp/llvm/llvm.go b/cpp/llvm/llvm.go deleted file mode 100644 index 3130750b..00000000 --- a/cpp/llvm/llvm.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package llvm - -// ----------------------------------------------------------------------------- - -const ( - LLGoPackage = "link: $(llvm-config --libs) $(llvm-config --ldflags); -lLLVM" -) - -// StringView represents a C++ std::string_view object. -type StringView = string - -// ----------------------------------------------------------------------------- diff --git a/cpp/std/_demo/cpphello/cppstr.go b/cpp/std/_demo/cpphello/cppstr.go deleted file mode 100644 index 55ed56a1..00000000 --- a/cpp/std/_demo/cpphello/cppstr.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/std" -) - -func main() { - s := std.Str("Hello world\n") - c.Printf(s.CStr()) - print(s.Str(), s.Size(), "\n") -} diff --git a/cpp/std/_wrap/llgo_check.cpp b/cpp/std/_wrap/llgo_check.cpp deleted file mode 100644 index 1149cec3..00000000 --- a/cpp/std/_wrap/llgo_check.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main() { - printf("sizeof(std::string) = %lu\n", sizeof(std::string)); - return 0; -} diff --git a/cpp/std/_wrap/llgo_check.go b/cpp/std/_wrap/llgo_check.go deleted file mode 100644 index 1a0f0e13..00000000 --- a/cpp/std/_wrap/llgo_check.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/std" -) - -func main() { - c.Printf(c.Str("sizeof(std::string) = %lu\n"), unsafe.Sizeof(std.String{})) -} diff --git a/cpp/std/_wrap/string.cpp b/cpp/std/_wrap/string.cpp deleted file mode 100644 index ba17a915..00000000 --- a/cpp/std/_wrap/string.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include - -extern "C" { - -// ----------------------------------------------------------------------------- - -void stdStringInitEmpty(std::string* s) { - new(s) std::string(); -} - -void stdStringInitFrom(std::string* s, std::string* v) { - new(s) std::string(*v); -} - -void stdStringInitFromCStr(std::string* s, const char* cstr) { - new(s) std::string(cstr); -} - -void stdStringInitFromCStrLen(std::string* s, const char* cstr, size_t len) { - new(s) std::string(cstr, len); -} - -void stdStringDispose(std::string* s) { - s->~basic_string(); -} - -// ----------------------------------------------------------------------------- - -const char* stdStringCStr(const std::string* s) { - return s->c_str(); -} - -const char* stdStringData(const std::string* s) { - return s->data(); -} - -size_t stdStringSize(const std::string* s) { - return s->size(); -} - -// ----------------------------------------------------------------------------- - -} // extern "C" diff --git a/cpp/std/std.go b/cpp/std/std.go deleted file mode 100644 index 9de32bff..00000000 --- a/cpp/std/std.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package std - -// ----------------------------------------------------------------------------- - -const ( - LLGoFiles = "_wrap/string.cpp" - LLGoPackage = "link: c++" -) - -// ----------------------------------------------------------------------------- diff --git a/cpp/std/std_gc.go b/cpp/std/std_gc.go deleted file mode 100644 index 21902954..00000000 --- a/cpp/std/std_gc.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build !nogc -// +build !nogc - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package std - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/bdwgc" -) - -// ----------------------------------------------------------------------------- - -func allocString() *String { - ptr := bdwgc.Malloc(unsafe.Sizeof(String{})) - bdwgc.RegisterFinalizer(ptr, func(obj, data c.Pointer) { - (*String)(obj).Dispose() - }, nil, nil, nil) - return (*String)(ptr) -} - -// ----------------------------------------------------------------------------- diff --git a/cpp/std/std_nogc.go b/cpp/std/std_nogc.go deleted file mode 100644 index 20f8c880..00000000 --- a/cpp/std/std_nogc.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build nogc -// +build nogc - -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package std - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -func allocString() *String { - ptr := c.Malloc(unsafe.Sizeof(String{})) - return (*String)(ptr) -} - -// ----------------------------------------------------------------------------- diff --git a/cpp/std/string.go b/cpp/std/string.go deleted file mode 100644 index 5f3b2105..00000000 --- a/cpp/std/string.go +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package std - -import ( - "unsafe" - - "github.com/goplus/llgo/c" -) - -// ----------------------------------------------------------------------------- - -// StringView represents a C++ std::string_view object. -type StringView = string - -// ----------------------------------------------------------------------------- - -// String represents a C++ std::string object. -type String struct { - Unused [3 * unsafe.Sizeof(0)]byte -} - -// llgo:link (*String).InitEmpty C.stdStringInitEmpty -func (s *String) InitEmpty() {} - -// llgo:link (*String).InitFrom C.stdStringInitFrom -func (s *String) InitFrom(v *String) {} - -// llgo:link (*String).InitFromCStr C.stdStringInitFromCStr -func (s *String) InitFromCStr(cstr *c.Char) {} - -// llgo:link (*String).InitFromCStrLen C.stdStringInitFromCStrLen -func (s *String) InitFromCStrLen(cstr *c.Char, n uintptr) {} - -// llgo:link (*String).Dispose C.stdStringDispose -func (s *String) Dispose() {} - -// ----------------------------------------------------------------------------- - -// NewString creates a C++ std::string object. -func NewString(v string) *String { - ret := allocString() - ret.InitFromCStrLen(c.GoStringData(v), uintptr(len(v))) - return ret -} - -// NewStringEmpty creates an empty std::string object. -func NewStringEmpty() *String { - ret := allocString() - ret.InitEmpty() - return ret -} - -// NewStringFrom creates a copy of a C++ std::string object. -func NewStringFrom(v *String) *String { - ret := allocString() - ret.InitFrom(v) - return ret -} - -// NewStringFromCStr creates a C++ std::string object. -func NewStringFromCStr(cstr *c.Char) *String { - ret := allocString() - ret.InitFromCStr(cstr) - return ret -} - -// NewStringFromCStrLen creates a C++ std::string object. -func NewStringFromCStrLen(cstr *c.Char, n uintptr) *String { - ret := allocString() - ret.InitFromCStrLen(cstr, n) - return ret -} - -// ----------------------------------------------------------------------------- - -// Str returns a Go string (it doesn't clone data of the C++ std::string object). -func (s *String) Str() string { - return unsafe.String((*byte)(unsafe.Pointer(s.Data())), s.Size()) -} - -// llgo:link (*String).CStr C.stdStringCStr -func (s *String) CStr() *c.Char { return nil } - -// llgo:link (*String).Data C.stdStringData -func (s *String) Data() *c.Char { return nil } - -// llgo:link (*String).Size C.stdStringSize -func (s *String) Size() uintptr { return 0 } - -// ----------------------------------------------------------------------------- - -// GoString converts a C++ std::string object to a Go string. -func GoString(v *String) string { - return c.GoString(v.Data(), v.Size()) -} - -// Str creates a constant C++ std::string object. -func Str(v string) *String { - return NewString(v) // TODO(xsw): optimize it -} - -// ----------------------------------------------------------------------------- diff --git a/doc/How-to-support-a-C&C++-Library.md b/doc/How-to-support-a-C&C++-Library.md index 14ac8bd6..41980747 100644 --- a/doc/How-to-support-a-C&C++-Library.md +++ b/doc/How-to-support-a-C&C++-Library.md @@ -80,8 +80,8 @@ func Parse(filename *c.Char, handler func(user c.Pointer, section *c.Char, name package main import ( -"github.com/goplus/llgo/c" -"github.com/goplus/llgo/cpp/inih" +"github.com/goplus/lib/c" +"github.com/goplus/lib/cpp/inih" ) func main() { @@ -223,8 +223,8 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/ptrtest" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/ptrtest" ) func main() { @@ -409,9 +409,9 @@ LLGoPackage = "link: $(pkg-config --libs spdlog); -lspdlog -pthread -lfmt") package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/cpp/inih" - "github.com/goplus/llgo/cpp/std" + "github.com/goplus/lib/c" + "github.com/goplus/lib/cpp/inih" + "github.com/goplus/lib/cpp/std" ) func demoFromBuffer() { diff --git a/doc/_readme/llgo_call_cmath/call_cmath.go b/doc/_readme/llgo_call_cmath/call_cmath.go index 90f7888c..cb3366ce 100644 --- a/doc/_readme/llgo_call_cmath/call_cmath.go +++ b/doc/_readme/llgo_call_cmath/call_cmath.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c/math" +import "github.com/goplus/lib/c/math" func main() { println("sqrt(2) =", math.Sqrt(2)) diff --git a/doc/_readme/llgo_call_py/call_py.go b/doc/_readme/llgo_call_py/call_py.go index a35c514f..ce9cf566 100644 --- a/doc/_readme/llgo_call_py/call_py.go +++ b/doc/_readme/llgo_call_py/call_py.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/math" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/math" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/doc/_readme/llgo_py_list/py_list.go b/doc/_readme/llgo_py_list/py_list.go index e88fa011..246be362 100644 --- a/doc/_readme/llgo_py_list/py_list.go +++ b/doc/_readme/llgo_py_list/py_list.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/py" - "github.com/goplus/llgo/py/numpy" - "github.com/goplus/llgo/py/std" + "github.com/goplus/lib/py" + "github.com/goplus/lib/py/numpy" + "github.com/goplus/lib/py/std" ) func main() { diff --git a/doc/_readme/llgo_simple/simple.go b/doc/_readme/llgo_simple/simple.go index 63f1b7f5..9ae684ed 100644 --- a/doc/_readme/llgo_simple/simple.go +++ b/doc/_readme/llgo_simple/simple.go @@ -1,6 +1,6 @@ package main -import "github.com/goplus/llgo/c" +import "github.com/goplus/lib/c" func main() { c.Printf(c.Str("Hello world\n")) diff --git a/doc/_readme/scripts/install_full.sh b/doc/_readme/scripts/install_full.sh index 316dc229..f0cd304e 100644 --- a/doc/_readme/scripts/install_full.sh +++ b/doc/_readme/scripts/install_full.sh @@ -1,9 +1,9 @@ # shellcheck disable=all git clone https://github.com/goplus/llgo.git -cd llgo/compiler +cd llgo go install -v ./cmd/... go install -v ./chore/... # compile all tools except pydump -export LLGO_ROOT=$PWD/.. -cd ../_xtool +export LLGO_ROOT=$PWD +cd _xtool llgo install ./... # compile pydump go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch diff --git a/doc/_readme/scripts/install_macos.sh b/doc/_readme/scripts/install_macos.sh index 187fb16c..1563e894 100644 --- a/doc/_readme/scripts/install_macos.sh +++ b/doc/_readme/scripts/install_macos.sh @@ -1,6 +1,8 @@ # shellcheck disable=all +DIR=$(cd "$(dirname "$0")" && pwd) brew update brew install llvm@19 lld@19 bdw-gc openssl cjson libffi libuv pkg-config brew install python@3.12 # optional brew link --overwrite lld@19 libffi -curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash +# curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash +cat ${DIR}/../../../install.sh | bash diff --git a/doc/_readme/scripts/install_ubuntu.sh b/doc/_readme/scripts/install_ubuntu.sh index 9fa854b9..87b3285f 100644 --- a/doc/_readme/scripts/install_ubuntu.sh +++ b/doc/_readme/scripts/install_ubuntu.sh @@ -4,4 +4,5 @@ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-get update sudo apt-get install -y llvm-19-dev clang-19 libclang-19-dev lld-19 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-dev libuv1-dev sudo apt-get install -y python3.12-dev # optional -curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash +#curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash +cat ../../../install.sh | bash diff --git a/go.mod b/go.mod index 05a4850b..77521392 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,22 @@ module github.com/goplus/llgo -go 1.20 +go 1.22.0 -retract v0.8.0 +toolchain go1.24.1 + +require ( + github.com/goplus/gogen v1.16.9 + github.com/goplus/lib v0.1.0 + github.com/goplus/llgo/runtime v0.0.0-20250403035532-0a8a4eb6a653 + github.com/goplus/llvm v0.8.3 + github.com/goplus/mod v0.13.17 + github.com/qiniu/x v1.13.12 + golang.org/x/tools v0.30.0 +) + +require ( + golang.org/x/mod v0.23.0 // indirect + golang.org/x/sync v0.11.0 // indirect +) + +replace github.com/goplus/llgo/runtime => ./runtime diff --git a/go.sum b/go.sum index e69de29b..17f6f53c 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,18 @@ +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/goplus/gogen v1.16.9 h1:BRNAsRzdyMcLBOLUe6+suVMmOe+D2HLfF7mAkS4/QW4= +github.com/goplus/gogen v1.16.9/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8= +github.com/goplus/lib v0.1.0 h1:kqMAC6FmVPfrw0q8E5yF6Y12WC4GOfi2L/MYS4QoxbQ= +github.com/goplus/lib v0.1.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0= +github.com/goplus/llvm v0.8.3 h1:is1zOwhiQZWtLnOmSMVPO+1sPa2uK/XJ/FjTSfIjGBU= +github.com/goplus/llvm v0.8.3/go.mod h1:PeVK8GgzxwAYCiMiUAJb5wJR6xbhj989tu9oulKLLT4= +github.com/goplus/mod v0.13.17 h1:aWp14xosENrh7t0/0qcIejDmQEiTgI3ou2+KoLDlSlE= +github.com/goplus/mod v0.13.17/go.mod h1:XlHf8mnQ4QkRDX14Of2tpywuHDd+JVpPStvh3egog+0= +github.com/qiniu/x v1.13.12 h1:UyAwja6dgKUOYWZMzzc02wLodwnZ7wmK/0XzRd0e78g= +github.com/qiniu/x v1.13.12/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E= +golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= +golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= diff --git a/install.sh b/install.sh index 0e174860..059f1331 100755 --- a/install.sh +++ b/install.sh @@ -40,7 +40,6 @@ get_system_info() { # Function to install from local source install_local() { echo "Installing llgo from local source..." - cd compiler go install ./cmd/llgo echo "Local installation complete." echo "llgo is now available in your GOPATH." diff --git a/compiler/internal/build/build.go b/internal/build/build.go similarity index 98% rename from compiler/internal/build/build.go rename to internal/build/build.go index ece80d33..c36786d5 100644 --- a/compiler/internal/build/build.go +++ b/internal/build/build.go @@ -36,17 +36,17 @@ import ( "golang.org/x/tools/go/ssa" - "github.com/goplus/llgo/compiler/cl" - "github.com/goplus/llgo/compiler/internal/env" - "github.com/goplus/llgo/compiler/internal/mockable" - "github.com/goplus/llgo/compiler/internal/packages" - "github.com/goplus/llgo/compiler/internal/typepatch" - "github.com/goplus/llgo/compiler/ssa/abi" + "github.com/goplus/llgo/cl" + "github.com/goplus/llgo/internal/env" + "github.com/goplus/llgo/internal/mockable" + "github.com/goplus/llgo/internal/packages" + "github.com/goplus/llgo/internal/typepatch" + "github.com/goplus/llgo/ssa/abi" xenv "github.com/goplus/llgo/xtool/env" "github.com/goplus/llgo/xtool/env/llvm" - llssa "github.com/goplus/llgo/compiler/ssa" llruntime "github.com/goplus/llgo/runtime" + llssa "github.com/goplus/llgo/ssa" clangCheck "github.com/goplus/llgo/xtool/clang/check" ) diff --git a/compiler/internal/build/build_test.go b/internal/build/build_test.go similarity index 84% rename from compiler/internal/build/build_test.go rename to internal/build/build_test.go index 07c451e0..c6d5d919 100644 --- a/compiler/internal/build/build_test.go +++ b/internal/build/build_test.go @@ -8,7 +8,7 @@ import ( "os" "testing" - "github.com/goplus/llgo/compiler/internal/mockable" + "github.com/goplus/llgo/internal/mockable" ) func mockRun(args []string, cfg *Config) { @@ -57,10 +57,10 @@ func TestRun(t *testing.T) { mockRun([]string{"-v", "../../cl/_testgo/print"}, &Config{Mode: ModeRun}) } -func TestTest(t *testing.T) { - mockRun([]string{"-v", "../../../_demo/runtest"}, &Config{Mode: ModeTest}) +func _TestTest(t *testing.T) { + mockRun([]string{"-v", "../../_demo/runtest"}, &Config{Mode: ModeTest}) } func TestCmpTest(t *testing.T) { - mockRun([]string{"-v", "../../../_demo/runtest"}, &Config{Mode: ModeCmpTest}) + mockRun([]string{"-v", "../../_demo/runtest"}, &Config{Mode: ModeCmpTest}) } diff --git a/compiler/internal/build/cgo.go b/internal/build/cgo.go similarity index 99% rename from compiler/internal/build/cgo.go rename to internal/build/cgo.go index e925438e..ed8754ad 100644 --- a/compiler/internal/build/cgo.go +++ b/internal/build/cgo.go @@ -28,8 +28,8 @@ import ( "regexp" "strings" - "github.com/goplus/llgo/compiler/internal/buildtags" - llssa "github.com/goplus/llgo/compiler/ssa" + "github.com/goplus/llgo/internal/buildtags" + llssa "github.com/goplus/llgo/ssa" "github.com/goplus/llgo/xtool/safesplit" ) diff --git a/compiler/internal/build/clean.go b/internal/build/clean.go similarity index 97% rename from compiler/internal/build/clean.go rename to internal/build/clean.go index b915ff2d..60ec5f46 100644 --- a/compiler/internal/build/clean.go +++ b/internal/build/clean.go @@ -22,7 +22,7 @@ import ( "path" "path/filepath" - "github.com/goplus/llgo/compiler/internal/packages" + "github.com/goplus/llgo/internal/packages" ) var ( diff --git a/compiler/internal/build/cmptest.go b/internal/build/cmptest.go similarity index 100% rename from compiler/internal/build/cmptest.go rename to internal/build/cmptest.go diff --git a/compiler/internal/buildtags/buildtags.go b/internal/buildtags/buildtags.go similarity index 100% rename from compiler/internal/buildtags/buildtags.go rename to internal/buildtags/buildtags.go diff --git a/compiler/internal/buildtags/buildtags_test.go b/internal/buildtags/buildtags_test.go similarity index 100% rename from compiler/internal/buildtags/buildtags_test.go rename to internal/buildtags/buildtags_test.go diff --git a/compiler/internal/env/build.go b/internal/env/build.go similarity index 100% rename from compiler/internal/env/build.go rename to internal/env/build.go diff --git a/compiler/internal/env/env.go b/internal/env/env.go similarity index 92% rename from compiler/internal/env/env.go rename to internal/env/env.go index 09246f60..f28fd8ae 100644 --- a/compiler/internal/env/env.go +++ b/internal/env/env.go @@ -14,7 +14,7 @@ const ( LLGoCompilerPkg = "github.com/goplus/llgo" LLGoRuntimePkgName = "runtime" LLGoRuntimePkg = LLGoCompilerPkg + "/" + LLGoRuntimePkgName - envFileName = "/compiler/internal/env/env.go" + envFileName = "/internal/env/env.go" ) func GOROOT() string { @@ -89,12 +89,12 @@ func isLLGoRoot(root string) (string, bool) { return "", false } // Check for go.mod - data, err := os.ReadFile(filepath.Join(root, LLGoRuntimePkgName, "go.mod")) + data, err := os.ReadFile(filepath.Join(root, "go.mod")) if err != nil { return "", false } // Check module name - if !strings.Contains(string(data), "module "+LLGoRuntimePkg+"\n") { + if !strings.Contains(string(data), "module "+LLGoCompilerPkg+"\n") { return "", false } return root, true diff --git a/compiler/internal/env/env_test.go b/internal/env/env_test.go similarity index 83% rename from compiler/internal/env/env_test.go rename to internal/env/env_test.go index 788c45a0..0a0d43f2 100644 --- a/compiler/internal/env/env_test.go +++ b/internal/env/env_test.go @@ -41,15 +41,13 @@ func TestLLGoRuntimeDir(t *testing.T) { defer os.Setenv("LLGO_ROOT", origLLGoRoot) tmpDir := t.TempDir() - runtimeDir := filepath.Join(tmpDir, "runtime") - os.MkdirAll(runtimeDir, 0755) - goModContent := []byte("module github.com/goplus/llgo/runtime\n") - if err := os.WriteFile(filepath.Join(runtimeDir, "go.mod"), goModContent, 0644); err != nil { + goModContent := []byte("module github.com/goplus/llgo\n") + if err := os.WriteFile(filepath.Join(tmpDir, "go.mod"), goModContent, 0644); err != nil { t.Fatal(err) } os.Setenv("LLGO_ROOT", tmpDir) - expected := runtimeDir + expected := filepath.Join(tmpDir, LLGoRuntimePkgName) if got := LLGoRuntimeDir(); got != expected { t.Errorf("LLGoRuntimeDir() = %v, want %v", got, expected) } @@ -65,7 +63,7 @@ func TestLLGoRuntimeDir(t *testing.T) { if err != nil { t.Fatal(err) } - runtimeDir := filepath.Join(wd, "../../../runtime") + runtimeDir := filepath.Join(wd, "../../runtime") if got := LLGoRuntimeDir(); got != runtimeDir { t.Errorf("LLGoRuntimeDir() = %v, want %v", got, runtimeDir) } @@ -80,7 +78,7 @@ func TestLLGoRuntimeDir(t *testing.T) { if err != nil { t.Fatal(err) } - runtimeDir := filepath.Join(wd, "../../../runtime") + runtimeDir := filepath.Join(wd, "../../runtime") if got := LLGoRuntimeDir(); got != runtimeDir { t.Errorf("LLGoRuntimeDir() = %v, want %v", got, runtimeDir) } @@ -94,10 +92,8 @@ func TestLLGoROOT(t *testing.T) { defer os.Setenv("LLGO_ROOT", origLLGoRoot) tmpDir := t.TempDir() - runtimeDir := filepath.Join(tmpDir, "runtime") - os.MkdirAll(runtimeDir, 0755) - goModContent := []byte("module github.com/goplus/llgo/runtime\n") - if err := os.WriteFile(filepath.Join(runtimeDir, "go.mod"), goModContent, 0644); err != nil { + goModContent := []byte("module github.com/goplus/llgo\n") + if err := os.WriteFile(filepath.Join(tmpDir, "go.mod"), goModContent, 0644); err != nil { t.Fatal(err) } @@ -117,7 +113,7 @@ func TestLLGoROOT(t *testing.T) { if err != nil { t.Fatal(err) } - rootDir := filepath.Join(wd, "../../..") + rootDir := filepath.Join(wd, "../..") if got := LLGoROOT(); got != rootDir { t.Errorf("LLGoROOT() = %v, want %v", got, rootDir) } @@ -174,10 +170,8 @@ func TestIsLLGoRoot(t *testing.T) { // Test with valid path and valid go.mod t.Run("valid path and go.mod", func(t *testing.T) { tmpDir := t.TempDir() - runtimeDir := filepath.Join(tmpDir, "runtime") - os.MkdirAll(runtimeDir, 0755) - goModContent := []byte("module github.com/goplus/llgo/runtime\n") - if err := os.WriteFile(filepath.Join(runtimeDir, "go.mod"), goModContent, 0644); err != nil { + goModContent := []byte("module github.com/goplus/llgo\n") + if err := os.WriteFile(filepath.Join(tmpDir, "go.mod"), goModContent, 0644); err != nil { t.Fatal(err) } diff --git a/compiler/internal/env/version.go b/internal/env/version.go similarity index 100% rename from compiler/internal/env/version.go rename to internal/env/version.go diff --git a/compiler/internal/llgen/llgen.go b/internal/llgen/llgen.go similarity index 100% rename from compiler/internal/llgen/llgen.go rename to internal/llgen/llgen.go diff --git a/compiler/internal/llgen/llgenf.go b/internal/llgen/llgenf.go similarity index 98% rename from compiler/internal/llgen/llgenf.go rename to internal/llgen/llgenf.go index f7af75aa..2e33ee67 100644 --- a/compiler/internal/llgen/llgenf.go +++ b/internal/llgen/llgenf.go @@ -22,7 +22,7 @@ import ( "path/filepath" "strings" - "github.com/goplus/llgo/compiler/internal/build" + "github.com/goplus/llgo/internal/build" ) func GenFrom(fileOrPkg string) string { diff --git a/compiler/internal/mockable/mockable.go b/internal/mockable/mockable.go similarity index 100% rename from compiler/internal/mockable/mockable.go rename to internal/mockable/mockable.go diff --git a/compiler/internal/packages/load.go b/internal/packages/load.go similarity index 100% rename from compiler/internal/packages/load.go rename to internal/packages/load.go diff --git a/compiler/internal/typepatch/patch.go b/internal/typepatch/patch.go similarity index 100% rename from compiler/internal/typepatch/patch.go rename to internal/typepatch/patch.go diff --git a/llgo.sh b/llgo.sh index 5a1943ef..709425ce 100755 --- a/llgo.sh +++ b/llgo.sh @@ -5,7 +5,7 @@ WORKDIR=$(pwd) LLGO_ROOT='' LLGO_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd ) export LLGO_ROOT -cd $LLGO_ROOT/compiler +cd $LLGO_ROOT go install ./cmd/llgo cd $WORKDIR llgo "$@" diff --git a/py/README.md b/py/README.md deleted file mode 100644 index 32479857..00000000 --- a/py/README.md +++ /dev/null @@ -1,33 +0,0 @@ -Linking Python to Go -===== - -TODO - -## Demo - -The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it): - -* [hellopy](_demo/hellopy/hello.go): link Python to Go and say `Hello world` -* [clpy](_demo/clpy/cleval.go): compile Python code and eval. -* [callpy](_demo/callpy/call.go): call Python standard library function `math.sqrt`. - -### How to run demos - -To run the demos in directory `_demo`, you need to set the `LLGO_LIB_PYTHON` environment variable first. Assuming you use Python 3.12, and the `libpython3.12.so` (or `libpython3.12.dylib` or `python3.12.lib`) file is in the /foo/bar directory, then you need to set `LLGO_LIB_PYTHON` to: - -```sh -export LLGO_LIB_PYTHON=/foo/bar/python3.12 -``` - -For example, `/opt/homebrew/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib` is a typical python lib location under macOS. So we should set it like this: - -```sh -export LLGO_LIB_PYTHON=/opt/homebrew/Frameworks/Python.framework/Versions/3.12/lib/python3.12 -``` - -Then you can run the demos in directory `_demo`: - -```sh -cd # eg. cd _demo/hellopy -llgo run . -``` diff --git a/py/_demo/callpy/call.go b/py/_demo/callpy/call.go deleted file mode 100644 index 0198b8c4..00000000 --- a/py/_demo/callpy/call.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" -) - -func main() { - py.Initialize() - py.SetProgramName(*c.Argv) - math := py.ImportModule(c.Str("math")) - sqrt := math.GetAttrString(c.Str("sqrt")) - sqrt2 := sqrt.CallOneArg(py.Float(2)) - c.Printf(c.Str("sqrt(2) = %f\n"), sqrt2.Float64()) - sqrt2.DecRef() - sqrt.DecRef() - math.DecRef() - py.Finalize() -} diff --git a/py/_demo/clpy/cleval.go b/py/_demo/clpy/cleval.go deleted file mode 100644 index 5b67bc1e..00000000 --- a/py/_demo/clpy/cleval.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" -) - -func main() { - py.Initialize() - py.SetProgramName(*c.Argv) - code := py.CompileString(c.Str(`print('Hello, World!')`), c.Str(`hello.py`), py.EvalInput) - if code != nil { - mod := py.ImportModule(c.Str("__main__")) - gbl := mod.ModuleGetDict() - - result := py.EvalCode(code, gbl, nil) - - result.DecRef() - mod.DecRef() - code.DecRef() - } - py.Finalize() -} diff --git a/py/_demo/hellopy/hello.go b/py/_demo/hellopy/hello.go deleted file mode 100644 index d0f7de52..00000000 --- a/py/_demo/hellopy/hello.go +++ /dev/null @@ -1,13 +0,0 @@ -package main - -import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/py" -) - -func main() { - py.Initialize() - py.SetProgramName(*c.Argv) - py.RunSimpleString(c.Str(`print('Hello, World!')`)) - py.Finalize() -} diff --git a/py/_pyg/llpyg/llpyg.c b/py/_pyg/llpyg/llpyg.c deleted file mode 100644 index a2af9c44..00000000 --- a/py/_pyg/llpyg/llpyg.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include - -typedef struct PyObject PyObject; - -void Py_Initialize(); - -PyObject* PyImport_ImportModule(const char* modName); -PyObject* PyModule_GetDict(PyObject* mod); -PyObject* PyObject_Str(PyObject* obj); -PyObject* PyDict_Keys(PyObject* dict); -PyObject* PyList_GetItem(PyObject* list, size_t index); -PyObject* PyTuple_GetItem(PyObject* tuple, size_t index); -PyObject* PyObject_GetAttr(PyObject* mod, PyObject* attrName); -PyObject* PyObject_GetAttrString(PyObject* mod, const char* attrName); -PyObject* PyObject_CallOneArg(PyObject* fn, PyObject* arg); - -const char* PyUnicode_AsUTF8(PyObject* str); - -size_t PyList_Size(PyObject* list); - -int PyCallable_Check(PyObject*); - -int main() { - Py_Initialize(); - PyObject* inspect = PyImport_ImportModule("inspect"); - PyObject* signature = PyObject_GetAttrString(inspect, "signature"); - PyObject* mod = PyImport_ImportModule("numpy"); - PyObject* dict = PyModule_GetDict(mod); - PyObject* keys = PyDict_Keys(dict); - size_t i, n; - n = PyList_Size(keys); - for (i = 0; i < n; i++) { - PyObject* key = PyList_GetItem(keys, i); - PyObject* val = PyObject_GetAttr(mod, key); - if (PyCallable_Check(val) != 0) { - PyObject* doc = PyObject_GetAttrString(val, "__doc__"); - PyObject* sig = PyObject_CallOneArg(signature, val); - printf("-----------------------------------\n"); - printf("sig: %p\n", sig); - printf("%s: %s\n", PyUnicode_AsUTF8(key), PyUnicode_AsUTF8(PyObject_Str(sig))); - printf("%s\n", PyUnicode_AsUTF8(key)); - if (doc != NULL) { - printf("%s\n", PyUnicode_AsUTF8(doc)); - } - } - } - return 0; -} diff --git a/py/_pyg/module.c b/py/_pyg/module.c deleted file mode 100644 index 571116d0..00000000 --- a/py/_pyg/module.c +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include -#include - -// example: -// llgoLoadPyModSyms(mod, "name1", &func1, "name2", &func2, NULL) - -typedef struct PyObject PyObject; - -PyObject* PyObject_GetAttrString(PyObject* mod, const char* attrName); - -void llgoLoadPyModSyms(PyObject* mod, ...) { - va_list ap; - va_start(ap, mod); - for (;;) { - const char* name = va_arg(ap, const char*); - if (name == NULL) { - break; - } - PyObject** pfunc = va_arg(ap, PyObject**); - if (*pfunc == NULL) { - *pfunc = PyObject_GetAttrString(mod, name); - } - } - va_end(ap); -} - -/* -wchar_t* toWcs(const char* str) { - size_t len = mbstowcs(NULL, str, 0); - wchar_t* wstr = (wchar_t*)malloc((len + 1) * sizeof(wchar_t)); - mbstowcs(wstr, str, len + 1); - return wstr; -} - -char* toMbs(const wchar_t* str) { - size_t len = wcstombs(NULL, str, 0); - char* mstr = (char*)malloc(len + 1); - wcstombs(mstr, str, len + 1); - return mstr; -} - -wchar_t *Py_GetPath(); - -void Py_SetPath(const wchar_t* path); -void Py_Initialize(); - -void llgoPyInitialize() { - setenv("PYTHONPATH", "/opt/homebrew/lib/python3.12/site-packages", 1); - Py_Initialize(); - printf("sys.path = %s\n", toMbs(Py_GetPath())); -} -*/ diff --git a/py/arg.go b/py/arg.go deleted file mode 100644 index aca2fd89..00000000 --- a/py/arg.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/arg.html - -// Create a new value based on a format string similar to those accepted by the -// PyArg_Parse* family of functions and a sequence of values. Returns the value or -// nil in the case of an error; an exception will be raised if nil is returned. -// See https://docs.python.org/3/c-api/arg.html#c.Py_BuildValue -// -//go:linkname BuildValue C.Py_BuildValue -func BuildValue(format *c.Char, __llgo_va_list ...any) *Object diff --git a/py/bytes.go b/py/bytes.go deleted file mode 100644 index 52f0275f..00000000 --- a/py/bytes.go +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -/* - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/bytes.html - -// String returns a new bytes object from a C string. -// -//go:linkname FromCStr C.PyBytes_FromString -func FromCStr(s *c.Char) *Object - -// FromString returns a new bytes object from a Go string. -func FromString(s string) *Object { - return stringFromStringAndSize(c.GoStringData(s), uintptr(len(s))) -} - -//go:linkname stringFromStringAndSize C.PyBytes_FromStringAndSize -func stringFromStringAndSize(s *c.Char, size uintptr) *Object - -// CStr returns the content of a bytes object as a C string. -// -// llgo:link (*Object).CStr C.PyBytes_AsString -func (o *Object) CStr() *c.Char { return nil } - -// llgo:link (*Object).Strlen C.PyBytes_Size -func (o *Object) Strlen() uintptr { return 0 } - -*/ diff --git a/py/call.go b/py/call.go deleted file mode 100644 index 807d0924..00000000 --- a/py/call.go +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/call.html - -// Determine if the object o is callable. Return 1 if the object is callable and -// 0 otherwise. This function always succeeds. -// -// llgo:link (*Object).Callable C.PyCallable_Check -func (o *Object) Callable() c.Int { return 0 } - -// Call a callable Python object o, with arguments given by the tuple args, and -// named arguments given by the dictionary kwargs. -// -// args must not be nil; use an empty tuple if no arguments are needed. If no named -// arguments are needed, kwargs can be nil. -// -// Return the result of the call on success, or raise an exception and return nil -// on failure. -// -// This is the equivalent of the Python expression: o(*args, **kwargs). -// -// llgo:link (*Object).Call C.PyObject_Call -func (o *Object) Call(args, kwargs *Object) *Object { return nil } - -// Call a callable Python object callable without any arguments. It is the most -// efficient way to call a callable Python object without any argument. -// -// Return the result of the call on success, or raise an exception and return nil -// on failure. -// -// llgo:link (*Object).CallNoArgs C.PyObject_CallNoArgs -func (o *Object) CallNoArgs() *Object { return nil } - -// Call a callable Python object callable with exactly 1 positional argument arg -// and no keyword arguments. -// -// Return the result of the call on success, or raise an exception and return nil -// on failure. -// -// llgo:link (*Object).CallOneArg C.PyObject_CallOneArg -func (o *Object) CallOneArg(arg *Object) *Object { return nil } - -// Call a callable Python object o, with arguments given by the tuple args. If no -// arguments are needed, then args can be nil. -// -// Return the result of the call on success, or raise an exception and return nil -// on failure. -// -// This is the equivalent of the Python expression: o(*args). -// -// llgo:link (*Object).CallObject C.PyObject_CallObject -func (o *Object) CallObject(args *Object) *Object { return nil } - -// Call a callable Python object o, with a variable number of C arguments. The C -// arguments are described using a py.BuildValue style format string. The format -// can be nil, indicating that no arguments are provided. -// -// Return the result of the call on success, or raise an exception and return nil -// on failure. -// -// This is the equivalent of the Python expression: o(*args). -// -// Note that if you only pass PyObject* args, (*Object).CallFunctionObjArgs is a -// faster alternative. -// -// llgo:link (*Object).CallFunction C.PyObject_CallFunction -func (o *Object) CallFunction(format *c.Char, __llgo_va_list ...any) *Object { return nil } - -// Call a callable Python object o, with a variable number of PyObject* arguments. -// The arguments are provided as a variable number of parameters followed by nil. -// -// Return the result of the call on success, or raise an exception and return nil -// on failure. -// -// This is the equivalent of the Python expression: o(arg1, arg2, ...). -// -// llgo:link (*Object).CallFunctionObjArgs C.PyObject_CallFunctionObjArgs -func (o *Object) CallFunctionObjArgs(__llgo_va_list ...any) *Object { return nil } - -// llgo:link (*Object).CallMethod C.PyObject_CallMethod -func (o *Object) CallMethod(name *c.Char, format *c.Char, __llgo_va_list ...any) *Object { - return nil -} - -// llgo:link (*Object).CallMethodObjArgs C.PyObject_CallMethodObjArgs -func (o *Object) CallMethodObjArgs(name *Object, __llgo_va_list ...any) *Object { return nil } - -// llgo:link (*Object).Vectorcall C.PyObject_Vectorcall -func (o *Object) Vectorcall(args **Object, nargs uintptr, kwnames *Object) *Object { - return nil -} - -// llgo:link (*Object).VectorcallDict C.PyObject_VectorcallDict -func (o *Object) VectorcallDict(args **Object, nargs uintptr, kwdict *Object) *Object { - return nil -} - -// llgo:link (*Object).VectorcallMethod C.PyObject_VectorcallMethod -func (o *Object) VectorcallMethod(name *Object, args **Object, nargs uintptr, kwnames *Object) *Object { - return nil -} - -// ----------------------------------------------------------------------------- diff --git a/py/code.go b/py/code.go deleted file mode 100644 index 1e0468c6..00000000 --- a/py/code.go +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/code.html - -// Equivalent to the Python code getattr(co, 'co_code'). Returns a strong -// reference to a BytesObject representing the bytecode in a code object. -// On error, nil is returned and an exception is raised. -// -// This BytesObject may be created on-demand by the interpreter and does -// not necessarily represent the bytecode actually executed by CPython. -// The primary use case for this function is debuggers and profilers. -// -// llgo:link (*Object).CodeBytes C.PyCode_GetCode -func (o *Object) CodeBytes() *Object { return nil } - -// Equivalent to the Python code getattr(co, 'co_varnames'). Returns a new -// reference to a TupleObject containing the names of the local variables. -// On error, nil is returned and an exception is raised. -// -// llgo:link (*Object).CodeVarnames C.PyCode_GetVarnames -func (o *Object) CodeVarnames() *Object { return nil } diff --git a/py/dict.go b/py/dict.go deleted file mode 100644 index 4a837e61..00000000 --- a/py/dict.go +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/dict.html - -// Return a new empty dictionary, or nil on failure. -// -//go:linkname NewDict C.PyDict_New -func NewDict() *Object - -// Return a ListObject containing all the keys from the dictionary. -// -// llgo:link (*Object).DictKeys C.PyDict_Keys -func (d *Object) DictKeys() *Object { return nil } - -// Return a ListObject containing all the values from the dictionary. -// -// llgo:link (*Object).DictValues C.PyDict_Values -func (d *Object) DictValues() *Object { return nil } - -// Return a ListObject containing all the items from the dictionary. -// -// llgo:link (*Object).DictItems C.PyDict_Items -func (d *Object) DictItems() *Object { return nil } - -// Insert val into the dictionary d with a key of key. key must be hashable; -// if it isn’t, return -1 and TypeError will be set. Return 0 on success or -// -1 on failure. -// -// llgo:link (*Object).DictSetItem C.PyDict_SetItem -func (d *Object) DictSetItem(key *Object, val *Object) *Object { return nil } - -// Return the object from dictionary d which has a key key. Return nil if the -// key key is not present, but without setting an exception. -// -// llgo:link (*Object).DictGetItem C.PyDict_GetItem -func (d *Object) DictGetItem(key *Object) *Object { return nil } - -// Return the number of items in the dictionary. -// -// llgo:link (*Object).DictSize C.PyDict_Size -func (d *Object) DictSize() int { return 0 } - -// ----------------------------------------------------------------------------- diff --git a/py/exceptions.go b/py/exceptions.go deleted file mode 100644 index cd9da49d..00000000 --- a/py/exceptions.go +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/exceptions.html - -// Clear the error indicator. If the error indicator is not set, there is -// no effect. -// -//go:linkname ErrClear C.PyErr_Clear -func ErrClear() - -//go:linkname ErrPrint C.PyErr_Print -func ErrPrint() diff --git a/py/float.go b/py/float.go deleted file mode 100644 index 1cfa7a38..00000000 --- a/py/float.go +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/float.html - -//go:linkname Float C.PyFloat_FromDouble -func Float(v float64) *Object - -//go:linkname FloatFromSring C.PyFloat_FromString -func FloatFromSring(v *Object) *Object - -// llgo:link (*Object).Float64 C.PyFloat_AsDouble -func (o *Object) Float64() float64 { return 0 } diff --git a/py/func.go b/py/func.go deleted file mode 100644 index 8d1dc6b9..00000000 --- a/py/func.go +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/function.html - -// Return a new function object associated with the code object code. -// globals must be a dictionary with the global variables accessible -// to the function. -// -// The function’s docstring and name are retrieved from the code object. -// __module__ is retrieved from globals. The argument defaults, annotations -// and closure are set to nil. __qualname__ is set to the same value as -// the code object’s co_qualname field. -// -//go:linkname NewFunc C.PyFunction_New -func NewFunc(code, globals *Object) *Object - -// As NewFunc, but also allows setting the function object’s __qualname__ -// attribute. qualname should be a unicode object or nil; if nil, the -// __qualname__ attribute is set to the same value as the code object’s -// co_qualname field. -// -//go:linkname NewFuncWithQualName C.PyFunction_NewWithQualName -func NewFuncWithQualName(code, globals, qualname *Object) *Object - -/* -// Return true if o is a function object (has type PyFunction_Type). The -// parameter must not be nil. This function always succeeds. -// -//- llgo:link (*Object).FuncCheck C.PyFunction_Check -func (o *Object) FuncCheck() c.Int { return 0 } -*/ - -// Return the code object associated with the function object op. -// -// llgo:link (*Object).FuncCode C.PyFunction_GetCode -func (f *Object) FuncCode() *Object { return nil } diff --git a/py/inspect/doc.txt b/py/inspect/doc.txt deleted file mode 100644 index 1f24518d..00000000 --- a/py/inspect/doc.txt +++ /dev/null @@ -1,14 +0,0 @@ -// https://docs.python.org/3/library/inspect.html - -// Return a signature object for the given callable. -// -//go:linkname Signature py.signature -func Signature(callable *py.Object) *py.Object - -// Get the names and default values of a Python function’s parameters. A named -// tuple is returned: -// -// FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations) -// -//go:linkname Getfullargspec py.getfullargspec -func Getfullargspec(f *py.Object) *py.Object diff --git a/py/inspect/gen.go b/py/inspect/gen.go deleted file mode 100644 index bc33a183..00000000 --- a/py/inspect/gen.go +++ /dev/null @@ -1,617 +0,0 @@ -package inspect - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.inspect" - -// Compute the annotations dict for an object. -// -// obj may be a callable, class, or module. -// Passing in an object of any other type raises TypeError. -// -// Returns a dict. get_annotations() returns a new dict every time -// it's called; calling it twice on the same object will return two -// different but equivalent dicts. -// -// This function handles several details for you: -// -// * If eval_str is true, values of type str will -// be un-stringized using eval(). This is intended -// for use with stringized annotations -// ("from __future__ import annotations"). -// * If obj doesn't have an annotations dict, returns an -// empty dict. (Functions and methods always have an -// annotations dict; classes, modules, and other types of -// callables may not.) -// * Ignores inherited annotations on classes. If a class -// doesn't have its own annotations dict, returns an empty dict. -// * All accesses to object members and dict values are done -// using getattr() and dict.get() for safety. -// * Always, always, always returns a freshly-created dict. -// -// eval_str controls whether or not values of type str are replaced -// with the result of calling eval() on those values: -// -// * If eval_str is true, eval() is called on values of type str. -// * If eval_str is false (the default), values of type str are unchanged. -// -// globals and locals are passed in to eval(); see the documentation -// for eval() for more information. If either globals or locals is -// None, this function may replace that value with a context-specific -// default, contingent on type(obj): -// -// * If obj is a module, globals defaults to obj.__dict__. -// * If obj is a class, globals defaults to -// sys.modules[obj.__module__].__dict__ and locals -// defaults to the obj class namespace. -// * If obj is a callable, globals defaults to obj.__globals__, -// although if obj is a wrapped function (using -// functools.update_wrapper()) it is first unwrapped. -// -//go:linkname GetAnnotations py.get_annotations -func GetAnnotations(obj *py.Object) *py.Object - -// Return true if the object is a module. -// -//go:linkname Ismodule py.ismodule -func Ismodule(object *py.Object) *py.Object - -// Return true if the object is a class. -// -//go:linkname Isclass py.isclass -func Isclass(object *py.Object) *py.Object - -// Return true if the object is an instance method. -// -//go:linkname Ismethod py.ismethod -func Ismethod(object *py.Object) *py.Object - -// Return true if the object is a method descriptor. -// -// But not if ismethod() or isclass() or isfunction() are true. -// -// This is new in Python 2.2, and, for example, is true of int.__add__. -// An object passing this test has a __get__ attribute but not a __set__ -// attribute, but beyond that the set of attributes varies. __name__ is -// usually sensible, and __doc__ often is. -// -// Methods implemented via descriptors that also pass one of the other -// tests return false from the ismethoddescriptor() test, simply because -// the other tests promise more -- you can, e.g., count on having the -// __func__ attribute (etc) when an object passes ismethod(). -// -//go:linkname Ismethoddescriptor py.ismethoddescriptor -func Ismethoddescriptor(object *py.Object) *py.Object - -// Return true if the object is a data descriptor. -// -// Data descriptors have a __set__ or a __delete__ attribute. Examples are -// properties (defined in Python) and getsets and members (defined in C). -// Typically, data descriptors will also have __name__ and __doc__ attributes -// (properties, getsets, and members have both of these attributes), but this -// is not guaranteed. -// -//go:linkname Isdatadescriptor py.isdatadescriptor -func Isdatadescriptor(object *py.Object) *py.Object - -// Return true if the object is a member descriptor. -// -// Member descriptors are specialized descriptors defined in extension -// modules. -// -//go:linkname Ismemberdescriptor py.ismemberdescriptor -func Ismemberdescriptor(object *py.Object) *py.Object - -// Return true if the object is a getset descriptor. -// -// getset descriptors are specialized descriptors defined in extension -// modules. -// -//go:linkname Isgetsetdescriptor py.isgetsetdescriptor -func Isgetsetdescriptor(object *py.Object) *py.Object - -// Return true if the object is a user-defined function. -// -// Function objects provide these attributes: -// __doc__ documentation string -// __name__ name with which this function was defined -// __code__ code object containing compiled function bytecode -// __defaults__ tuple of any default values for arguments -// __globals__ global namespace in which this function was defined -// __annotations__ dict of parameter annotations -// __kwdefaults__ dict of keyword only parameters with defaults -// -//go:linkname Isfunction py.isfunction -func Isfunction(object *py.Object) *py.Object - -// Return true if the object is a user-defined generator function. -// -// Generator function objects provide the same attributes as functions. -// See help(isfunction) for a list of attributes. -// -//go:linkname Isgeneratorfunction py.isgeneratorfunction -func Isgeneratorfunction(obj *py.Object) *py.Object - -// Decorator to ensure callable is recognised as a coroutine function. -// -//go:linkname Markcoroutinefunction py.markcoroutinefunction -func Markcoroutinefunction(func_ *py.Object) *py.Object - -// Return true if the object is a coroutine function. -// -// Coroutine functions are normally defined with "async def" syntax, but may -// be marked via markcoroutinefunction. -// -//go:linkname Iscoroutinefunction py.iscoroutinefunction -func Iscoroutinefunction(obj *py.Object) *py.Object - -// Return true if the object is an asynchronous generator function. -// -// Asynchronous generator functions are defined with "async def" -// syntax and have "yield" expressions in their body. -// -//go:linkname Isasyncgenfunction py.isasyncgenfunction -func Isasyncgenfunction(obj *py.Object) *py.Object - -// Return true if the object is an asynchronous generator. -// -//go:linkname Isasyncgen py.isasyncgen -func Isasyncgen(object *py.Object) *py.Object - -// Return true if the object is a generator. -// -// Generator objects provide these attributes: -// __iter__ defined to support iteration over container -// close raises a new GeneratorExit exception inside the -// generator to terminate the iteration -// gi_code code object -// gi_frame frame object or possibly None once the generator has -// been exhausted -// gi_running set to 1 when generator is executing, 0 otherwise -// next return the next item from the container -// send resumes the generator and "sends" a value that becomes -// the result of the current yield-expression -// throw used to raise an exception inside the generator -// -//go:linkname Isgenerator py.isgenerator -func Isgenerator(object *py.Object) *py.Object - -// Return true if the object is a coroutine. -// -//go:linkname Iscoroutine py.iscoroutine -func Iscoroutine(object *py.Object) *py.Object - -// Return true if object can be passed to an “await“ expression. -// -//go:linkname Isawaitable py.isawaitable -func Isawaitable(object *py.Object) *py.Object - -// Return true if the object is a traceback. -// -// Traceback objects provide these attributes: -// tb_frame frame object at this level -// tb_lasti index of last attempted instruction in bytecode -// tb_lineno current line number in Python source code -// tb_next next inner traceback object (called by this level) -// -//go:linkname Istraceback py.istraceback -func Istraceback(object *py.Object) *py.Object - -// Return true if the object is a frame object. -// -// Frame objects provide these attributes: -// f_back next outer frame object (this frame's caller) -// f_builtins built-in namespace seen by this frame -// f_code code object being executed in this frame -// f_globals global namespace seen by this frame -// f_lasti index of last attempted instruction in bytecode -// f_lineno current line number in Python source code -// f_locals local namespace seen by this frame -// f_trace tracing function for this frame, or None -// -//go:linkname Isframe py.isframe -func Isframe(object *py.Object) *py.Object - -// Return true if the object is a code object. -// -// Code objects provide these attributes: -// co_argcount number of arguments (not including *, ** args -// or keyword only arguments) -// co_code string of raw compiled bytecode -// co_cellvars tuple of names of cell variables -// co_consts tuple of constants used in the bytecode -// co_filename name of file in which this code object was created -// co_firstlineno number of first line in Python source code -// co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg -// | 16=nested | 32=generator | 64=nofree | 128=coroutine -// | 256=iterable_coroutine | 512=async_generator -// co_freevars tuple of names of free variables -// co_posonlyargcount number of positional only arguments -// co_kwonlyargcount number of keyword only arguments (not including ** arg) -// co_lnotab encoded mapping of line numbers to bytecode indices -// co_name name with which this code object was defined -// co_names tuple of names other than arguments and function locals -// co_nlocals number of local variables -// co_stacksize virtual machine stack space required -// co_varnames tuple of names of arguments and local variables -// -//go:linkname Iscode py.iscode -func Iscode(object *py.Object) *py.Object - -// Return true if the object is a built-in function or method. -// -// Built-in functions and methods provide these attributes: -// __doc__ documentation string -// __name__ original name of this function or method -// __self__ instance to which a method is bound, or None -// -//go:linkname Isbuiltin py.isbuiltin -func Isbuiltin(object *py.Object) *py.Object - -// Return true if the object is a method wrapper. -// -//go:linkname Ismethodwrapper py.ismethodwrapper -func Ismethodwrapper(object *py.Object) *py.Object - -// Return true if the object is any kind of function or method. -// -//go:linkname Isroutine py.isroutine -func Isroutine(object *py.Object) *py.Object - -// Return true if the object is an abstract base class (ABC). -// -//go:linkname Isabstract py.isabstract -func Isabstract(object *py.Object) *py.Object - -// Return all members of an object as (name, value) pairs sorted by name. -// -// Optionally, only return members that satisfy a given predicate. -// -//go:linkname Getmembers py.getmembers -func Getmembers(object *py.Object, predicate *py.Object) *py.Object - -// Return all members of an object as (name, value) pairs sorted by name -// -// without triggering dynamic lookup via the descriptor protocol, -// __getattr__ or __getattribute__. Optionally, only return members that -// satisfy a given predicate. -// -// Note: this function may not be able to retrieve all members -// that getmembers can fetch (like dynamically created attributes) -// and may find members that getmembers can't (like descriptors -// that raise AttributeError). It can also return descriptor objects -// instead of instance members in some cases. -// -//go:linkname GetmembersStatic py.getmembers_static -func GetmembersStatic(object *py.Object, predicate *py.Object) *py.Object - -// Return list of attribute-descriptor tuples. -// -// For each name in dir(cls), the return list contains a 4-tuple -// with these elements: -// -// 0. The name (a string). -// -// 1. The kind of attribute this is, one of these strings: -// 'class method' created via classmethod() -// 'static method' created via staticmethod() -// 'property' created via property() -// 'method' any other flavor of method or descriptor -// 'data' not a method -// -// 2. The class which defined this attribute (a class). -// -// 3. The object as obtained by calling getattr; if this fails, or if the -// resulting object does not live anywhere in the class' mro (including -// metaclasses) then the object is looked up in the defining class's -// dict (found by walking the mro). -// -// If one of the items in dir(cls) is stored in the metaclass it will now -// be discovered and not have None be listed as the class in which it was -// defined. Any items whose home class cannot be discovered are skipped. -// -//go:linkname ClassifyClassAttrs py.classify_class_attrs -func ClassifyClassAttrs(cls *py.Object) *py.Object - -// Return tuple of base classes (including cls) in method resolution order. -// -//go:linkname Getmro py.getmro -func Getmro(cls *py.Object) *py.Object - -// Get the object wrapped by *func*. -// -// Follows the chain of :attr:`__wrapped__` attributes returning the last -// object in the chain. -// -// *stop* is an optional callback accepting an object in the wrapper chain -// as its sole argument that allows the unwrapping to be terminated early if -// the callback returns a true value. If the callback never returns a true -// value, the last object in the chain is returned as usual. For example, -// :func:`signature` uses this to stop unwrapping if any object in the -// chain has a ``__signature__`` attribute defined. -// -// :exc:`ValueError` is raised if a cycle is encountered. -// -//go:linkname Unwrap py.unwrap -func Unwrap(func_ *py.Object) *py.Object - -// Return the indent size, in spaces, at the start of a line of text. -// -//go:linkname Indentsize py.indentsize -func Indentsize(line *py.Object) *py.Object - -// Get the documentation string for an object. -// -// All tabs are expanded to spaces. To clean up docstrings that are -// indented to line up with blocks of code, any whitespace than can be -// uniformly removed from the second line onwards is removed. -// -//go:linkname Getdoc py.getdoc -func Getdoc(object *py.Object) *py.Object - -// Clean up indentation from docstrings. -// -// Any whitespace that can be uniformly removed from the second line -// onwards is removed. -// -//go:linkname Cleandoc py.cleandoc -func Cleandoc(doc *py.Object) *py.Object - -// Work out which source or compiled file an object was defined in. -// -//go:linkname Getfile py.getfile -func Getfile(object *py.Object) *py.Object - -// Return the module name for a given file, or None. -// -//go:linkname Getmodulename py.getmodulename -func Getmodulename(path *py.Object) *py.Object - -// Return the filename that can be used to locate an object's source. -// -// Return None if no way can be identified to get the source. -// -//go:linkname Getsourcefile py.getsourcefile -func Getsourcefile(object *py.Object) *py.Object - -// Return an absolute path to the source or compiled file for an object. -// -// The idea is for each object to have a unique origin, so this routine -// normalizes the result as much as possible. -// -//go:linkname Getabsfile py.getabsfile -func Getabsfile(object *py.Object, Filename *py.Object) *py.Object - -// Return the module an object was defined in, or None if not found. -// -//go:linkname Getmodule py.getmodule -func Getmodule(object *py.Object, Filename *py.Object) *py.Object - -// Return the entire source file and starting line number for an object. -// -// The argument may be a module, class, method, function, traceback, frame, -// or code object. The source code is returned as a list of all the lines -// in the file and the line number indexes a line in that list. An OSError -// is raised if the source code cannot be retrieved. -// -//go:linkname Findsource py.findsource -func Findsource(object *py.Object) *py.Object - -// Get lines of comments immediately preceding an object's source code. -// -// Returns None when source can't be found. -// -//go:linkname Getcomments py.getcomments -func Getcomments(object *py.Object) *py.Object - -// Extract the block of code at the top of the given list of lines. -// -//go:linkname Getblock py.getblock -func Getblock(lines *py.Object) *py.Object - -// Return a list of source lines and starting line number for an object. -// -// The argument may be a module, class, method, function, traceback, frame, -// or code object. The source code is returned as a list of the lines -// corresponding to the object and the line number indicates where in the -// original source file the first line of code was found. An OSError is -// raised if the source code cannot be retrieved. -// -//go:linkname Getsourcelines py.getsourcelines -func Getsourcelines(object *py.Object) *py.Object - -// Return the text of the source code for an object. -// -// The argument may be a module, class, method, function, traceback, frame, -// or code object. The source code is returned as a single string. An -// OSError is raised if the source code cannot be retrieved. -// -//go:linkname Getsource py.getsource -func Getsource(object *py.Object) *py.Object - -// Recursive helper function for getclasstree(). -// -//go:linkname Walktree py.walktree -func Walktree(classes *py.Object, children *py.Object, parent *py.Object) *py.Object - -// Arrange the given list of classes into a hierarchy of nested lists. -// -// Where a nested list appears, it contains classes derived from the class -// whose entry immediately precedes the list. Each entry is a 2-tuple -// containing a class and a tuple of its base classes. If the 'unique' -// argument is true, exactly one entry appears in the returned structure -// for each class in the given list. Otherwise, classes using multiple -// inheritance and their descendants will appear multiple times. -// -//go:linkname Getclasstree py.getclasstree -func Getclasstree(classes *py.Object, unique *py.Object) *py.Object - -// Get information about the arguments accepted by a code object. -// -// Three things are returned: (args, varargs, varkw), where -// 'args' is the list of argument names. Keyword-only arguments are -// appended. 'varargs' and 'varkw' are the names of the * and ** -// arguments or None. -// -//go:linkname Getargs py.getargs -func Getargs(co *py.Object) *py.Object - -// Get the names and default values of a callable object's parameters. -// -// A tuple of seven things is returned: -// (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations). -// 'args' is a list of the parameter names. -// 'varargs' and 'varkw' are the names of the * and ** parameters or None. -// 'defaults' is an n-tuple of the default values of the last n parameters. -// 'kwonlyargs' is a list of keyword-only parameter names. -// 'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults. -// 'annotations' is a dictionary mapping parameter names to annotations. -// -// Notable differences from inspect.signature(): -// - the "self" parameter is always reported, even for bound methods -// - wrapper chains defined by __wrapped__ *not* unwrapped automatically -// -//go:linkname Getfullargspec py.getfullargspec -func Getfullargspec(func_ *py.Object) *py.Object - -// Get information about arguments passed into a particular frame. -// -// A tuple of four things is returned: (args, varargs, varkw, locals). -// 'args' is a list of the argument names. -// 'varargs' and 'varkw' are the names of the * and ** arguments or None. -// 'locals' is the locals dictionary of the given frame. -// -//go:linkname Getargvalues py.getargvalues -func Getargvalues(frame *py.Object) *py.Object - -// Get the mapping of arguments to values. -// -// A dict is returned, with keys the function argument names (including the -// names of the * and ** arguments, if any), and values the respective bound -// values from 'positional' and 'named'. -// -//go:linkname Getcallargs py.getcallargs -func Getcallargs(func_ *py.Object, __llgo_va_list ...interface{}) *py.Object - -// Get the mapping of free variables to their current values. -// -// Returns a named tuple of dicts mapping the current nonlocal, global -// and builtin references as seen by the body of the function. A final -// set of unbound names that could not be resolved is also provided. -// -//go:linkname Getclosurevars py.getclosurevars -func Getclosurevars(func_ *py.Object) *py.Object - -// Get information about a frame or traceback object. -// -// A tuple of five things is returned: the filename, the line number of -// the current line, the function name, a list of lines of context from -// the source code, and the index of the current line within that list. -// The optional second argument specifies the number of lines of context -// to return, which are centered around the current line. -// -//go:linkname Getframeinfo py.getframeinfo -func Getframeinfo(frame *py.Object, context *py.Object) *py.Object - -// Get the line number from a frame object, allowing for optimization. -// -//go:linkname Getlineno py.getlineno -func Getlineno(frame *py.Object) *py.Object - -// Get a list of records for a frame and all higher (calling) frames. -// -// Each record contains a frame object, filename, line number, function -// name, a list of lines of context, and index within the context. -// -//go:linkname Getouterframes py.getouterframes -func Getouterframes(frame *py.Object, context *py.Object) *py.Object - -// Get a list of records for a traceback's frame and all lower frames. -// -// Each record contains a frame object, filename, line number, function -// name, a list of lines of context, and index within the context. -// -//go:linkname Getinnerframes py.getinnerframes -func Getinnerframes(tb *py.Object, context *py.Object) *py.Object - -// Return the frame of the caller or None if this is not possible. -// -//go:linkname Currentframe py.currentframe -func Currentframe() *py.Object - -// Return a list of records for the stack above the caller's frame. -// -//go:linkname Stack py.stack -func Stack(context *py.Object) *py.Object - -// Return a list of records for the stack below the current exception. -// -//go:linkname Trace py.trace -func Trace(context *py.Object) *py.Object - -// Get current state of a generator-iterator. -// -// Possible states are: -// GEN_CREATED: Waiting to start execution. -// GEN_RUNNING: Currently being executed by the interpreter. -// GEN_SUSPENDED: Currently suspended at a yield expression. -// GEN_CLOSED: Execution has completed. -// -//go:linkname Getgeneratorstate py.getgeneratorstate -func Getgeneratorstate(generator *py.Object) *py.Object - -// Get the mapping of generator local variables to their current values. -// -// A dict is returned, with the keys the local variable names and values the -// bound values. -// -//go:linkname Getgeneratorlocals py.getgeneratorlocals -func Getgeneratorlocals(generator *py.Object) *py.Object - -// Get current state of a coroutine object. -// -// Possible states are: -// CORO_CREATED: Waiting to start execution. -// CORO_RUNNING: Currently being executed by the interpreter. -// CORO_SUSPENDED: Currently suspended at an await expression. -// CORO_CLOSED: Execution has completed. -// -//go:linkname Getcoroutinestate py.getcoroutinestate -func Getcoroutinestate(coroutine *py.Object) *py.Object - -// Get the mapping of coroutine local variables to their current values. -// -// A dict is returned, with the keys the local variable names and values the -// bound values. -// -//go:linkname Getcoroutinelocals py.getcoroutinelocals -func Getcoroutinelocals(coroutine *py.Object) *py.Object - -// Get current state of an asynchronous generator object. -// -// Possible states are: -// AGEN_CREATED: Waiting to start execution. -// AGEN_RUNNING: Currently being executed by the interpreter. -// AGEN_SUSPENDED: Currently suspended at a yield expression. -// AGEN_CLOSED: Execution has completed. -// -//go:linkname Getasyncgenstate py.getasyncgenstate -func Getasyncgenstate(agen *py.Object) *py.Object - -// Get the mapping of asynchronous generator local variables to their current -// values. -// -// A dict is returned, with the keys the local variable names and values the -// bound values. -// -//go:linkname Getasyncgenlocals py.getasyncgenlocals -func Getasyncgenlocals(agen *py.Object) *py.Object - -// Get a signature object for the passed callable. -// -//go:linkname Signature py.signature -func Signature(obj *py.Object) *py.Object diff --git a/py/json/gen.go b/py/json/gen.go deleted file mode 100644 index 9015d8e7..00000000 --- a/py/json/gen.go +++ /dev/null @@ -1,152 +0,0 @@ -package json - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.json" - -// Serialize “obj“ as a JSON formatted stream to “fp“ (a -// -// ``.write()``-supporting file-like object). -// -// If ``skipkeys`` is true then ``dict`` keys that are not basic types -// (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped -// instead of raising a ``TypeError``. -// -// If ``ensure_ascii`` is false, then the strings written to ``fp`` can -// contain non-ASCII characters if they appear in strings contained in -// ``obj``. Otherwise, all such characters are escaped in JSON strings. -// -// If ``check_circular`` is false, then the circular reference check -// for container types will be skipped and a circular reference will -// result in an ``RecursionError`` (or worse). -// -// If ``allow_nan`` is false, then it will be a ``ValueError`` to -// serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) -// in strict compliance of the JSON specification, instead of using the -// JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). -// -// If ``indent`` is a non-negative integer, then JSON array elements and -// object members will be pretty-printed with that indent level. An indent -// level of 0 will only insert newlines. ``None`` is the most compact -// representation. -// -// If specified, ``separators`` should be an ``(item_separator, key_separator)`` -// tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and -// ``(',', ': ')`` otherwise. To get the most compact JSON representation, -// you should specify ``(',', ':')`` to eliminate whitespace. -// -// ``default(obj)`` is a function that should return a serializable version -// of obj or raise TypeError. The default simply raises TypeError. -// -// If *sort_keys* is true (default: ``False``), then the output of -// dictionaries will be sorted by key. -// -// To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the -// ``.default()`` method to serialize additional types), specify it with -// the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. -// -//go:linkname Dump py.dump -func Dump(obj *py.Object, fp *py.Object) *py.Object - -// Serialize “obj“ to a JSON formatted “str“. -// -// If ``skipkeys`` is true then ``dict`` keys that are not basic types -// (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped -// instead of raising a ``TypeError``. -// -// If ``ensure_ascii`` is false, then the return value can contain non-ASCII -// characters if they appear in strings contained in ``obj``. Otherwise, all -// such characters are escaped in JSON strings. -// -// If ``check_circular`` is false, then the circular reference check -// for container types will be skipped and a circular reference will -// result in an ``RecursionError`` (or worse). -// -// If ``allow_nan`` is false, then it will be a ``ValueError`` to -// serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in -// strict compliance of the JSON specification, instead of using the -// JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). -// -// If ``indent`` is a non-negative integer, then JSON array elements and -// object members will be pretty-printed with that indent level. An indent -// level of 0 will only insert newlines. ``None`` is the most compact -// representation. -// -// If specified, ``separators`` should be an ``(item_separator, key_separator)`` -// tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and -// ``(',', ': ')`` otherwise. To get the most compact JSON representation, -// you should specify ``(',', ':')`` to eliminate whitespace. -// -// ``default(obj)`` is a function that should return a serializable version -// of obj or raise TypeError. The default simply raises TypeError. -// -// If *sort_keys* is true (default: ``False``), then the output of -// dictionaries will be sorted by key. -// -// To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the -// ``.default()`` method to serialize additional types), specify it with -// the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. -// -//go:linkname Dumps py.dumps -func Dumps(obj *py.Object) *py.Object - -// Deserialize “fp“ (a “.read()“-supporting file-like object containing -// -// a JSON document) to a Python object. -// -// ``object_hook`` is an optional function that will be called with the -// result of any object literal decode (a ``dict``). The return value of -// ``object_hook`` will be used instead of the ``dict``. This feature -// can be used to implement custom decoders (e.g. JSON-RPC class hinting). -// -// ``object_pairs_hook`` is an optional function that will be called with the -// result of any object literal decoded with an ordered list of pairs. The -// return value of ``object_pairs_hook`` will be used instead of the ``dict``. -// This feature can be used to implement custom decoders. If ``object_hook`` -// is also defined, the ``object_pairs_hook`` takes priority. -// -// To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` -// kwarg; otherwise ``JSONDecoder`` is used. -// -//go:linkname Load py.load -func Load(fp *py.Object) *py.Object - -// Deserialize “s“ (a “str“, “bytes“ or “bytearray“ instance -// -// containing a JSON document) to a Python object. -// -// ``object_hook`` is an optional function that will be called with the -// result of any object literal decode (a ``dict``). The return value of -// ``object_hook`` will be used instead of the ``dict``. This feature -// can be used to implement custom decoders (e.g. JSON-RPC class hinting). -// -// ``object_pairs_hook`` is an optional function that will be called with the -// result of any object literal decoded with an ordered list of pairs. The -// return value of ``object_pairs_hook`` will be used instead of the ``dict``. -// This feature can be used to implement custom decoders. If ``object_hook`` -// is also defined, the ``object_pairs_hook`` takes priority. -// -// ``parse_float``, if specified, will be called with the string -// of every JSON float to be decoded. By default this is equivalent to -// float(num_str). This can be used to use another datatype or parser -// for JSON floats (e.g. decimal.Decimal). -// -// ``parse_int``, if specified, will be called with the string -// of every JSON int to be decoded. By default this is equivalent to -// int(num_str). This can be used to use another datatype or parser -// for JSON integers (e.g. float). -// -// ``parse_constant``, if specified, will be called with one of the -// following strings: -Infinity, Infinity, NaN. -// This can be used to raise an exception if invalid JSON numbers -// are encountered. -// -// To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` -// kwarg; otherwise ``JSONDecoder`` is used. -// -//go:linkname Loads py.loads -func Loads(s *py.Object) *py.Object diff --git a/py/list.go b/py/list.go deleted file mode 100644 index 99abc521..00000000 --- a/py/list.go +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/list.html - -//go:linkname List llgo.pyList -func List(__llgo_va_list ...any) *Object - -// Return a new list of length len on success, or nil on failure. -// -//go:linkname NewList C.PyList_New -func NewList(len int) *Object - -// Return the length of the list object in list; this is equivalent to len(list) -// on a list object. -// -// llgo:link (*Object).ListLen C.PyList_Size -func (l *Object) ListLen() int { return 0 } - -// Return the object at position index in the list pointed to by list. The position -// must be non-negative; indexing from the end of the list is not supported. If index -// is out of bounds (<0 or >=len(list)), return nil and set an IndexError exception. -// -// llgo:link (*Object).ListItem C.PyList_GetItem -func (l *Object) ListItem(index int) *Object { return nil } - -// Set the item at index index in list to item. Return 0 on success. If index is out -// of bounds, return -1 and set an IndexError exception. -// -// llgo:link (*Object).ListSetItem C.PyList_SetItem -func (l *Object) ListSetItem(index int, item *Object) c.Int { return 0 } - -// Insert the item item into list list in front of index index. Return 0 if successful; -// return -1 and set an exception if unsuccessful. Analogous to list.insert(index, item). -// -// llgo:link (*Object).ListInsert C.PyList_Insert -func (l *Object) ListInsert(index int, item *Object) c.Int { return 0 } - -// Append the object item at the end of list list. Return 0 if successful; return -1 -// and set an exception if unsuccessful. Analogous to list.append(item). -// -// llgo:link (*Object).ListAppend C.PyList_Append -func (l *Object) ListAppend(item *Object) c.Int { return 0 } - -// Return a list of the objects in list containing the objects between low and high. -// Return nil and set an exception if unsuccessful. Analogous to list[low:high]. -// Indexing from the end of the list is not supported. -// -// llgo:link (*Object).ListSlice C.PyList_GetSlice -func (l *Object) ListSlice(low, high int) *Object { return nil } - -// Set the slice of list between low and high to the contents of itemlist. Analogous -// to list[low:high] = itemlist. The itemlist may be NULL, indicating the assignment -// of an empty list (slice deletion). Return 0 on success, -1 on failure. Indexing -// from the end of the list is not supported. -// -// llgo:link (*Object).ListSetSlice C.PyList_SetSlice -func (l *Object) ListSetSlice(low, high int, itemlist *Object) c.Int { return 0 } - -// Sort the items of list in place. Return 0 on success, -1 on failure. This is equivalent -// to list.sort(). -// -// llgo:link (*Object).ListSort C.PyList_Sort -func (l *Object) ListSort() c.Int { return 0 } - -// Reverse the items of list in place. Return 0 on success, -1 on failure. This is the -// equivalent of list.reverse(). -// -// llgo:link (*Object).ListReverse C.PyList_Reverse -func (l *Object) ListReverse() c.Int { return 0 } - -// Return a new tuple object containing the contents of list; equivalent to tuple(list). -// -// llgo:link (*Object).ListAsTuple C.PyList_AsTuple -func (l *Object) ListAsTuple() *Object { return nil } diff --git a/py/long.go b/py/long.go deleted file mode 100644 index a68d8286..00000000 --- a/py/long.go +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/long.html - -//go:linkname Long C.PyLong_FromLong -func Long(v c.Long) *Object - -//go:linkname LongLong C.PyLong_FromLongLong -func LongLong(v c.LongLong) *Object - -//go:linkname Ulong C.PyLong_FromUnsignedLong -func Ulong(v c.Ulong) *Object - -//go:linkname UlongLong C.PyLong_FromUnsignedLongLong -func UlongLong(v c.UlongLong) *Object - -//go:linkname Uintptr C.PyLong_FromSize_t -func Uintptr(v uintptr) *Object - -//go:linkname LongFromFloat64 C.PyLong_FromDouble -func LongFromFloat64(v float64) *Object - -//go:linkname LongFromVoidPtr C.PyLong_FromVoidPtr -func LongFromVoidPtr(v c.Pointer) *Object - -//go:linkname LongFromCStr C.PyLong_FromString -func LongFromCStr(v *c.Char, pend **c.Char, base c.Int) *Object - -//go:linkname LongFromUnicode C.PyLong_FromUnicodeObject -func LongFromUnicode(v *Object, base c.Int) *Object - -// llgo:link (*Object).Long C.PyLong_AsLong -func (l *Object) Long() c.Long { return 0 } - -// llgo:link (*Object).LongLong C.PyLong_AsLongLong -func (l *Object) LongLong() c.LongLong { return 0 } - -// llgo:link (*Object).Ulong C.PyLong_AsUnsignedLong -func (l *Object) Ulong() c.Ulong { return 0 } - -// llgo:link (*Object).UlongLong C.PyLong_AsUnsignedLongLong -func (l *Object) UlongLong() c.UlongLong { return 0 } - -// llgo:link (*Object).Uintptr C.PyLong_AsSize_t -func (l *Object) Uintptr() uintptr { return 0 } - -// llgo:link (*Object).LongAsFloat64 C.PyLong_AsDouble -func (l *Object) LongAsFloat64() float64 { return 0 } - -// llgo:link (*Object).LongAsVoidPtr C.PyLong_AsVoidPtr -func (l *Object) LongAsVoidPtr() c.Pointer { return nil } diff --git a/py/math/doc.txt b/py/math/doc.txt deleted file mode 100644 index 7ba48646..00000000 --- a/py/math/doc.txt +++ /dev/null @@ -1,31 +0,0 @@ -// Unlike the built-in ** operator, math.pow() converts both its arguments to type -// float. Use ** or the built-in pow() function for computing exact integer powers. -// -//go:linkname Pow py.pow -func Pow(x, y *py.Object) *py.Object - -// Return the sine of x radians. -// -//go:linkname Sin py.sin -func Sin(x *py.Object) *py.Object - -// Return the hyperbolic sine of x. -// -//go:linkname Sinh py.sinh -func Sinh(x *py.Object) *py.Object - -// Return the base-2 logarithm of x. This is usually more accurate than log(x, 2). -// -//go:linkname Log2 py.log2 -func Log2(x *py.Object) *py.Object - -// Return the base-10 logarithm of x. This is usually more accurate than log(x, 10). -// -//go:linkname Log10 py.log10 -func Log10(x *py.Object) *py.Object - -// Return the fractional and integer parts of x. Both results carry the sign of -// x and are floats. -// -//go:linkname Modf py.modf -func Modf(x *py.Object) *py.Object diff --git a/py/math/gen.go b/py/math/gen.go deleted file mode 100644 index 34315fdb..00000000 --- a/py/math/gen.go +++ /dev/null @@ -1,349 +0,0 @@ -package math - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.math" - -// Return the arc cosine (measured in radians) of x. -// -// The result is between 0 and pi. -// -//go:linkname Acos py.acos -func Acos(x *py.Object) *py.Object - -// Return the inverse hyperbolic cosine of x. -// -//go:linkname Acosh py.acosh -func Acosh(x *py.Object) *py.Object - -// Return the arc sine (measured in radians) of x. -// -// The result is between -pi/2 and pi/2. -// -//go:linkname Asin py.asin -func Asin(x *py.Object) *py.Object - -// Return the inverse hyperbolic sine of x. -// -//go:linkname Asinh py.asinh -func Asinh(x *py.Object) *py.Object - -// Return the arc tangent (measured in radians) of x. -// -// The result is between -pi/2 and pi/2. -// -//go:linkname Atan py.atan -func Atan(x *py.Object) *py.Object - -// Return the arc tangent (measured in radians) of y/x. -// -// Unlike atan(y/x), the signs of both x and y are considered. -// -//go:linkname Atan2 py.atan2 -func Atan2(y *py.Object, x *py.Object) *py.Object - -// Return the inverse hyperbolic tangent of x. -// -//go:linkname Atanh py.atanh -func Atanh(x *py.Object) *py.Object - -// Return the cube root of x. -// -//go:linkname Cbrt py.cbrt -func Cbrt(x *py.Object) *py.Object - -// Return the ceiling of x as an Integral. -// -// This is the smallest integer >= x. -// -//go:linkname Ceil py.ceil -func Ceil(x *py.Object) *py.Object - -// Return a float with the magnitude (absolute value) of x but the sign of y. -// -// On platforms that support signed zeros, copysign(1.0, -0.0) -// returns -1.0. -// -//go:linkname Copysign py.copysign -func Copysign(x *py.Object, y *py.Object) *py.Object - -// Return the cosine of x (measured in radians). -// -//go:linkname Cos py.cos -func Cos(x *py.Object) *py.Object - -// Return the hyperbolic cosine of x. -// -//go:linkname Cosh py.cosh -func Cosh(x *py.Object) *py.Object - -// Convert angle x from radians to degrees. -// -//go:linkname Degrees py.degrees -func Degrees(x *py.Object) *py.Object - -// Return the Euclidean distance between two points p and q. -// -// The points should be specified as sequences (or iterables) of -// coordinates. Both inputs must have the same dimension. -// -// Roughly equivalent to: -// -// sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q))) -// -//go:linkname Dist py.dist -func Dist(p *py.Object, q *py.Object) *py.Object - -// Error function at x. -// -//go:linkname Erf py.erf -func Erf(x *py.Object) *py.Object - -// Complementary error function at x. -// -//go:linkname Erfc py.erfc -func Erfc(x *py.Object) *py.Object - -// Return e raised to the power of x. -// -//go:linkname Exp py.exp -func Exp(x *py.Object) *py.Object - -// Return 2 raised to the power of x. -// -//go:linkname Exp2 py.exp2 -func Exp2(x *py.Object) *py.Object - -// Return exp(x)-1. -// -// This function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x. -// -//go:linkname Expm1 py.expm1 -func Expm1(x *py.Object) *py.Object - -// Return the absolute value of the float x. -// -//go:linkname Fabs py.fabs -func Fabs(x *py.Object) *py.Object - -// Find n!. -// -// Raise a ValueError if x is negative or non-integral. -// -//go:linkname Factorial py.factorial -func Factorial(n *py.Object) *py.Object - -// Return the floor of x as an Integral. -// -// This is the largest integer <= x. -// -//go:linkname Floor py.floor -func Floor(x *py.Object) *py.Object - -// Return fmod(x, y), according to platform C. -// -// x % y may differ. -// -//go:linkname Fmod py.fmod -func Fmod(x *py.Object, y *py.Object) *py.Object - -// Return the mantissa and exponent of x, as pair (m, e). -// -// m is a float and e is an int, such that x = m * 2.**e. -// If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0. -// -//go:linkname Frexp py.frexp -func Frexp(x *py.Object) *py.Object - -// Return an accurate floating point sum of values in the iterable seq. -// -// Assumes IEEE-754 floating point arithmetic. -// -//go:linkname Fsum py.fsum -func Fsum(seq *py.Object) *py.Object - -// Gamma function at x. -// -//go:linkname Gamma py.gamma -func Gamma(x *py.Object) *py.Object - -// Greatest Common Divisor. -// -//go:linkname Gcd py.gcd -func Gcd(__llgo_va_list ...interface{}) *py.Object - -// Return True if x is neither an infinity nor a NaN, and False otherwise. -// -//go:linkname Isfinite py.isfinite -func Isfinite(x *py.Object) *py.Object - -// Return True if x is a positive or negative infinity, and False otherwise. -// -//go:linkname Isinf py.isinf -func Isinf(x *py.Object) *py.Object - -// Return True if x is a NaN (not a number), and False otherwise. -// -//go:linkname Isnan py.isnan -func Isnan(x *py.Object) *py.Object - -// Return the integer part of the square root of the input. -// -//go:linkname Isqrt py.isqrt -func Isqrt(n *py.Object) *py.Object - -// Least Common Multiple. -// -//go:linkname Lcm py.lcm -func Lcm(__llgo_va_list ...interface{}) *py.Object - -// Return x * (2**i). -// -// This is essentially the inverse of frexp(). -// -//go:linkname Ldexp py.ldexp -func Ldexp(x *py.Object, i *py.Object) *py.Object - -// Natural logarithm of absolute value of Gamma function at x. -// -//go:linkname Lgamma py.lgamma -func Lgamma(x *py.Object) *py.Object - -// Return the base 10 logarithm of x. -// -//go:linkname Log10 py.log10 -func Log10(x *py.Object) *py.Object - -// Return the base 2 logarithm of x. -// -//go:linkname Log2 py.log2 -func Log2(x *py.Object) *py.Object - -// Return the fractional and integer parts of x. -// -// Both results carry the sign of x and are floats. -// -//go:linkname Modf py.modf -func Modf(x *py.Object) *py.Object - -// Return x**y (x to the power of y). -// -//go:linkname Pow py.pow -func Pow(x *py.Object, y *py.Object) *py.Object - -// Convert angle x from degrees to radians. -// -//go:linkname Radians py.radians -func Radians(x *py.Object) *py.Object - -// Difference between x and the closest integer multiple of y. -// -// Return x - n*y where n*y is the closest integer multiple of y. -// In the case where x is exactly halfway between two multiples of -// y, the nearest even value of n is used. The result is always exact. -// -//go:linkname Remainder py.remainder -func Remainder(x *py.Object, y *py.Object) *py.Object - -// Return the sine of x (measured in radians). -// -//go:linkname Sin py.sin -func Sin(x *py.Object) *py.Object - -// Return the hyperbolic sine of x. -// -//go:linkname Sinh py.sinh -func Sinh(x *py.Object) *py.Object - -// Return the square root of x. -// -//go:linkname Sqrt py.sqrt -func Sqrt(x *py.Object) *py.Object - -// Return the tangent of x (measured in radians). -// -//go:linkname Tan py.tan -func Tan(x *py.Object) *py.Object - -// Return the hyperbolic tangent of x. -// -//go:linkname Tanh py.tanh -func Tanh(x *py.Object) *py.Object - -// Return the sum of products of values from two iterables p and q. -// -// Roughly equivalent to: -// -// sum(itertools.starmap(operator.mul, zip(p, q, strict=True))) -// -// For float and mixed int/float inputs, the intermediate products -// and sums are computed with extended precision. -// -//go:linkname Sumprod py.sumprod -func Sumprod(p *py.Object, q *py.Object) *py.Object - -// Truncates the Real x to the nearest Integral toward 0. -// -// Uses the __trunc__ magic method. -// -//go:linkname Trunc py.trunc -func Trunc(x *py.Object) *py.Object - -// Calculate the product of all the elements in the input iterable. -// -// The default start value for the product is 1. -// -// When the iterable is empty, return the start value. This function is -// intended specifically for use with numeric values and may reject -// non-numeric types. -// -//go:linkname Prod py.prod -func Prod(iterable *py.Object) *py.Object - -// Number of ways to choose k items from n items without repetition and with order. -// -// Evaluates to n! / (n - k)! when k <= n and evaluates -// to zero when k > n. -// -// If k is not specified or is None, then k defaults to n -// and the function returns n!. -// -// Raises TypeError if either of the arguments are not integers. -// Raises ValueError if either of the arguments are negative. -// -//go:linkname Perm py.perm -func Perm(n *py.Object, k *py.Object) *py.Object - -// Number of ways to choose k items from n items without repetition and without order. -// -// Evaluates to n! / (k! * (n - k)!) when k <= n and evaluates -// to zero when k > n. -// -// Also called the binomial coefficient because it is equivalent -// to the coefficient of k-th term in polynomial expansion of the -// expression (1 + x)**n. -// -// Raises TypeError if either of the arguments are not integers. -// Raises ValueError if either of the arguments are negative. -// -//go:linkname Comb py.comb -func Comb(n *py.Object, k *py.Object) *py.Object - -// Return the floating-point value the given number of steps after x towards y. -// -// If steps is not specified or is None, it defaults to 1. -// -// Raises a TypeError, if x or y is not a double, or if steps is not an integer. -// Raises ValueError if steps is negative. -// -//go:linkname Nextafter py.nextafter -func Nextafter(x *py.Object, y *py.Object) *py.Object - -// Return the value of the least significant bit of the float x. -// -//go:linkname Ulp py.ulp -func Ulp(x *py.Object) *py.Object diff --git a/py/math/math.go b/py/math/math.go deleted file mode 100644 index 452ff2c6..00000000 --- a/py/math/math.go +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package math - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -// https://docs.python.org/3/library/math.html - -//go:linkname Pi py.pi -var Pi *py.Object - -// With one argument, return the natural logarithm of x (to base e). -// -//go:linkname Log py.log -func Log(x *py.Object) *py.Object - -// With two arguments, return the logarithm of x to the given base, calculated -// as log(x)/log(base). -// -//go:linkname LogOf py.log -func LogOf(x, base *py.Object) *py.Object - -// Return the natural logarithm of 1+x (base e). The result is calculated in -// a way which is accurate for x near zero. -// -//go:linkname Log1p py.log1p -func Log1p(x *py.Object) *py.Object - -// Return the Euclidean norm, sqrt(sum(x**2 for x in coordinates)). This is the -// length of the vector from the origin to the point given by the coordinates. -// -//go:linkname Hypot py.hypot -func Hypot(coordinates ...*py.Object) *py.Object diff --git a/py/matplotlib/gen.go b/py/matplotlib/gen.go deleted file mode 100644 index ef0753dd..00000000 --- a/py/matplotlib/gen.go +++ /dev/null @@ -1,372 +0,0 @@ -package matplotlib - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.matplotlib" - -// Returns a new subclass of tuple with named fields. -// -// >>> Point = namedtuple('Point', ['x', 'y']) -// >>> Point.__doc__ # docstring for the new class -// 'Point(x, y)' -// >>> p = Point(11, y=22) # instantiate with positional args or keywords -// >>> p[0] + p[1] # indexable like a plain tuple -// 33 -// >>> x, y = p # unpack like a regular tuple -// >>> x, y -// (11, 22) -// >>> p.x + p.y # fields also accessible by name -// 33 -// >>> d = p._asdict() # convert to a dictionary -// >>> d['x'] -// 11 -// >>> Point(**d) # convert from a dictionary -// Point(x=11, y=22) -// >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields -// Point(x=100, y=22) -// -//go:linkname Namedtuple py.namedtuple -func Namedtuple(typename *py.Object, fieldNames *py.Object) *py.Object - -// Parse the given version string. -// -// >>> parse('1.0.dev1') -// -// -// :param version: The version string to parse. -// :raises InvalidVersion: When the version string is not a valid version. -// -//go:linkname ParseVersion py.parse_version -func ParseVersion(version *py.Object) *py.Object - -// Convert dictview objects to list. Other inputs are returned unchanged. -// -//go:linkname SanitizeSequence py.sanitize_sequence -func SanitizeSequence(data *py.Object) *py.Object - -// Configure Matplotlib's logging levels. -// -// Matplotlib uses the standard library `logging` framework under the root -// logger 'matplotlib'. This is a helper function to: -// -// - set Matplotlib's root logger level -// - set the root logger handler's level, creating the handler -// if it does not exist yet -// -// Typically, one should call “set_loglevel("info")“ or -// “set_loglevel("debug")“ to get additional debugging information. -// -// Users or applications that are installing their own logging handlers -// may want to directly manipulate “logging.getLogger('matplotlib')“ rather -// than use this function. -// -// Parameters -// ---------- -// level : {"notset", "debug", "info", "warning", "error", "critical"} -// -// The log level of the handler. -// -// Notes -// ----- -// The first time this function is called, an additional handler is attached -// to Matplotlib's root handler; this handler is reused every time and this -// function simply manipulates the logger and handler's level. -// -//go:linkname SetLoglevel py.set_loglevel -func SetLoglevel(level *py.Object) *py.Object - -// Return the string path of the configuration directory. -// -// The directory is chosen as follows: -// -// 1. If the MPLCONFIGDIR environment variable is supplied, choose that. -// 2. On Linux, follow the XDG specification and look first in -// “$XDG_CONFIG_HOME“, if defined, or “$HOME/.config“. On other -// platforms, choose “$HOME/.matplotlib“. -// 3. If the chosen directory exists and is writable, use that as the -// configuration directory. -// 4. Else, create a temporary directory, and use it as the configuration -// directory. -// -//go:linkname GetConfigdir py.get_configdir -func GetConfigdir() *py.Object - -// Return the string path of the cache directory. -// -// The procedure used to find the directory is the same as for -// `get_configdir`, except using “$XDG_CACHE_HOME“/“$HOME/.cache“ instead. -// -//go:linkname GetCachedir py.get_cachedir -func GetCachedir() *py.Object - -// Return the path to Matplotlib data. -// -//go:linkname GetDataPath py.get_data_path -func GetDataPath() *py.Object - -// Get the location of the config file. -// -// # The file location is determined in the following order -// -// - “$PWD/matplotlibrc“ -// - “$MATPLOTLIBRC“ if it is not a directory -// - “$MATPLOTLIBRC/matplotlibrc“ -// - “$MPLCONFIGDIR/matplotlibrc“ -// - On Linux, -// - “$XDG_CONFIG_HOME/matplotlib/matplotlibrc“ (if “$XDG_CONFIG_HOME“ -// is defined) -// - or “$HOME/.config/matplotlib/matplotlibrc“ (if “$XDG_CONFIG_HOME“ -// is not defined) -// -// - On other platforms, -// - “$HOME/.matplotlib/matplotlibrc“ if “$HOME“ is defined -// - Lastly, it looks in “$MATPLOTLIBDATA/matplotlibrc“, which should always -// exist. -// -//go:linkname MatplotlibFname py.matplotlib_fname -func MatplotlibFname() *py.Object - -// Construct a `RcParams` instance from the default Matplotlib rc file. -// -//go:linkname RcParams py.rc_params -func RcParams(failOnError *py.Object) *py.Object - -// Construct a `RcParams` from file *fname*. -// -// Parameters -// ---------- -// fname : str or path-like -// -// A file with Matplotlib rc settings. -// -// fail_on_error : bool -// -// If True, raise an error when the parser fails to convert a parameter. -// -// use_default_template : bool -// -// If True, initialize with default parameters before updating with those -// in the given file. If False, the configuration class only contains the -// parameters specified in the file. (Useful for updating dicts.) -// -//go:linkname RcParamsFromFile py.rc_params_from_file -func RcParamsFromFile(fname *py.Object, failOnError *py.Object, useDefaultTemplate *py.Object) *py.Object - -// Set the current `.rcParams`. *group* is the grouping for the rc, e.g., -// for “lines.linewidth“ the group is “lines“, for -// “axes.facecolor“, the group is “axes“, and so on. Group may -// also be a list or tuple of group names, e.g., (*xtick*, *ytick*). -// *kwargs* is a dictionary attribute name/value pairs, e.g.,:: -// -// rc('lines', linewidth=2, color='r') -// -// sets the current `.rcParams` and is equivalent to:: -// -// rcParams['lines.linewidth'] = 2 -// rcParams['lines.color'] = 'r' -// -// The following aliases are available to save typing for interactive users: -// -// ===== ================= -// Alias Property -// ===== ================= -// 'lw' 'linewidth' -// 'ls' 'linestyle' -// 'c' 'color' -// 'fc' 'facecolor' -// 'ec' 'edgecolor' -// 'mew' 'markeredgewidth' -// 'aa' 'antialiased' -// ===== ================= -// -// Thus you could abbreviate the above call as:: -// -// rc('lines', lw=2, c='r') -// -// Note you can use python's kwargs dictionary facility to store -// dictionaries of default parameters. e.g., you can customize the -// font rc as follows:: -// -// font = {'family' : 'monospace', -// 'weight' : 'bold', -// 'size' : 'larger'} -// rc('font', **font) # pass in the font dict as kwargs -// -// This enables you to easily switch between several configurations. Use -// “matplotlib.style.use('default')“ or :func:`~matplotlib.rcdefaults` to -// restore the default `.rcParams` after changes. -// -// Notes -// ----- -// Similar functionality is available by using the normal dict interface, i.e. -// “rcParams.update({"lines.linewidth": 2, ...})“ (but “rcParams.update“ -// does not support abbreviations or grouping). -// -//go:linkname Rc py.rc -func Rc(group *py.Object) *py.Object - -// Restore the `.rcParams` from Matplotlib's internal default style. -// -// Style-blacklisted `.rcParams` (defined in -// “matplotlib.style.core.STYLE_BLACKLIST“) are not updated. -// -// See Also -// -------- -// matplotlib.rc_file_defaults -// -// Restore the `.rcParams` from the rc file originally loaded by -// Matplotlib. -// -// matplotlib.style.use -// -// Use a specific style file. Call ``style.use('default')`` to restore -// the default style. -// -//go:linkname Rcdefaults py.rcdefaults -func Rcdefaults() *py.Object - -// Restore the `.rcParams` from the original rc file loaded by Matplotlib. -// -// Style-blacklisted `.rcParams` (defined in -// “matplotlib.style.core.STYLE_BLACKLIST“) are not updated. -// -//go:linkname RcFileDefaults py.rc_file_defaults -func RcFileDefaults() *py.Object - -// Update `.rcParams` from file. -// -// Style-blacklisted `.rcParams` (defined in -// “matplotlib.style.core.STYLE_BLACKLIST“) are not updated. -// -// Parameters -// ---------- -// fname : str or path-like -// -// A file with Matplotlib rc settings. -// -// use_default_template : bool -// -// If True, initialize with default parameters before updating with those -// in the given file. If False, the current configuration persists -// and only the parameters specified in the file are updated. -// -//go:linkname RcFile py.rc_file -func RcFile(fname *py.Object) *py.Object - -// Return a context manager for temporarily changing rcParams. -// -// The :rc:`backend` will not be reset by the context manager. -// -// rcParams changed both through the context manager invocation and -// in the body of the context will be reset on context exit. -// -// Parameters -// ---------- -// rc : dict -// -// The rcParams to temporarily set. -// -// fname : str or path-like -// -// A file with Matplotlib rc settings. If both *fname* and *rc* are given, -// settings from *rc* take precedence. -// -// See Also -// -------- -// :ref:`customizing-with-matplotlibrc-files` -// -// Examples -// -------- -// Passing explicit values via a dict:: -// -// with mpl.rc_context({'interactive': False}): -// fig, ax = plt.subplots() -// ax.plot(range(3), range(3)) -// fig.savefig('example.png') -// plt.close(fig) -// -// Loading settings from a file:: -// -// with mpl.rc_context(fname='print.rc'): -// plt.plot(x, y) # uses 'print.rc' -// -// Setting in the context body:: -// -// with mpl.rc_context(): -// # will be reset -// mpl.rcParams['lines.linewidth'] = 5 -// plt.plot(x, y) -// -//go:linkname RcContext py.rc_context -func RcContext(rc *py.Object, fname *py.Object) *py.Object - -// Select the backend used for rendering and GUI integration. -// -// If pyplot is already imported, `~matplotlib.pyplot.switch_backend` is used -// and if the new backend is different than the current backend, all Figures -// will be closed. -// -// Parameters -// ---------- -// backend : str -// -// The backend to switch to. This can either be one of the standard -// backend names, which are case-insensitive: -// -// - interactive backends: -// GTK3Agg, GTK3Cairo, GTK4Agg, GTK4Cairo, MacOSX, nbAgg, QtAgg, -// QtCairo, TkAgg, TkCairo, WebAgg, WX, WXAgg, WXCairo, Qt5Agg, Qt5Cairo -// -// - non-interactive backends: -// agg, cairo, pdf, pgf, ps, svg, template -// -// or a string of the form: ``module://my.module.name``. -// -// Switching to an interactive backend is not possible if an unrelated -// event loop has already been started (e.g., switching to GTK3Agg if a -// TkAgg window has already been opened). Switching to a non-interactive -// backend is always possible. -// -// force : bool, default: True -// -// If True (the default), raise an `ImportError` if the backend cannot be -// set up (either because it fails to import, or because an incompatible -// GUI interactive framework is already running); if False, silently -// ignore the failure. -// -// See Also -// -------- -// :ref:`backends` -// matplotlib.get_backend -// matplotlib.pyplot.switch_backend -// -//go:linkname Use py.use -func Use(backend *py.Object) *py.Object - -// Return the name of the current backend. -// -// See Also -// -------- -// matplotlib.use -// -//go:linkname GetBackend py.get_backend -func GetBackend() *py.Object - -// Set whether to redraw after every plotting command (e.g. `.pyplot.xlabel`). -// -//go:linkname Interactive py.interactive -func Interactive(b *py.Object) *py.Object - -// Return whether to redraw after every plotting command. -// -// .. note:: -// -// This function is only intended for use in backends. End users should -// use `.pyplot.isinteractive` instead. -// -//go:linkname IsInteractive py.is_interactive -func IsInteractive() *py.Object diff --git a/py/matplotlib/pyplot/gen.go b/py/matplotlib/pyplot/gen.go deleted file mode 100644 index c87088a8..00000000 --- a/py/matplotlib/pyplot/gen.go +++ /dev/null @@ -1,12613 +0,0 @@ -package pyplot - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.matplotlib.pyplot" - -// Cast a value to a type. -// -// This returns the value unchanged. To the type checker this -// signals that the return value has the designated type, but at -// runtime we intentionally don't check anything (we want this -// to be as fast as possible). -// -//go:linkname Cast py.cast -func Cast(typ *py.Object, val *py.Object) *py.Object - -// Decorator for overloaded functions/methods. -// -// In a stub file, place two or more stub definitions for the same -// function in a row, each decorated with @overload. -// -// For example:: -// -// @overload -// def utf8(value: None) -> None: ... -// @overload -// def utf8(value: bytes) -> bytes: ... -// @overload -// def utf8(value: str) -> bytes: ... -// -// In a non-stub file (i.e. a regular .py file), do the same but -// follow it with an implementation. The implementation should *not* -// be decorated with @overload:: -// -// @overload -// def utf8(value: None) -> None: ... -// @overload -// def utf8(value: bytes) -> bytes: ... -// @overload -// def utf8(value: str) -> bytes: ... -// def utf8(value): -// ... # implementation goes here -// -// The overloads for a function can be retrieved at runtime using the -// get_overloads() function. -// -//go:linkname Overload py.overload -func Overload(func_ *py.Object) *py.Object - -// Create a new `Cycler` object from a single positional argument, -// a pair of positional arguments, or the combination of keyword arguments. -// -// cycler(arg) -// cycler(label1=itr1[, label2=iter2[, ...]]) -// cycler(label, itr) -// -// Form 1 simply copies a given `Cycler` object. -// -// Form 2 composes a `Cycler` as an inner product of the -// pairs of keyword arguments. In other words, all of the -// iterables are cycled simultaneously, as if through zip(). -// -// Form 3 creates a `Cycler` from a label and an iterable. -// This is useful for when the label cannot be a keyword argument -// (e.g., an integer or a name that has a space in it). -// -// Parameters -// ---------- -// arg : Cycler -// -// Copy constructor for Cycler (does a shallow copy of iterables). -// -// label : name -// -// The property key. In the 2-arg form of the function, -// the label can be any hashable object. In the keyword argument -// form of the function, it must be a valid python identifier. -// -// itr : iterable -// -// Finite length iterable of the property values. -// Can be a single-property `Cycler` that would -// be like a key change, but as a shallow copy. -// -// Returns -// ------- -// cycler : Cycler -// -// New `Cycler` for the given property -// -//go:linkname Cycler py.cycler -func Cycler(__llgo_va_list ...interface{}) *py.Object - -// Return the name of the current backend. -// -// See Also -// -------- -// matplotlib.use -// -//go:linkname GetBackend py.get_backend -func GetBackend() *py.Object - -// Set whether to redraw after every plotting command (e.g. `.pyplot.xlabel`). -// -//go:linkname Interactive py.interactive -func Interactive(b *py.Object) *py.Object - -// Calculate the width and height for a figure with a specified aspect ratio. -// -// While the height is taken from :rc:`figure.figsize`, the width is -// adjusted to match the desired aspect ratio. Additionally, it is ensured -// that the width is in the range [4., 16.] and the height is in the range -// [2., 16.]. If necessary, the default height is adjusted to ensure this. -// -// Parameters -// ---------- -// arg : float or 2D array -// -// If a float, this defines the aspect ratio (i.e. the ratio height / -// width). -// In case of an array the aspect ratio is number of rows / number of -// columns, so that the array could be fitted in the figure undistorted. -// -// Returns -// ------- -// width, height : float -// -// The figure size in inches. -// -// Notes -// ----- -// If you want to create an Axes within the figure, that still preserves the -// aspect ratio, be sure to create it with equal width and height. See -// examples below. -// -// Thanks to Fernando Perez for this function. -// -// Examples -// -------- -// Make a figure twice as tall as it is wide:: -// -// w, h = figaspect(2.) -// fig = Figure(figsize=(w, h)) -// ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) -// ax.imshow(A, **kwargs) -// -// Make a figure with the proper aspect for an array:: -// -// A = rand(5, 3) -// w, h = figaspect(A) -// fig = Figure(figsize=(w, h)) -// ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) -// ax.imshow(A, **kwargs) -// -//go:linkname Figaspect py.figaspect -func Figaspect(arg *py.Object) *py.Object - -// Return the names of the available scales. -// -//go:linkname GetScaleNames py.get_scale_names -func GetScaleNames() *py.Object - -// [*Deprecated*] Add a colormap to the set recognized by :func:`get_cmap`. -// -// Register a new colormap to be accessed by name :: -// -// LinearSegmentedColormap('swirly', data, lut) -// register_cmap(cmap=swirly_cmap) -// -// Parameters -// ---------- -// name : str, optional -// -// The name that can be used in :func:`get_cmap` or :rc:`image.cmap` -// -// If absent, the name will be the :attr:`~matplotlib.colors.Colormap.name` -// attribute of the *cmap*. -// -// cmap : matplotlib.colors.Colormap -// -// Despite being the second argument and having a default value, this -// is a required argument. -// -// override_builtin : bool -// -// Allow built-in colormaps to be overridden by a user-supplied -// colormap. -// -// Please do not use this unless you are sure you need it. -// -// Notes -// ----- -// .. deprecated:: 3.7 -// -// Use ``matplotlib.colormaps.register(name)`` instead. -// -//go:linkname RegisterCmap py.register_cmap -func RegisterCmap(name *py.Object, cmap *py.Object) *py.Object - -// Connect to the display hook of the current shell. -// -// The display hook gets called when the read-evaluate-print-loop (REPL) of -// the shell has finished the execution of a command. We use this callback -// to be able to automatically update a figure in interactive mode. -// -// This works both with IPython and with vanilla python shells. -// -//go:linkname InstallReplDisplayhook py.install_repl_displayhook -func InstallReplDisplayhook() *py.Object - -// Disconnect from the display hook of the current shell. -// -//go:linkname UninstallReplDisplayhook py.uninstall_repl_displayhook -func UninstallReplDisplayhook() *py.Object - -// Redraw all stale managed figures, or, if *force* is True, all managed -// figures. -// -//go:linkname DrawAll py.draw_all -func DrawAll(force *py.Object) *py.Object - -// Configure Matplotlib's logging levels. -// -// Matplotlib uses the standard library `logging` framework under the root -// logger 'matplotlib'. This is a helper function to: -// -// - set Matplotlib's root logger level -// - set the root logger handler's level, creating the handler -// if it does not exist yet -// -// Typically, one should call “set_loglevel("info")“ or -// “set_loglevel("debug")“ to get additional debugging information. -// -// Users or applications that are installing their own logging handlers -// may want to directly manipulate “logging.getLogger('matplotlib')“ rather -// than use this function. -// -// Parameters -// ---------- -// level : {"notset", "debug", "info", "warning", "error", "critical"} -// -// The log level of the handler. -// -// Notes -// ----- -// The first time this function is called, an additional handler is attached -// to Matplotlib's root handler; this handler is reused every time and this -// function simply manipulates the logger and handler's level. -// -//go:linkname SetLoglevel py.set_loglevel -func SetLoglevel(__llgo_va_list ...interface{}) *py.Object - -// Find artist objects. -// -// Recursively find all `.Artist` instances contained in the artist. -// -// Parameters -// ---------- -// match -// -// A filter criterion for the matches. This can be -// -// - *None*: Return all objects contained in artist. -// - A function with signature ``def match(artist: Artist) -> bool``. -// The result will only contain artists for which the function -// returns *True*. -// - A class instance: e.g., `.Line2D`. The result will only contain -// artists of this class or its subclasses (``isinstance`` check). -// -// include_self : bool -// -// Include *self* in the list to be checked for a match. -// -// Returns -// ------- -// list of `.Artist` -// -//go:linkname Findobj py.findobj -func Findobj(o *py.Object, match *py.Object, includeSelf *py.Object) *py.Object - -// Set the pyplot backend. -// -// Switching to an interactive backend is possible only if no event loop for -// another interactive backend has started. Switching to and from -// non-interactive backends is always possible. -// -// If the new backend is different than the current backend then all open -// Figures will be closed via “plt.close('all')“. -// -// Parameters -// ---------- -// newbackend : str -// -// The case-insensitive name of the backend to use. -// -//go:linkname SwitchBackend py.switch_backend -func SwitchBackend(newbackend *py.Object) *py.Object - -// Create a new figure manager instance. -// -//go:linkname NewFigureManager py.new_figure_manager -func NewFigureManager(__llgo_va_list ...interface{}) *py.Object - -// Redraw the current figure if in interactive mode. -// -// .. warning:: -// -// End users will typically not have to call this function because the -// the interactive mode takes care of this. -// -//go:linkname DrawIfInteractive py.draw_if_interactive -func DrawIfInteractive(__llgo_va_list ...interface{}) *py.Object - -// Display all open figures. -// -// Parameters -// ---------- -// block : bool, optional -// -// Whether to wait for all figures to be closed before returning. -// -// If `True` block and run the GUI main loop until all figure windows -// are closed. -// -// If `False` ensure that all figure windows are displayed and return -// immediately. In this case, you are responsible for ensuring -// that the event loop is running to have responsive figures. -// -// Defaults to True in non-interactive mode and to False in interactive -// mode (see `.pyplot.isinteractive`). -// -// See Also -// -------- -// ion : Enable interactive mode, which shows / updates the figure after -// -// every plotting command, so that calling ``show()`` is not necessary. -// -// ioff : Disable interactive mode. -// savefig : Save the figure to an image file instead of showing it on screen. -// -// Notes -// ----- -// **Saving figures to file and showing a window at the same time** -// -// If you want an image file as well as a user interface window, use -// `.pyplot.savefig` before `.pyplot.show`. At the end of (a blocking) -// “show()“ the figure is closed and thus unregistered from pyplot. Calling -// `.pyplot.savefig` afterwards would save a new and thus empty figure. This -// limitation of command order does not apply if the show is non-blocking or -// if you keep a reference to the figure and use `.Figure.savefig`. -// -// **Auto-show in jupyter notebooks** -// -// The jupyter backends (activated via “%matplotlib inline“, -// “%matplotlib notebook“, or “%matplotlib widget“), call “show()“ at -// the end of every cell by default. Thus, you usually don't have to call it -// explicitly there. -// -//go:linkname Show py.show -func Show(__llgo_va_list ...interface{}) *py.Object - -// Return whether plots are updated after every plotting command. -// -// The interactive mode is mainly useful if you build plots from the command -// line and want to see the effect of each command while you are building the -// figure. -// -// In interactive mode: -// -// - newly created figures will be shown immediately; -// - figures will automatically redraw on change; -// - `.pyplot.show` will not block by default. -// -// In non-interactive mode: -// -// - newly created figures and changes to figures will not be reflected until -// explicitly asked to be; -// - `.pyplot.show` will block by default. -// -// See Also -// -------- -// ion : Enable interactive mode. -// ioff : Disable interactive mode. -// show : Show all figures (and maybe block). -// pause : Show all figures, and block for a time. -// -//go:linkname Isinteractive py.isinteractive -func Isinteractive() *py.Object - -// Disable interactive mode. -// -// See `.pyplot.isinteractive` for more details. -// -// See Also -// -------- -// ion : Enable interactive mode. -// isinteractive : Whether interactive mode is enabled. -// show : Show all figures (and maybe block). -// pause : Show all figures, and block for a time. -// -// Notes -// ----- -// For a temporary change, this can be used as a context manager:: -// -// # if interactive mode is on -// # then figures will be shown on creation -// plt.ion() -// # This figure will be shown immediately -// fig = plt.figure() -// -// with plt.ioff(): -// # interactive mode will be off -// # figures will not automatically be shown -// fig2 = plt.figure() -// # ... -// -// To enable optional usage as a context manager, this function returns a -// `~contextlib.ExitStack` object, which is not intended to be stored or -// accessed by the user. -// -//go:linkname Ioff py.ioff -func Ioff() *py.Object - -// Enable interactive mode. -// -// See `.pyplot.isinteractive` for more details. -// -// See Also -// -------- -// ioff : Disable interactive mode. -// isinteractive : Whether interactive mode is enabled. -// show : Show all figures (and maybe block). -// pause : Show all figures, and block for a time. -// -// Notes -// ----- -// For a temporary change, this can be used as a context manager:: -// -// # if interactive mode is off -// # then figures will not be shown on creation -// plt.ioff() -// # This figure will not be shown immediately -// fig = plt.figure() -// -// with plt.ion(): -// # interactive mode will be on -// # figures will automatically be shown -// fig2 = plt.figure() -// # ... -// -// To enable optional usage as a context manager, this function returns a -// `~contextlib.ExitStack` object, which is not intended to be stored or -// accessed by the user. -// -//go:linkname Ion py.ion -func Ion() *py.Object - -// Run the GUI event loop for *interval* seconds. -// -// If there is an active figure, it will be updated and displayed before the -// pause, and the GUI event loop (if any) will run during the pause. -// -// This can be used for crude animation. For more complex animation use -// :mod:`matplotlib.animation`. -// -// If there is no active figure, sleep for *interval* seconds instead. -// -// See Also -// -------- -// matplotlib.animation : Proper animations -// show : Show all figures and optional block until all figures are closed. -// -//go:linkname Pause py.pause -func Pause(interval *py.Object) *py.Object - -// Set the current `.rcParams`. *group* is the grouping for the rc, e.g., -// for “lines.linewidth“ the group is “lines“, for -// “axes.facecolor“, the group is “axes“, and so on. Group may -// also be a list or tuple of group names, e.g., (*xtick*, *ytick*). -// *kwargs* is a dictionary attribute name/value pairs, e.g.,:: -// -// rc('lines', linewidth=2, color='r') -// -// sets the current `.rcParams` and is equivalent to:: -// -// rcParams['lines.linewidth'] = 2 -// rcParams['lines.color'] = 'r' -// -// The following aliases are available to save typing for interactive users: -// -// ===== ================= -// Alias Property -// ===== ================= -// 'lw' 'linewidth' -// 'ls' 'linestyle' -// 'c' 'color' -// 'fc' 'facecolor' -// 'ec' 'edgecolor' -// 'mew' 'markeredgewidth' -// 'aa' 'antialiased' -// ===== ================= -// -// Thus you could abbreviate the above call as:: -// -// rc('lines', lw=2, c='r') -// -// Note you can use python's kwargs dictionary facility to store -// dictionaries of default parameters. e.g., you can customize the -// font rc as follows:: -// -// font = {'family' : 'monospace', -// 'weight' : 'bold', -// 'size' : 'larger'} -// rc('font', **font) # pass in the font dict as kwargs -// -// This enables you to easily switch between several configurations. Use -// “matplotlib.style.use('default')“ or :func:`~matplotlib.rcdefaults` to -// restore the default `.rcParams` after changes. -// -// Notes -// ----- -// Similar functionality is available by using the normal dict interface, i.e. -// “rcParams.update({"lines.linewidth": 2, ...})“ (but “rcParams.update“ -// does not support abbreviations or grouping). -// -//go:linkname Rc py.rc -func Rc(group *py.Object) *py.Object - -// Return a context manager for temporarily changing rcParams. -// -// The :rc:`backend` will not be reset by the context manager. -// -// rcParams changed both through the context manager invocation and -// in the body of the context will be reset on context exit. -// -// Parameters -// ---------- -// rc : dict -// -// The rcParams to temporarily set. -// -// fname : str or path-like -// -// A file with Matplotlib rc settings. If both *fname* and *rc* are given, -// settings from *rc* take precedence. -// -// See Also -// -------- -// :ref:`customizing-with-matplotlibrc-files` -// -// Examples -// -------- -// Passing explicit values via a dict:: -// -// with mpl.rc_context({'interactive': False}): -// fig, ax = plt.subplots() -// ax.plot(range(3), range(3)) -// fig.savefig('example.png') -// plt.close(fig) -// -// Loading settings from a file:: -// -// with mpl.rc_context(fname='print.rc'): -// plt.plot(x, y) # uses 'print.rc' -// -// Setting in the context body:: -// -// with mpl.rc_context(): -// # will be reset -// mpl.rcParams['lines.linewidth'] = 5 -// plt.plot(x, y) -// -//go:linkname RcContext py.rc_context -func RcContext(rc *py.Object, fname *py.Object) *py.Object - -// Restore the `.rcParams` from Matplotlib's internal default style. -// -// Style-blacklisted `.rcParams` (defined in -// “matplotlib.style.core.STYLE_BLACKLIST“) are not updated. -// -// See Also -// -------- -// matplotlib.rc_file_defaults -// -// Restore the `.rcParams` from the rc file originally loaded by -// Matplotlib. -// -// matplotlib.style.use -// -// Use a specific style file. Call ``style.use('default')`` to restore -// the default style. -// -//go:linkname Rcdefaults py.rcdefaults -func Rcdefaults() *py.Object - -// Return the value of an `.Artist`'s *property*, or print all of them. -// -// Parameters -// ---------- -// obj : `~matplotlib.artist.Artist` -// -// The queried artist; e.g., a `.Line2D`, a `.Text`, or an `~.axes.Axes`. -// -// property : str or None, default: None -// -// If *property* is 'somename', this function returns -// ``obj.get_somename()``. -// -// If it's None (or unset), it *prints* all gettable properties from -// *obj*. Many properties have aliases for shorter typing, e.g. 'lw' is -// an alias for 'linewidth'. In the output, aliases and full property -// names will be listed as: -// -// property or alias = value -// -// e.g.: -// -// linewidth or lw = 2 -// -// See Also -// -------- -// setp -// -//go:linkname Getp py.getp -func Getp(obj *py.Object, __llgo_va_list ...interface{}) *py.Object - -// Return the value of an `.Artist`'s *property*, or print all of them. -// -// Parameters -// ---------- -// obj : `~matplotlib.artist.Artist` -// -// The queried artist; e.g., a `.Line2D`, a `.Text`, or an `~.axes.Axes`. -// -// property : str or None, default: None -// -// If *property* is 'somename', this function returns -// ``obj.get_somename()``. -// -// If it's None (or unset), it *prints* all gettable properties from -// *obj*. Many properties have aliases for shorter typing, e.g. 'lw' is -// an alias for 'linewidth'. In the output, aliases and full property -// names will be listed as: -// -// property or alias = value -// -// e.g.: -// -// linewidth or lw = 2 -// -// See Also -// -------- -// setp -// -//go:linkname Get py.get -func Get(obj *py.Object, __llgo_va_list ...interface{}) *py.Object - -// Set one or more properties on an `.Artist`, or list allowed values. -// -// Parameters -// ---------- -// obj : `~matplotlib.artist.Artist` or list of `.Artist` -// -// The artist(s) whose properties are being set or queried. When setting -// properties, all artists are affected; when querying the allowed values, -// only the first instance in the sequence is queried. -// -// For example, two lines can be made thicker and red with a single call: -// -// >>> x = arange(0, 1, 0.01) -// >>> lines = plot(x, sin(2*pi*x), x, sin(4*pi*x)) -// >>> setp(lines, linewidth=2, color='r') -// -// file : file-like, default: `sys.stdout` -// -// Where `setp` writes its output when asked to list allowed values. -// -// >>> with open('output.log') as file: -// ... setp(line, file=file) -// -// The default, ``None``, means `sys.stdout`. -// -// *args, **kwargs -// -// The properties to set. The following combinations are supported: -// -// - Set the linestyle of a line to be dashed: -// -// >>> line, = plot([1, 2, 3]) -// >>> setp(line, linestyle='--') -// -// - Set multiple properties at once: -// -// >>> setp(line, linewidth=2, color='r') -// -// - List allowed values for a line's linestyle: -// -// >>> setp(line, 'linestyle') -// linestyle: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// -// - List all properties that can be set, and their allowed values: -// -// >>> setp(line) -// agg_filter: a filter function, ... -// [long output listing omitted] -// -// `setp` also supports MATLAB style string/value pairs. For example, the -// following are equivalent: -// -// >>> setp(lines, 'linewidth', 2, 'color', 'r') # MATLAB style -// >>> setp(lines, linewidth=2, color='r') # Python style -// -// See Also -// -------- -// getp -// -//go:linkname Setp py.setp -func Setp(obj *py.Object, __llgo_va_list ...interface{}) *py.Object - -// Turn on `xkcd `_ sketch-style drawing mode. -// -// This will only have an effect on things drawn after this function is called. -// -// For best results, install the `xkcd script `_ -// font; xkcd fonts are not packaged with Matplotlib. -// -// Parameters -// ---------- -// scale : float, optional -// -// The amplitude of the wiggle perpendicular to the source line. -// -// length : float, optional -// -// The length of the wiggle along the line. -// -// randomness : float, optional -// -// The scale factor by which the length is shrunken or expanded. -// -// Notes -// ----- -// This function works by a number of rcParams, so it will probably -// override others you have set before. -// -// If you want the effects of this function to be temporary, it can -// be used as a context manager, for example:: -// -// with plt.xkcd(): -// # This figure will be in XKCD-style -// fig1 = plt.figure() -// # ... -// -// # This figure will be in regular style -// fig2 = plt.figure() -// -//go:linkname Xkcd py.xkcd -func Xkcd(scale *py.Object, length *py.Object, randomness *py.Object) *py.Object - -// Create a new figure, or activate an existing figure. -// -// Parameters -// ---------- -// num : int or str or `.Figure` or `.SubFigure`, optional -// -// A unique identifier for the figure. -// -// If a figure with that identifier already exists, this figure is made -// active and returned. An integer refers to the ``Figure.number`` -// attribute, a string refers to the figure label. -// -// If there is no figure with the identifier or *num* is not given, a new -// figure is created, made active and returned. If *num* is an int, it -// will be used for the ``Figure.number`` attribute, otherwise, an -// auto-generated integer value is used (starting at 1 and incremented -// for each new figure). If *num* is a string, the figure label and the -// window title is set to this value. If num is a ``SubFigure``, its -// parent ``Figure`` is activated. -// -// figsize : (float, float), default: :rc:`figure.figsize` -// -// Width, height in inches. -// -// dpi : float, default: :rc:`figure.dpi` -// -// The resolution of the figure in dots-per-inch. -// -// facecolor : color, default: :rc:`figure.facecolor` -// -// The background color. -// -// edgecolor : color, default: :rc:`figure.edgecolor` -// -// The border color. -// -// frameon : bool, default: True -// -// If False, suppress drawing the figure frame. -// -// FigureClass : subclass of `~matplotlib.figure.Figure` -// -// If set, an instance of this subclass will be created, rather than a -// plain `.Figure`. -// -// clear : bool, default: False -// -// If True and the figure already exists, then it is cleared. -// -// layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, default: None -// -// The layout mechanism for positioning of plot elements to avoid -// overlapping Axes decorations (labels, ticks, etc). Note that layout -// managers can measurably slow down figure display. -// -// - 'constrained': The constrained layout solver adjusts axes sizes -// to avoid overlapping axes decorations. Can handle complex plot -// layouts and colorbars, and is thus recommended. -// -// See :ref:`constrainedlayout_guide` -// for examples. -// -// - 'compressed': uses the same algorithm as 'constrained', but -// removes extra space between fixed-aspect-ratio Axes. Best for -// simple grids of axes. -// -// - 'tight': Use the tight layout mechanism. This is a relatively -// simple algorithm that adjusts the subplot parameters so that -// decorations do not overlap. See `.Figure.set_tight_layout` for -// further details. -// -// - 'none': Do not use a layout engine. -// -// - A `.LayoutEngine` instance. Builtin layout classes are -// `.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily -// accessible by 'constrained' and 'tight'. Passing an instance -// allows third parties to provide their own layout engine. -// -// If not given, fall back to using the parameters *tight_layout* and -// *constrained_layout*, including their config defaults -// :rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`. -// -// **kwargs -// -// Additional keyword arguments are passed to the `.Figure` constructor. -// -// Returns -// ------- -// `~matplotlib.figure.Figure` -// -// Notes -// ----- -// A newly created figure is passed to the `~.FigureCanvasBase.new_manager` -// method or the `new_figure_manager` function provided by the current -// backend, which install a canvas and a manager on the figure. -// -// Once this is done, :rc:`figure.hooks` are called, one at a time, on the -// figure; these hooks allow arbitrary customization of the figure (e.g., -// attaching callbacks) or of associated elements (e.g., modifying the -// toolbar). See :doc:`/gallery/user_interfaces/mplcvd` for an example of -// toolbar customization. -// -// If you are creating many figures, make sure you explicitly call -// `.pyplot.close` on the figures you are not using, because this will -// enable pyplot to properly clean up the memory. -// -// `~matplotlib.rcParams` defines the default values, which can be modified -// in the matplotlibrc file. -// -//go:linkname Figure py.figure -func Figure(num *py.Object, figsize *py.Object, dpi *py.Object) *py.Object - -// Get the current figure. -// -// If there is currently no figure on the pyplot figure stack, a new one is -// created using `~.pyplot.figure()`. (To test whether there is currently a -// figure on the pyplot figure stack, check whether `~.pyplot.get_fignums()` -// is empty.) -// -//go:linkname Gcf py.gcf -func Gcf() *py.Object - -// Return whether the figure with the given id exists. -// -// Parameters -// ---------- -// num : int or str -// A figure identifier. -// -// Returns -// ------- -// bool -// Whether or not a figure with id *num* exists. -// -//go:linkname FignumExists py.fignum_exists -func FignumExists(num *py.Object) *py.Object - -// Return a list of existing figure numbers. -// -//go:linkname GetFignums py.get_fignums -func GetFignums() *py.Object - -// Return a list of existing figure labels. -// -//go:linkname GetFiglabels py.get_figlabels -func GetFiglabels() *py.Object - -// Return the figure manager of the current figure. -// -// The figure manager is a container for the actual backend-depended window -// that displays the figure on screen. -// -// If no current figure exists, a new one is created, and its figure -// manager is returned. -// -// Returns -// ------- -// `.FigureManagerBase` or backend-dependent subclass thereof -// -//go:linkname GetCurrentFigManager py.get_current_fig_manager -func GetCurrentFigManager() *py.Object - -// Bind function *func* to event *s*. -// -// Parameters -// ---------- -// s : str -// -// One of the following events ids: -// -// - 'button_press_event' -// - 'button_release_event' -// - 'draw_event' -// - 'key_press_event' -// - 'key_release_event' -// - 'motion_notify_event' -// - 'pick_event' -// - 'resize_event' -// - 'scroll_event' -// - 'figure_enter_event', -// - 'figure_leave_event', -// - 'axes_enter_event', -// - 'axes_leave_event' -// - 'close_event'. -// -// func : callable -// -// The callback function to be executed, which must have the -// signature:: -// -// def func(event: Event) -> Any -// -// For the location events (button and key press/release), if the -// mouse is over the Axes, the ``inaxes`` attribute of the event will -// be set to the `~matplotlib.axes.Axes` the event occurs is over, and -// additionally, the variables ``xdata`` and ``ydata`` attributes will -// be set to the mouse location in data coordinates. See `.KeyEvent` -// and `.MouseEvent` for more info. -// -// .. note:: -// -// If func is a method, this only stores a weak reference to the -// method. Thus, the figure does not influence the lifetime of -// the associated object. Usually, you want to make sure that the -// object is kept alive throughout the lifetime of the figure by -// holding a reference to it. -// -// Returns -// ------- -// cid -// -// A connection id that can be used with -// `.FigureCanvasBase.mpl_disconnect`. -// -// Examples -// -------- -// :: -// -// def on_press(event): -// print('you pressed', event.button, event.xdata, event.ydata) -// -// cid = canvas.mpl_connect('button_press_event', on_press) -// -//go:linkname Connect py.connect -func Connect(s *py.Object, func_ *py.Object) *py.Object - -// Disconnect the callback with id *cid*. -// -// Examples -// -------- -// :: -// -// cid = canvas.mpl_connect('button_press_event', on_press) -// # ... later -// canvas.mpl_disconnect(cid) -// -//go:linkname Disconnect py.disconnect -func Disconnect(cid *py.Object) *py.Object - -// Close a figure window. -// -// Parameters -// ---------- -// fig : None or int or str or `.Figure` -// -// The figure to close. There are a number of ways to specify this: -// -// - *None*: the current figure -// - `.Figure`: the given `.Figure` instance -// - ``int``: a figure number -// - ``str``: a figure name -// - 'all': all figures -// -//go:linkname Close py.close -func Close(fig *py.Object) *py.Object - -// Clear the current figure. -// -//go:linkname Clf py.clf -func Clf() *py.Object - -// Redraw the current figure. -// -// This is used to update a figure that has been altered, but not -// automatically re-drawn. If interactive mode is on (via `.ion()`), this -// should be only rarely needed, but there may be ways to modify the state of -// a figure without marking it as "stale". Please report these cases as bugs. -// -// This is equivalent to calling “fig.canvas.draw_idle()“, where “fig“ is -// the current figure. -// -// See Also -// -------- -// .FigureCanvasBase.draw_idle -// .FigureCanvasBase.draw -// -//go:linkname Draw py.draw -func Draw() *py.Object - -// Save the current figure. -// -// Call signature:: -// -// savefig(fname, *, transparent=None, dpi='figure', format=None, -// metadata=None, bbox_inches=None, pad_inches=0.1, -// facecolor='auto', edgecolor='auto', backend=None, -// **kwargs -// ) -// -// The available output formats depend on the backend being used. -// -// Parameters -// ---------- -// fname : str or path-like or binary file-like -// -// A path, or a Python file-like object, or -// possibly some backend-dependent object such as -// `matplotlib.backends.backend_pdf.PdfPages`. -// -// If *format* is set, it determines the output format, and the file -// is saved as *fname*. Note that *fname* is used verbatim, and there -// is no attempt to make the extension, if any, of *fname* match -// *format*, and no extension is appended. -// -// If *format* is not set, then the format is inferred from the -// extension of *fname*, if there is one. If *format* is not -// set and *fname* has no extension, then the file is saved with -// :rc:`savefig.format` and the appropriate extension is appended to -// *fname*. -// -// Other Parameters -// ---------------- -// transparent : bool, default: :rc:`savefig.transparent` -// -// If *True*, the Axes patches will all be transparent; the -// Figure patch will also be transparent unless *facecolor* -// and/or *edgecolor* are specified via kwargs. -// -// If *False* has no effect and the color of the Axes and -// Figure patches are unchanged (unless the Figure patch -// is specified via the *facecolor* and/or *edgecolor* keyword -// arguments in which case those colors are used). -// -// The transparency of these patches will be restored to their -// original values upon exit of this function. -// -// This is useful, for example, for displaying -// a plot on top of a colored background on a web page. -// -// dpi : float or 'figure', default: :rc:`savefig.dpi` -// -// The resolution in dots per inch. If 'figure', use the figure's -// dpi value. -// -// format : str -// -// The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when -// this is unset is documented under *fname*. -// -// metadata : dict, optional -// -// Key/value pairs to store in the image metadata. The supported keys -// and defaults depend on the image format and backend: -// -// - 'png' with Agg backend: See the parameter ``metadata`` of -// `~.FigureCanvasAgg.print_png`. -// - 'pdf' with pdf backend: See the parameter ``metadata`` of -// `~.backend_pdf.PdfPages`. -// - 'svg' with svg backend: See the parameter ``metadata`` of -// `~.FigureCanvasSVG.print_svg`. -// - 'eps' and 'ps' with PS backend: Only 'Creator' is supported. -// -// Not supported for 'pgf', 'raw', and 'rgba' as those formats do not support -// embedding metadata. -// Does not currently support 'jpg', 'tiff', or 'webp', but may include -// embedding EXIF metadata in the future. -// -// bbox_inches : str or `.Bbox`, default: :rc:`savefig.bbox` -// -// Bounding box in inches: only the given portion of the figure is -// saved. If 'tight', try to figure out the tight bbox of the figure. -// -// pad_inches : float or 'layout', default: :rc:`savefig.pad_inches` -// -// Amount of padding in inches around the figure when bbox_inches is -// 'tight'. If 'layout' use the padding from the constrained or -// compressed layout engine; ignored if one of those engines is not in -// use. -// -// facecolor : color or 'auto', default: :rc:`savefig.facecolor` -// -// The facecolor of the figure. If 'auto', use the current figure -// facecolor. -// -// edgecolor : color or 'auto', default: :rc:`savefig.edgecolor` -// -// The edgecolor of the figure. If 'auto', use the current figure -// edgecolor. -// -// backend : str, optional -// -// Use a non-default backend to render the file, e.g. to render a -// png file with the "cairo" backend rather than the default "agg", -// or a pdf file with the "pgf" backend rather than the default -// "pdf". Note that the default backend is normally sufficient. See -// :ref:`the-builtin-backends` for a list of valid backends for each -// file format. Custom backends can be referenced as "module://...". -// -// orientation : {'landscape', 'portrait'} -// -// Currently only supported by the postscript backend. -// -// papertype : str -// -// One of 'letter', 'legal', 'executive', 'ledger', 'a0' through -// 'a10', 'b0' through 'b10'. Only supported for postscript -// output. -// -// bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional -// -// A list of extra artists that will be considered when the -// tight bbox is calculated. -// -// pil_kwargs : dict, optional -// -// Additional keyword arguments that are passed to -// `PIL.Image.Image.save` when saving the figure. -// -//go:linkname Savefig py.savefig -func Savefig(__llgo_va_list ...interface{}) *py.Object - -// Place a legend on the figure. -// -// Call signatures:: -// -// figlegend() -// figlegend(handles, labels) -// figlegend(handles=handles) -// figlegend(labels) -// -// The call signatures correspond to the following different ways to use -// this method: -// -// **1. Automatic detection of elements to be shown in the legend** -// -// The elements to be added to the legend are automatically determined, -// when you do not pass in any extra arguments. -// -// In this case, the labels are taken from the artist. You can specify -// them either at artist creation or by calling the -// :meth:`~.Artist.set_label` method on the artist:: -// -// plt.plot([1, 2, 3], label='Inline label') -// plt.figlegend() -// -// or:: -// -// line, = plt.plot([1, 2, 3]) -// line.set_label('Label via method') -// plt.figlegend() -// -// Specific lines can be excluded from the automatic legend element -// selection by defining a label starting with an underscore. -// This is default for all artists, so calling `.Figure.legend` without -// any arguments and without setting the labels manually will result in -// no legend being drawn. -// -// **2. Explicitly listing the artists and labels in the legend** -// -// For full control of which artists have a legend entry, it is possible -// to pass an iterable of legend artists followed by an iterable of -// legend labels respectively:: -// -// plt.figlegend([line1, line2, line3], ['label1', 'label2', 'label3']) -// -// **3. Explicitly listing the artists in the legend** -// -// This is similar to 2, but the labels are taken from the artists' -// label properties. Example:: -// -// line1, = ax1.plot([1, 2, 3], label='label1') -// line2, = ax2.plot([1, 2, 3], label='label2') -// plt.figlegend(handles=[line1, line2]) -// -// **4. Labeling existing plot elements** -// -// .. admonition:: Discouraged -// -// This call signature is discouraged, because the relation between -// plot elements and labels is only implicit by their order and can -// easily be mixed up. -// -// To make a legend for all artists on all Axes, call this function with -// an iterable of strings, one for each legend item. For example:: -// -// fig, (ax1, ax2) = plt.subplots(1, 2) -// ax1.plot([1, 3, 5], color='blue') -// ax2.plot([2, 4, 6], color='red') -// plt.figlegend(['the blues', 'the reds']) -// -// Parameters -// ---------- -// handles : list of `.Artist`, optional -// -// A list of Artists (lines, patches) to be added to the legend. -// Use this together with *labels*, if you need full control on what -// is shown in the legend and the automatic mechanism described above -// is not sufficient. -// -// The length of handles and labels should be the same in this -// case. If they are not, they are truncated to the smaller length. -// -// labels : list of str, optional -// -// A list of labels to show next to the artists. -// Use this together with *handles*, if you need full control on what -// is shown in the legend and the automatic mechanism described above -// is not sufficient. -// -// Returns -// ------- -// `~matplotlib.legend.Legend` -// -// Other Parameters -// ---------------- -// -// loc : str or pair of floats, default: 'upper right' -// -// The location of the legend. -// -// The strings ``'upper left'``, ``'upper right'``, ``'lower left'``, -// ``'lower right'`` place the legend at the corresponding corner of the -// figure. -// -// The strings ``'upper center'``, ``'lower center'``, ``'center left'``, -// ``'center right'`` place the legend at the center of the corresponding edge -// of the figure. -// -// The string ``'center'`` places the legend at the center of the figure. -// -// The location can also be a 2-tuple giving the coordinates of the lower-left -// corner of the legend in figure coordinates (in which case *bbox_to_anchor* -// will be ignored). -// -// For back-compatibility, ``'center right'`` (but no other location) can also -// be spelled ``'right'``, and each "string" location can also be given as a -// numeric value: -// -// ================== ============= -// Location String Location Code -// ================== ============= -// 'best' (Axes only) 0 -// 'upper right' 1 -// 'upper left' 2 -// 'lower left' 3 -// 'lower right' 4 -// 'right' 5 -// 'center left' 6 -// 'center right' 7 -// 'lower center' 8 -// 'upper center' 9 -// 'center' 10 -// ================== ============= -// -// If a figure is using the constrained layout manager, the string codes -// of the *loc* keyword argument can get better layout behaviour using the -// prefix 'outside'. There is ambiguity at the corners, so 'outside -// upper right' will make space for the legend above the rest of the -// axes in the layout, and 'outside right upper' will make space on the -// right side of the layout. In addition to the values of *loc* -// listed above, we have 'outside right upper', 'outside right lower', -// 'outside left upper', and 'outside left lower'. See -// :ref:`legend_guide` for more details. -// -// bbox_to_anchor : `.BboxBase`, 2-tuple, or 4-tuple of floats -// -// Box that is used to position the legend in conjunction with *loc*. -// Defaults to `axes.bbox` (if called as a method to `.Axes.legend`) or -// `figure.bbox` (if `.Figure.legend`). This argument allows arbitrary -// placement of the legend. -// -// Bbox coordinates are interpreted in the coordinate system given by -// *bbox_transform*, with the default transform -// Axes or Figure coordinates, depending on which ``legend`` is called. -// -// If a 4-tuple or `.BboxBase` is given, then it specifies the bbox -// ``(x, y, width, height)`` that the legend is placed in. -// To put the legend in the best location in the bottom right -// quadrant of the axes (or figure):: -// -// loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.5) -// -// A 2-tuple ``(x, y)`` places the corner of the legend specified by *loc* at -// x, y. For example, to put the legend's upper right-hand corner in the -// center of the axes (or figure) the following keywords can be used:: -// -// loc='upper right', bbox_to_anchor=(0.5, 0.5) -// -// ncols : int, default: 1 -// -// The number of columns that the legend has. -// -// For backward compatibility, the spelling *ncol* is also supported -// but it is discouraged. If both are given, *ncols* takes precedence. -// -// prop : None or `~matplotlib.font_manager.FontProperties` or dict -// -// The font properties of the legend. If None (default), the current -// :data:`matplotlib.rcParams` will be used. -// -// fontsize : int or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'} -// -// The font size of the legend. If the value is numeric the size will be the -// absolute font size in points. String values are relative to the current -// default font size. This argument is only used if *prop* is not specified. -// -// labelcolor : str or list, default: :rc:`legend.labelcolor` -// -// The color of the text in the legend. Either a valid color string -// (for example, 'red'), or a list of color strings. The labelcolor can -// also be made to match the color of the line or marker using 'linecolor', -// 'markerfacecolor' (or 'mfc'), or 'markeredgecolor' (or 'mec'). -// -// Labelcolor can be set globally using :rc:`legend.labelcolor`. If None, -// use :rc:`text.color`. -// -// numpoints : int, default: :rc:`legend.numpoints` -// -// The number of marker points in the legend when creating a legend -// entry for a `.Line2D` (line). -// -// scatterpoints : int, default: :rc:`legend.scatterpoints` -// -// The number of marker points in the legend when creating -// a legend entry for a `.PathCollection` (scatter plot). -// -// scatteryoffsets : iterable of floats, default: “[0.375, 0.5, 0.3125]“ -// -// The vertical offset (relative to the font size) for the markers -// created for a scatter plot legend entry. 0.0 is at the base the -// legend text, and 1.0 is at the top. To draw all markers at the -// same height, set to ``[0.5]``. -// -// markerscale : float, default: :rc:`legend.markerscale` -// -// The relative size of legend markers compared to the originally drawn ones. -// -// markerfirst : bool, default: True -// -// If *True*, legend marker is placed to the left of the legend label. -// If *False*, legend marker is placed to the right of the legend label. -// -// reverse : bool, default: False -// -// If *True*, the legend labels are displayed in reverse order from the input. -// If *False*, the legend labels are displayed in the same order as the input. -// -// .. versionadded:: 3.7 -// -// frameon : bool, default: :rc:`legend.frameon` -// -// Whether the legend should be drawn on a patch (frame). -// -// fancybox : bool, default: :rc:`legend.fancybox` -// -// Whether round edges should be enabled around the `.FancyBboxPatch` which -// makes up the legend's background. -// -// shadow : None, bool or dict, default: :rc:`legend.shadow` -// -// Whether to draw a shadow behind the legend. -// The shadow can be configured using `.Patch` keywords. -// Customization via :rc:`legend.shadow` is currently not supported. -// -// framealpha : float, default: :rc:`legend.framealpha` -// -// The alpha transparency of the legend's background. -// If *shadow* is activated and *framealpha* is ``None``, the default value is -// ignored. -// -// facecolor : "inherit" or color, default: :rc:`legend.facecolor` -// -// The legend's background color. -// If ``"inherit"``, use :rc:`axes.facecolor`. -// -// edgecolor : "inherit" or color, default: :rc:`legend.edgecolor` -// -// The legend's background patch edge color. -// If ``"inherit"``, use take :rc:`axes.edgecolor`. -// -// mode : {"expand", None} -// -// If *mode* is set to ``"expand"`` the legend will be horizontally -// expanded to fill the axes area (or *bbox_to_anchor* if defines -// the legend's size). -// -// bbox_transform : None or `~matplotlib.transforms.Transform` -// -// The transform for the bounding box (*bbox_to_anchor*). For a value -// of ``None`` (default) the Axes' -// :data:`~matplotlib.axes.Axes.transAxes` transform will be used. -// -// title : str or None -// -// The legend's title. Default is no title (``None``). -// -// title_fontproperties : None or `~matplotlib.font_manager.FontProperties` or dict -// -// The font properties of the legend's title. If None (default), the -// *title_fontsize* argument will be used if present; if *title_fontsize* is -// also None, the current :rc:`legend.title_fontsize` will be used. -// -// title_fontsize : int or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}, default: :rc:`legend.title_fontsize` -// -// The font size of the legend's title. -// Note: This cannot be combined with *title_fontproperties*. If you want -// to set the fontsize alongside other font properties, use the *size* -// parameter in *title_fontproperties*. -// -// alignment : {'center', 'left', 'right'}, default: 'center' -// -// The alignment of the legend title and the box of entries. The entries -// are aligned as a single block, so that markers always lined up. -// -// borderpad : float, default: :rc:`legend.borderpad` -// -// The fractional whitespace inside the legend border, in font-size units. -// -// labelspacing : float, default: :rc:`legend.labelspacing` -// -// The vertical space between the legend entries, in font-size units. -// -// handlelength : float, default: :rc:`legend.handlelength` -// -// The length of the legend handles, in font-size units. -// -// handleheight : float, default: :rc:`legend.handleheight` -// -// The height of the legend handles, in font-size units. -// -// handletextpad : float, default: :rc:`legend.handletextpad` -// -// The pad between the legend handle and text, in font-size units. -// -// borderaxespad : float, default: :rc:`legend.borderaxespad` -// -// The pad between the axes and legend border, in font-size units. -// -// columnspacing : float, default: :rc:`legend.columnspacing` -// -// The spacing between columns, in font-size units. -// -// handler_map : dict or None -// -// The custom dictionary mapping instances or types to a legend -// handler. This *handler_map* updates the default handler map -// found at `matplotlib.legend.Legend.get_legend_handler_map`. -// -// draggable : bool, default: False -// -// Whether the legend can be dragged with the mouse. -// -// See Also -// -------- -// .Axes.legend -// -// Notes -// ----- -// Some artists are not supported by this function. See -// :ref:`legend_guide` for details. -// -//go:linkname Figlegend py.figlegend -func Figlegend(__llgo_va_list ...interface{}) *py.Object - -// Add an Axes to the current figure and make it the current Axes. -// -// Call signatures:: -// -// plt.axes() -// plt.axes(rect, projection=None, polar=False, **kwargs) -// plt.axes(ax) -// -// Parameters -// ---------- -// arg : None or 4-tuple -// -// The exact behavior of this function depends on the type: -// -// - *None*: A new full window Axes is added using -// ``subplot(**kwargs)``. -// - 4-tuple of floats *rect* = ``(left, bottom, width, height)``. -// A new Axes is added with dimensions *rect* in normalized -// (0, 1) units using `~.Figure.add_axes` on the current figure. -// -// projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional -// -// The projection type of the `~.axes.Axes`. *str* is the name of -// a custom projection, see `~matplotlib.projections`. The default -// None results in a 'rectilinear' projection. -// -// polar : bool, default: False -// -// If True, equivalent to projection='polar'. -// -// sharex, sharey : `~matplotlib.axes.Axes`, optional -// -// Share the x or y `~matplotlib.axis` with sharex and/or sharey. -// The axis will have the same limits, ticks, and scale as the axis -// of the shared Axes. -// -// label : str -// -// A label for the returned Axes. -// -// Returns -// ------- -// `~.axes.Axes`, or a subclass of `~.axes.Axes` -// -// The returned axes class depends on the projection used. It is -// `~.axes.Axes` if rectilinear projection is used and -// `.projections.polar.PolarAxes` if polar projection is used. -// -// Other Parameters -// ---------------- -// **kwargs -// -// This method also takes the keyword arguments for -// the returned Axes class. The keyword arguments for the -// rectilinear Axes class `~.axes.Axes` can be found in -// the following table but there might also be other keyword -// arguments if another projection is used, see the actual Axes -// class. -// -// Properties: -// adjustable: {'box', 'datalim'} -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// anchor: (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} -// animated: bool -// aspect: {'auto', 'equal'} or float -// autoscale_on: bool -// autoscalex_on: unknown -// autoscaley_on: unknown -// axes_locator: Callable[[Axes, Renderer], Bbox] -// axisbelow: bool or 'line' -// box_aspect: float or None -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// facecolor or fc: color -// figure: `~matplotlib.figure.Figure` -// frame_on: bool -// gid: str -// in_layout: bool -// label: object -// mouseover: bool -// navigate: bool -// navigate_mode: unknown -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// position: [left, bottom, width, height] or `~matplotlib.transforms.Bbox` -// prop_cycle: `~cycler.Cycler` -// rasterization_zorder: float or None -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// subplotspec: unknown -// title: str -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// xbound: (lower: float, upper: float) -// xlabel: str -// xlim: (left: float, right: float) -// xmargin: float greater than -0.5 -// xscale: unknown -// xticklabels: unknown -// xticks: unknown -// ybound: (lower: float, upper: float) -// ylabel: str -// ylim: (bottom: float, top: float) -// ymargin: float greater than -0.5 -// yscale: unknown -// yticklabels: unknown -// yticks: unknown -// zorder: float -// -// See Also -// -------- -// .Figure.add_axes -// .pyplot.subplot -// .Figure.add_subplot -// .Figure.subplots -// .pyplot.subplots -// -// Examples -// -------- -// :: -// -// # Creating a new full window Axes -// plt.axes() -// -// # Creating a new Axes with specified dimensions and a grey background -// plt.axes((left, bottom, width, height), facecolor='grey') -// -//go:linkname Axes py.axes -func Axes(arg *py.Object) *py.Object - -// Remove an `~.axes.Axes` (defaulting to the current axes) from its figure. -// -//go:linkname Delaxes py.delaxes -func Delaxes(ax *py.Object) *py.Object - -// Set the current Axes to *ax* and the current Figure to the parent of *ax*. -// -//go:linkname Sca py.sca -func Sca(ax *py.Object) *py.Object - -// Clear the current axes. -// -//go:linkname Cla py.cla -func Cla() *py.Object - -// Add an Axes to the current figure or retrieve an existing Axes. -// -// This is a wrapper of `.Figure.add_subplot` which provides additional -// behavior when working with the implicit API (see the notes section). -// -// Call signatures:: -// -// subplot(nrows, ncols, index, **kwargs) -// subplot(pos, **kwargs) -// subplot(**kwargs) -// subplot(ax) -// -// Parameters -// ---------- -// *args : int, (int, int, *index*), or `.SubplotSpec`, default: (1, 1, 1) -// -// The position of the subplot described by one of -// -// - Three integers (*nrows*, *ncols*, *index*). The subplot will take the -// *index* position on a grid with *nrows* rows and *ncols* columns. -// *index* starts at 1 in the upper left corner and increases to the -// right. *index* can also be a two-tuple specifying the (*first*, -// *last*) indices (1-based, and including *last*) of the subplot, e.g., -// ``fig.add_subplot(3, 1, (1, 2))`` makes a subplot that spans the -// upper 2/3 of the figure. -// - A 3-digit integer. The digits are interpreted as if given separately -// as three single-digit integers, i.e. ``fig.add_subplot(235)`` is the -// same as ``fig.add_subplot(2, 3, 5)``. Note that this can only be used -// if there are no more than 9 subplots. -// - A `.SubplotSpec`. -// -// projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional -// -// The projection type of the subplot (`~.axes.Axes`). *str* is the name -// of a custom projection, see `~matplotlib.projections`. The default -// None results in a 'rectilinear' projection. -// -// polar : bool, default: False -// -// If True, equivalent to projection='polar'. -// -// sharex, sharey : `~matplotlib.axes.Axes`, optional -// -// Share the x or y `~matplotlib.axis` with sharex and/or sharey. The -// axis will have the same limits, ticks, and scale as the axis of the -// shared axes. -// -// label : str -// -// A label for the returned axes. -// -// Returns -// ------- -// `~.axes.Axes` -// -// The Axes of the subplot. The returned Axes can actually be an instance -// of a subclass, such as `.projections.polar.PolarAxes` for polar -// projections. -// -// Other Parameters -// ---------------- -// **kwargs -// -// This method also takes the keyword arguments for the returned axes -// base class; except for the *figure* argument. The keyword arguments -// for the rectilinear base class `~.axes.Axes` can be found in -// the following table but there might also be other keyword -// arguments if another projection is used. -// -// Properties: -// adjustable: {'box', 'datalim'} -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// anchor: (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} -// animated: bool -// aspect: {'auto', 'equal'} or float -// autoscale_on: bool -// autoscalex_on: unknown -// autoscaley_on: unknown -// axes_locator: Callable[[Axes, Renderer], Bbox] -// axisbelow: bool or 'line' -// box_aspect: float or None -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// facecolor or fc: color -// figure: `~matplotlib.figure.Figure` -// frame_on: bool -// gid: str -// in_layout: bool -// label: object -// mouseover: bool -// navigate: bool -// navigate_mode: unknown -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// position: [left, bottom, width, height] or `~matplotlib.transforms.Bbox` -// prop_cycle: `~cycler.Cycler` -// rasterization_zorder: float or None -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// subplotspec: unknown -// title: str -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// xbound: (lower: float, upper: float) -// xlabel: str -// xlim: (left: float, right: float) -// xmargin: float greater than -0.5 -// xscale: unknown -// xticklabels: unknown -// xticks: unknown -// ybound: (lower: float, upper: float) -// ylabel: str -// ylim: (bottom: float, top: float) -// ymargin: float greater than -0.5 -// yscale: unknown -// yticklabels: unknown -// yticks: unknown -// zorder: float -// -// Notes -// ----- -// Creating a new Axes will delete any preexisting Axes that -// overlaps with it beyond sharing a boundary:: -// -// import matplotlib.pyplot as plt -// # plot a line, implicitly creating a subplot(111) -// plt.plot([1, 2, 3]) -// # now create a subplot which represents the top plot of a grid -// # with 2 rows and 1 column. Since this subplot will overlap the -// # first, the plot (and its axes) previously created, will be removed -// plt.subplot(211) -// -// If you do not want this behavior, use the `.Figure.add_subplot` method -// or the `.pyplot.axes` function instead. -// -// If no *kwargs* are passed and there exists an Axes in the location -// specified by *args* then that Axes will be returned rather than a new -// Axes being created. -// -// If *kwargs* are passed and there exists an Axes in the location -// specified by *args*, the projection type is the same, and the -// *kwargs* match with the existing Axes, then the existing Axes is -// returned. Otherwise a new Axes is created with the specified -// parameters. We save a reference to the *kwargs* which we use -// for this comparison. If any of the values in *kwargs* are -// mutable we will not detect the case where they are mutated. -// In these cases we suggest using `.Figure.add_subplot` and the -// explicit Axes API rather than the implicit pyplot API. -// -// See Also -// -------- -// .Figure.add_subplot -// .pyplot.subplots -// .pyplot.axes -// .Figure.subplots -// -// Examples -// -------- -// :: -// -// plt.subplot(221) -// -// # equivalent but more general -// ax1 = plt.subplot(2, 2, 1) -// -// # add a subplot with no frame -// ax2 = plt.subplot(222, frameon=False) -// -// # add a polar subplot -// plt.subplot(223, projection='polar') -// -// # add a red subplot that shares the x-axis with ax1 -// plt.subplot(224, sharex=ax1, facecolor='red') -// -// # delete ax2 from the figure -// plt.delaxes(ax2) -// -// # add ax2 to the figure again -// plt.subplot(ax2) -// -// # make the first axes "current" again -// plt.subplot(221) -// -//go:linkname Subplot py.subplot -func Subplot(__llgo_va_list ...interface{}) *py.Object - -// Create a figure and a set of subplots. -// -// This utility wrapper makes it convenient to create common layouts of -// subplots, including the enclosing figure object, in a single call. -// -// Parameters -// ---------- -// nrows, ncols : int, default: 1 -// -// Number of rows/columns of the subplot grid. -// -// sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False -// -// Controls sharing of properties among x (*sharex*) or y (*sharey*) -// axes: -// -// - True or 'all': x- or y-axis will be shared among all subplots. -// - False or 'none': each subplot x- or y-axis will be independent. -// - 'row': each subplot row will share an x- or y-axis. -// - 'col': each subplot column will share an x- or y-axis. -// -// When subplots have a shared x-axis along a column, only the x tick -// labels of the bottom subplot are created. Similarly, when subplots -// have a shared y-axis along a row, only the y tick labels of the first -// column subplot are created. To later turn other subplots' ticklabels -// on, use `~matplotlib.axes.Axes.tick_params`. -// -// When subplots have a shared axis that has units, calling -// `~matplotlib.axis.Axis.set_units` will update each axis with the -// new units. -// -// squeeze : bool, default: True -// -// - If True, extra dimensions are squeezed out from the returned -// array of `~matplotlib.axes.Axes`: -// -// - if only one subplot is constructed (nrows=ncols=1), the -// resulting single Axes object is returned as a scalar. -// -// - for Nx1 or 1xM subplots, the returned object is a 1D numpy -// object array of Axes objects. -// -// - for NxM, subplots with N>1 and M>1 are returned as a 2D array. -// -// - If False, no squeezing at all is done: the returned Axes object is -// always a 2D array containing Axes instances, even if it ends up -// being 1x1. -// -// width_ratios : array-like of length *ncols*, optional -// -// Defines the relative widths of the columns. Each column gets a -// relative width of ``width_ratios[i] / sum(width_ratios)``. -// If not given, all columns will have the same width. Equivalent -// to ``gridspec_kw={'width_ratios': [...]}``. -// -// height_ratios : array-like of length *nrows*, optional -// -// Defines the relative heights of the rows. Each row gets a -// relative height of ``height_ratios[i] / sum(height_ratios)``. -// If not given, all rows will have the same height. Convenience -// for ``gridspec_kw={'height_ratios': [...]}``. -// -// subplot_kw : dict, optional -// -// Dict with keywords passed to the -// `~matplotlib.figure.Figure.add_subplot` call used to create each -// subplot. -// -// gridspec_kw : dict, optional -// -// Dict with keywords passed to the `~matplotlib.gridspec.GridSpec` -// constructor used to create the grid the subplots are placed on. -// -// **fig_kw -// -// All additional keyword arguments are passed to the -// `.pyplot.figure` call. -// -// Returns -// ------- -// fig : `.Figure` -// -// ax : `~matplotlib.axes.Axes` or array of Axes -// -// *ax* can be either a single `~.axes.Axes` object, or an array of Axes -// objects if more than one subplot was created. The dimensions of the -// resulting array can be controlled with the squeeze keyword, see above. -// -// Typical idioms for handling the return value are:: -// -// # using the variable ax for single a Axes -// fig, ax = plt.subplots() -// -// # using the variable axs for multiple Axes -// fig, axs = plt.subplots(2, 2) -// -// # using tuple unpacking for multiple Axes -// fig, (ax1, ax2) = plt.subplots(1, 2) -// fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2) -// -// The names ``ax`` and pluralized ``axs`` are preferred over ``axes`` -// because for the latter it's not clear if it refers to a single -// `~.axes.Axes` instance or a collection of these. -// -// See Also -// -------- -// .pyplot.figure -// .pyplot.subplot -// .pyplot.axes -// .Figure.subplots -// .Figure.add_subplot -// -// Examples -// -------- -// :: -// -// # First create some toy data: -// x = np.linspace(0, 2*np.pi, 400) -// y = np.sin(x**2) -// -// # Create just a figure and only one subplot -// fig, ax = plt.subplots() -// ax.plot(x, y) -// ax.set_title('Simple plot') -// -// # Create two subplots and unpack the output array immediately -// f, (ax1, ax2) = plt.subplots(1, 2, sharey=True) -// ax1.plot(x, y) -// ax1.set_title('Sharing Y axis') -// ax2.scatter(x, y) -// -// # Create four polar axes and access them through the returned array -// fig, axs = plt.subplots(2, 2, subplot_kw=dict(projection="polar")) -// axs[0, 0].plot(x, y) -// axs[1, 1].scatter(x, y) -// -// # Share a X axis with each column of subplots -// plt.subplots(2, 2, sharex='col') -// -// # Share a Y axis with each row of subplots -// plt.subplots(2, 2, sharey='row') -// -// # Share both X and Y axes with all subplots -// plt.subplots(2, 2, sharex='all', sharey='all') -// -// # Note that this is the same as -// plt.subplots(2, 2, sharex=True, sharey=True) -// -// # Create figure number 10 with a single subplot -// # and clears it if it already exists. -// fig, ax = plt.subplots(num=10, clear=True) -// -//go:linkname Subplots py.subplots -func Subplots(nrows *py.Object, ncols *py.Object) *py.Object - -// Build a layout of Axes based on ASCII art or nested lists. -// -// This is a helper function to build complex GridSpec layouts visually. -// -// See :ref:`mosaic` -// for an example and full API documentation -// -// Parameters -// ---------- -// mosaic : list of list of {hashable or nested} or str -// -// A visual layout of how you want your Axes to be arranged -// labeled as strings. For example :: -// -// x = [['A panel', 'A panel', 'edge'], -// ['C panel', '.', 'edge']] -// -// produces 4 axes: -// -// - 'A panel' which is 1 row high and spans the first two columns -// - 'edge' which is 2 rows high and is on the right edge -// - 'C panel' which in 1 row and 1 column wide in the bottom left -// - a blank space 1 row and 1 column wide in the bottom center -// -// Any of the entries in the layout can be a list of lists -// of the same form to create nested layouts. -// -// If input is a str, then it must be of the form :: -// -// ''' -// AAE -// C.E -// ''' -// -// where each character is a column and each line is a row. -// This only allows only single character Axes labels and does -// not allow nesting but is very terse. -// -// sharex, sharey : bool, default: False -// -// If True, the x-axis (*sharex*) or y-axis (*sharey*) will be shared -// among all subplots. In that case, tick label visibility and axis units -// behave as for `subplots`. If False, each subplot's x- or y-axis will -// be independent. -// -// width_ratios : array-like of length *ncols*, optional -// -// Defines the relative widths of the columns. Each column gets a -// relative width of ``width_ratios[i] / sum(width_ratios)``. -// If not given, all columns will have the same width. Convenience -// for ``gridspec_kw={'width_ratios': [...]}``. -// -// height_ratios : array-like of length *nrows*, optional -// -// Defines the relative heights of the rows. Each row gets a -// relative height of ``height_ratios[i] / sum(height_ratios)``. -// If not given, all rows will have the same height. Convenience -// for ``gridspec_kw={'height_ratios': [...]}``. -// -// empty_sentinel : object, optional -// -// Entry in the layout to mean "leave this space empty". Defaults -// to ``'.'``. Note, if *layout* is a string, it is processed via -// `inspect.cleandoc` to remove leading white space, which may -// interfere with using white-space as the empty sentinel. -// -// subplot_kw : dict, optional -// -// Dictionary with keywords passed to the `.Figure.add_subplot` call -// used to create each subplot. These values may be overridden by -// values in *per_subplot_kw*. -// -// per_subplot_kw : dict, optional -// -// A dictionary mapping the Axes identifiers or tuples of identifiers -// to a dictionary of keyword arguments to be passed to the -// `.Figure.add_subplot` call used to create each subplot. The values -// in these dictionaries have precedence over the values in -// *subplot_kw*. -// -// If *mosaic* is a string, and thus all keys are single characters, -// it is possible to use a single string instead of a tuple as keys; -// i.e. ``"AB"`` is equivalent to ``("A", "B")``. -// -// .. versionadded:: 3.7 -// -// gridspec_kw : dict, optional -// -// Dictionary with keywords passed to the `.GridSpec` constructor used -// to create the grid the subplots are placed on. -// -// **fig_kw -// -// All additional keyword arguments are passed to the -// `.pyplot.figure` call. -// -// Returns -// ------- -// fig : `.Figure` -// -// The new figure -// -// dict[label, Axes] -// -// A dictionary mapping the labels to the Axes objects. The order of -// the axes is left-to-right and top-to-bottom of their position in the -// total layout. -// -//go:linkname SubplotMosaic py.subplot_mosaic -func SubplotMosaic(mosaic *py.Object) *py.Object - -// Create a subplot at a specific location inside a regular grid. -// -// Parameters -// ---------- -// shape : (int, int) -// -// Number of rows and of columns of the grid in which to place axis. -// -// loc : (int, int) -// -// Row number and column number of the axis location within the grid. -// -// rowspan : int, default: 1 -// -// Number of rows for the axis to span downwards. -// -// colspan : int, default: 1 -// -// Number of columns for the axis to span to the right. -// -// fig : `.Figure`, optional -// -// Figure to place the subplot in. Defaults to the current figure. -// -// **kwargs -// -// Additional keyword arguments are handed to `~.Figure.add_subplot`. -// -// Returns -// ------- -// `~.axes.Axes` -// -// The Axes of the subplot. The returned Axes can actually be an instance -// of a subclass, such as `.projections.polar.PolarAxes` for polar -// projections. -// -// Notes -// ----- -// The following call :: -// -// ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan) -// -// is identical to :: -// -// fig = gcf() -// gs = fig.add_gridspec(nrows, ncols) -// ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan]) -// -//go:linkname Subplot2grid py.subplot2grid -func Subplot2grid(shape *py.Object, loc *py.Object, rowspan *py.Object, colspan *py.Object, fig *py.Object) *py.Object - -// Make and return a second axes that shares the *x*-axis. The new axes will -// overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be -// on the right. -// -// Examples -// -------- -// :doc:`/gallery/subplots_axes_and_figures/two_scales` -// -//go:linkname Twinx py.twinx -func Twinx(ax *py.Object) *py.Object - -// Make and return a second axes that shares the *y*-axis. The new axes will -// overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be -// on the top. -// -// Examples -// -------- -// :doc:`/gallery/subplots_axes_and_figures/two_scales` -// -//go:linkname Twiny py.twiny -func Twiny(ax *py.Object) *py.Object - -// Launch a subplot tool window for a figure. -// -// Returns -// ------- -// `matplotlib.widgets.SubplotTool` -// -//go:linkname SubplotTool py.subplot_tool -func SubplotTool(targetfig *py.Object) *py.Object - -// Turn the axes box on or off on the current axes. -// -// Parameters -// ---------- -// on : bool or None -// -// The new `~matplotlib.axes.Axes` box state. If ``None``, toggle -// the state. -// -// See Also -// -------- -// :meth:`matplotlib.axes.Axes.set_frame_on` -// :meth:`matplotlib.axes.Axes.get_frame_on` -// -//go:linkname Box py.box -func Box(on *py.Object) *py.Object - -// Get or set the x limits of the current axes. -// -// Call signatures:: -// -// left, right = xlim() # return the current xlim -// xlim((left, right)) # set the xlim to left, right -// xlim(left, right) # set the xlim to left, right -// -// If you do not specify args, you can pass *left* or *right* as kwargs, -// i.e.:: -// -// xlim(right=3) # adjust the right leaving left unchanged -// xlim(left=1) # adjust the left leaving right unchanged -// -// Setting limits turns autoscaling off for the x-axis. -// -// Returns -// ------- -// left, right -// -// A tuple of the new x-axis limits. -// -// Notes -// ----- -// Calling this function with no arguments (e.g. “xlim()“) is the pyplot -// equivalent of calling `~.Axes.get_xlim` on the current axes. -// Calling this function with arguments is the pyplot equivalent of calling -// `~.Axes.set_xlim` on the current axes. All arguments are passed though. -// -//go:linkname Xlim py.xlim -func Xlim(__llgo_va_list ...interface{}) *py.Object - -// Get or set the y-limits of the current axes. -// -// Call signatures:: -// -// bottom, top = ylim() # return the current ylim -// ylim((bottom, top)) # set the ylim to bottom, top -// ylim(bottom, top) # set the ylim to bottom, top -// -// If you do not specify args, you can alternatively pass *bottom* or -// *top* as kwargs, i.e.:: -// -// ylim(top=3) # adjust the top leaving bottom unchanged -// ylim(bottom=1) # adjust the bottom leaving top unchanged -// -// Setting limits turns autoscaling off for the y-axis. -// -// Returns -// ------- -// bottom, top -// -// A tuple of the new y-axis limits. -// -// Notes -// ----- -// Calling this function with no arguments (e.g. “ylim()“) is the pyplot -// equivalent of calling `~.Axes.get_ylim` on the current axes. -// Calling this function with arguments is the pyplot equivalent of calling -// `~.Axes.set_ylim` on the current axes. All arguments are passed though. -// -//go:linkname Ylim py.ylim -func Ylim(__llgo_va_list ...interface{}) *py.Object - -// Get or set the current tick locations and labels of the x-axis. -// -// Pass no arguments to return the current values without modifying them. -// -// Parameters -// ---------- -// ticks : array-like, optional -// -// The list of xtick locations. Passing an empty list removes all xticks. -// -// labels : array-like, optional -// -// The labels to place at the given *ticks* locations. This argument can -// only be passed if *ticks* is passed as well. -// -// minor : bool, default: False -// -// If ``False``, get/set the major ticks/labels; if ``True``, the minor -// ticks/labels. -// -// **kwargs -// -// `.Text` properties can be used to control the appearance of the labels. -// -// Returns -// ------- -// locs -// -// The list of xtick locations. -// -// labels -// -// The list of xlabel `.Text` objects. -// -// Notes -// ----- -// Calling this function with no arguments (e.g. “xticks()“) is the pyplot -// equivalent of calling `~.Axes.get_xticks` and `~.Axes.get_xticklabels` on -// the current axes. -// Calling this function with arguments is the pyplot equivalent of calling -// `~.Axes.set_xticks` and `~.Axes.set_xticklabels` on the current axes. -// -// Examples -// -------- -// >>> locs, labels = xticks() # Get the current locations and labels. -// >>> xticks(np.arange(0, 1, step=0.2)) # Set label locations. -// >>> xticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels. -// >>> xticks([0, 1, 2], ['January', 'February', 'March'], -// ... rotation=20) # Set text labels and properties. -// >>> xticks([]) # Disable xticks. -// -//go:linkname Xticks py.xticks -func Xticks(ticks *py.Object, labels *py.Object) *py.Object - -// Get or set the current tick locations and labels of the y-axis. -// -// Pass no arguments to return the current values without modifying them. -// -// Parameters -// ---------- -// ticks : array-like, optional -// -// The list of ytick locations. Passing an empty list removes all yticks. -// -// labels : array-like, optional -// -// The labels to place at the given *ticks* locations. This argument can -// only be passed if *ticks* is passed as well. -// -// minor : bool, default: False -// -// If ``False``, get/set the major ticks/labels; if ``True``, the minor -// ticks/labels. -// -// **kwargs -// -// `.Text` properties can be used to control the appearance of the labels. -// -// Returns -// ------- -// locs -// -// The list of ytick locations. -// -// labels -// -// The list of ylabel `.Text` objects. -// -// Notes -// ----- -// Calling this function with no arguments (e.g. “yticks()“) is the pyplot -// equivalent of calling `~.Axes.get_yticks` and `~.Axes.get_yticklabels` on -// the current axes. -// Calling this function with arguments is the pyplot equivalent of calling -// `~.Axes.set_yticks` and `~.Axes.set_yticklabels` on the current axes. -// -// Examples -// -------- -// >>> locs, labels = yticks() # Get the current locations and labels. -// >>> yticks(np.arange(0, 1, step=0.2)) # Set label locations. -// >>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels. -// >>> yticks([0, 1, 2], ['January', 'February', 'March'], -// ... rotation=45) # Set text labels and properties. -// >>> yticks([]) # Disable yticks. -// -//go:linkname Yticks py.yticks -func Yticks(ticks *py.Object, labels *py.Object) *py.Object - -// Get or set the radial gridlines on the current polar plot. -// -// Call signatures:: -// -// lines, labels = rgrids() -// lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs) -// -// When called with no arguments, `.rgrids` simply returns the tuple -// (*lines*, *labels*). When called with arguments, the labels will -// appear at the specified radial distances and angle. -// -// Parameters -// ---------- -// radii : tuple with floats -// -// The radii for the radial gridlines -// -// labels : tuple with strings or None -// -// The labels to use at each radial gridline. The -// `matplotlib.ticker.ScalarFormatter` will be used if None. -// -// angle : float -// -// The angular position of the radius labels in degrees. -// -// fmt : str or None -// -// Format string used in `matplotlib.ticker.FormatStrFormatter`. -// For example '%f'. -// -// Returns -// ------- -// lines : list of `.lines.Line2D` -// -// The radial gridlines. -// -// labels : list of `.text.Text` -// -// The tick labels. -// -// Other Parameters -// ---------------- -// **kwargs -// -// *kwargs* are optional `.Text` properties for the labels. -// -// See Also -// -------- -// .pyplot.thetagrids -// .projections.polar.PolarAxes.set_rgrids -// .Axis.get_gridlines -// .Axis.get_ticklabels -// -// Examples -// -------- -// :: -// -// # set the locations of the radial gridlines -// lines, labels = rgrids( (0.25, 0.5, 1.0) ) -// -// # set the locations and labels of the radial gridlines -// lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' )) -// -//go:linkname Rgrids py.rgrids -func Rgrids(radii *py.Object, labels *py.Object, angle *py.Object, fmt *py.Object) *py.Object - -// Get or set the theta gridlines on the current polar plot. -// -// Call signatures:: -// -// lines, labels = thetagrids() -// lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs) -// -// When called with no arguments, `.thetagrids` simply returns the tuple -// (*lines*, *labels*). When called with arguments, the labels will -// appear at the specified angles. -// -// Parameters -// ---------- -// angles : tuple with floats, degrees -// -// The angles of the theta gridlines. -// -// labels : tuple with strings or None -// -// The labels to use at each radial gridline. The -// `.projections.polar.ThetaFormatter` will be used if None. -// -// fmt : str or None -// -// Format string used in `matplotlib.ticker.FormatStrFormatter`. -// For example '%f'. Note that the angle in radians will be used. -// -// Returns -// ------- -// lines : list of `.lines.Line2D` -// -// The theta gridlines. -// -// labels : list of `.text.Text` -// -// The tick labels. -// -// Other Parameters -// ---------------- -// **kwargs -// -// *kwargs* are optional `.Text` properties for the labels. -// -// See Also -// -------- -// .pyplot.rgrids -// .projections.polar.PolarAxes.set_thetagrids -// .Axis.get_gridlines -// .Axis.get_ticklabels -// -// Examples -// -------- -// :: -// -// # set the locations of the angular gridlines -// lines, labels = thetagrids(range(45, 360, 90)) -// -// # set the locations and labels of the angular gridlines -// lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE')) -// -//go:linkname Thetagrids py.thetagrids -func Thetagrids(angles *py.Object, labels *py.Object, fmt *py.Object) *py.Object - -// [*Deprecated*] Get a sorted list of all of the plotting commands. -// -// Notes -// ----- -// .. deprecated:: 3.7 -// -//go:linkname GetPlotCommands py.get_plot_commands -func GetPlotCommands() *py.Object - -// Add a colorbar to a plot. -// -// Parameters -// ---------- -// mappable -// -// The `matplotlib.cm.ScalarMappable` (i.e., `.AxesImage`, -// `.ContourSet`, etc.) described by this colorbar. This argument is -// mandatory for the `.Figure.colorbar` method but optional for the -// `.pyplot.colorbar` function, which sets the default to the current -// image. -// -// Note that one can create a `.ScalarMappable` "on-the-fly" to -// generate colorbars not attached to a previously drawn artist, e.g. -// :: -// -// fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmap), ax=ax) -// -// cax : `~matplotlib.axes.Axes`, optional -// -// Axes into which the colorbar will be drawn. If `None`, then a new -// Axes is created and the space for it will be stolen from the Axes(s) -// specified in *ax*. -// -// ax : `~matplotlib.axes.Axes` or iterable or `numpy.ndarray` of Axes, optional -// -// The one or more parent Axes from which space for a new colorbar Axes -// will be stolen. This parameter is only used if *cax* is not set. -// -// Defaults to the Axes that contains the mappable used to create the -// colorbar. -// -// use_gridspec : bool, optional -// -// If *cax* is ``None``, a new *cax* is created as an instance of -// Axes. If *ax* is positioned with a subplotspec and *use_gridspec* -// is ``True``, then *cax* is also positioned with a subplotspec. -// -// Returns -// ------- -// colorbar : `~matplotlib.colorbar.Colorbar` -// -// Other Parameters -// ---------------- -// -// location : None or {'left', 'right', 'top', 'bottom'} -// -// The location, relative to the parent axes, where the colorbar axes -// is created. It also determines the *orientation* of the colorbar -// (colorbars on the left and right are vertical, colorbars at the top -// and bottom are horizontal). If None, the location will come from the -// *orientation* if it is set (vertical colorbars on the right, horizontal -// ones at the bottom), or default to 'right' if *orientation* is unset. -// -// orientation : None or {'vertical', 'horizontal'} -// -// The orientation of the colorbar. It is preferable to set the *location* -// of the colorbar, as that also determines the *orientation*; passing -// incompatible values for *location* and *orientation* raises an exception. -// -// fraction : float, default: 0.15 -// -// Fraction of original axes to use for colorbar. -// -// shrink : float, default: 1.0 -// -// Fraction by which to multiply the size of the colorbar. -// -// aspect : float, default: 20 -// -// Ratio of long to short dimensions. -// -// pad : float, default: 0.05 if vertical, 0.15 if horizontal -// -// Fraction of original axes between colorbar and new image axes. -// -// anchor : (float, float), optional -// -// The anchor point of the colorbar axes. -// Defaults to (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal. -// -// panchor : (float, float), or *False*, optional -// -// The anchor point of the colorbar parent axes. If *False*, the parent -// axes' anchor will be unchanged. -// Defaults to (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal. -// -// extend : {'neither', 'both', 'min', 'max'} -// -// Make pointed end(s) for out-of-range values (unless 'neither'). These are -// set for a given colormap using the colormap set_under and set_over methods. -// -// extendfrac : {*None*, 'auto', length, lengths} -// -// If set to *None*, both the minimum and maximum triangular colorbar -// extensions will have a length of 5% of the interior colorbar length (this -// is the default setting). -// -// If set to 'auto', makes the triangular colorbar extensions the same lengths -// as the interior boxes (when *spacing* is set to 'uniform') or the same -// lengths as the respective adjacent interior boxes (when *spacing* is set to -// 'proportional'). -// -// If a scalar, indicates the length of both the minimum and maximum -// triangular colorbar extensions as a fraction of the interior colorbar -// length. A two-element sequence of fractions may also be given, indicating -// the lengths of the minimum and maximum colorbar extensions respectively as -// a fraction of the interior colorbar length. -// -// extendrect : bool -// -// If *False* the minimum and maximum colorbar extensions will be triangular -// (the default). If *True* the extensions will be rectangular. -// -// spacing : {'uniform', 'proportional'} -// -// For discrete colorbars (`.BoundaryNorm` or contours), 'uniform' gives each -// color the same space; 'proportional' makes the space proportional to the -// data interval. -// -// ticks : None or list of ticks or Locator -// -// If None, ticks are determined automatically from the input. -// -// format : None or str or Formatter -// -// If None, `~.ticker.ScalarFormatter` is used. -// Format strings, e.g., ``"%4.2e"`` or ``"{x:.2e}"``, are supported. -// An alternative `~.ticker.Formatter` may be given instead. -// -// drawedges : bool -// -// Whether to draw lines at color boundaries. -// -// label : str -// -// The label on the colorbar's long axis. -// -// boundaries, values : None or a sequence -// -// If unset, the colormap will be displayed on a 0-1 scale. -// If sequences, *values* must have a length 1 less than *boundaries*. For -// each region delimited by adjacent entries in *boundaries*, the color mapped -// to the corresponding value in values will be used. -// Normally only useful for indexed colors (i.e. ``norm=NoNorm()``) or other -// unusual circumstances. -// -// Notes -// ----- -// If *mappable* is a `~.contour.ContourSet`, its *extend* kwarg is -// included automatically. -// -// The *shrink* kwarg provides a simple way to scale the colorbar with -// respect to the axes. Note that if *cax* is specified, it determines the -// size of the colorbar, and *shrink* and *aspect* are ignored. -// -// For more precise control, you can manually specify the positions of the -// axes objects in which the mappable and the colorbar are drawn. In this -// case, do not use any of the axes properties kwargs. -// -// It is known that some vector graphics viewers (svg and pdf) render -// white gaps between segments of the colorbar. This is due to bugs in -// the viewers, not Matplotlib. As a workaround, the colorbar can be -// rendered with overlapping segments:: -// -// cbar = colorbar() -// cbar.solids.set_edgecolor("face") -// draw() -// -// However, this has negative consequences in other circumstances, e.g. -// with semi-transparent images (alpha < 1) and colorbar extensions; -// therefore, this workaround is not used by default (see issue #1188). -// -//go:linkname Colorbar py.colorbar -func Colorbar(mappable *py.Object, cax *py.Object, ax *py.Object) *py.Object - -// Set the color limits of the current image. -// -// If either *vmin* or *vmax* is None, the image min/max respectively -// will be used for color scaling. -// -// If you want to set the clim of multiple images, use -// `~.ScalarMappable.set_clim` on every image, for example:: -// -// for im in gca().get_images(): -// im.set_clim(0, 0.5) -// -//go:linkname Clim py.clim -func Clim(vmin *py.Object, vmax *py.Object) *py.Object - -// Get a colormap instance, defaulting to rc values if *name* is None. -// -// Parameters -// ---------- -// name : `~matplotlib.colors.Colormap` or str or None, default: None -// -// If a `.Colormap` instance, it will be returned. Otherwise, the name of -// a colormap known to Matplotlib, which will be resampled by *lut*. The -// default, None, means :rc:`image.cmap`. -// -// lut : int or None, default: None -// -// If *name* is not already a Colormap instance and *lut* is not None, the -// colormap will be resampled to have *lut* entries in the lookup table. -// -// Returns -// ------- -// Colormap -// -//go:linkname GetCmap py.get_cmap -func GetCmap(name *py.Object, lut *py.Object) *py.Object - -// Set the default colormap, and applies it to the current image if any. -// -// Parameters -// ---------- -// cmap : `~matplotlib.colors.Colormap` or str -// -// A colormap instance or the name of a registered colormap. -// -// See Also -// -------- -// colormaps -// matplotlib.cm.register_cmap -// matplotlib.cm.get_cmap -// -//go:linkname SetCmap py.set_cmap -func SetCmap(cmap *py.Object) *py.Object - -// Read an image from a file into an array. -// -// .. note:: -// -// This function exists for historical reasons. It is recommended to -// use `PIL.Image.open` instead for loading images. -// -// Parameters -// ---------- -// fname : str or file-like -// -// The image file to read: a filename, a URL or a file-like object opened -// in read-binary mode. -// -// Passing a URL is deprecated. Please open the URL -// for reading and pass the result to Pillow, e.g. with -// ``np.array(PIL.Image.open(urllib.request.urlopen(url)))``. -// -// format : str, optional -// -// The image file format assumed for reading the data. The image is -// loaded as a PNG file if *format* is set to "png", if *fname* is a path -// or opened file with a ".png" extension, or if it is a URL. In all -// other cases, *format* is ignored and the format is auto-detected by -// `PIL.Image.open`. -// -// Returns -// ------- -// `numpy.array` -// -// The image data. The returned array has shape -// -// - (M, N) for grayscale images. -// - (M, N, 3) for RGB images. -// - (M, N, 4) for RGBA images. -// -// PNG images are returned as float arrays (0-1). All other formats are -// returned as int arrays, with a bit depth determined by the file's -// contents. -// -//go:linkname Imread py.imread -func Imread(fname *py.Object, format *py.Object) *py.Object - -// Colormap and save an array as an image file. -// -// RGB(A) images are passed through. Single channel images will be -// colormapped according to *cmap* and *norm*. -// -// .. note:: -// -// If you want to save a single channel image as gray scale please use an -// image I/O library (such as pillow, tifffile, or imageio) directly. -// -// Parameters -// ---------- -// fname : str or path-like or file-like -// -// A path or a file-like object to store the image in. -// If *format* is not set, then the output format is inferred from the -// extension of *fname*, if any, and from :rc:`savefig.format` otherwise. -// If *format* is set, it determines the output format. -// -// arr : array-like -// -// The image data. The shape can be one of -// MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA). -// -// vmin, vmax : float, optional -// -// *vmin* and *vmax* set the color scaling for the image by fixing the -// values that map to the colormap color limits. If either *vmin* -// or *vmax* is None, that limit is determined from the *arr* -// min/max value. -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// A Colormap instance or registered colormap name. The colormap -// maps scalar data to colors. It is ignored for RGB(A) data. -// -// format : str, optional -// -// The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when this -// is unset is documented under *fname*. -// -// origin : {'upper', 'lower'}, default: :rc:`image.origin` -// -// Indicates whether the ``(0, 0)`` index of the array is in the upper -// left or lower left corner of the axes. -// -// dpi : float -// -// The DPI to store in the metadata of the file. This does not affect the -// resolution of the output image. Depending on file format, this may be -// rounded to the nearest integer. -// -// metadata : dict, optional -// -// Metadata in the image file. The supported keys depend on the output -// format, see the documentation of the respective backends for more -// information. -// Currently only supported for "png", "pdf", "ps", "eps", and "svg". -// -// pil_kwargs : dict, optional -// -// Keyword arguments passed to `PIL.Image.Image.save`. If the 'pnginfo' -// key is present, it completely overrides *metadata*, including the -// default 'Software' key. -// -//go:linkname Imsave py.imsave -func Imsave(fname *py.Object, arr *py.Object) *py.Object - -// Display an array as a matrix in a new figure window. -// -// The origin is set at the upper left hand corner and rows (first -// dimension of the array) are displayed horizontally. The aspect -// ratio of the figure window is that of the array, unless this would -// make an excessively short or narrow figure. -// -// Tick labels for the xaxis are placed on top. -// -// Parameters -// ---------- -// A : 2D array-like -// -// The matrix to be displayed. -// -// fignum : None or int -// -// If *None*, create a new, appropriately sized figure window. -// -// If 0, use the current Axes (creating one if there is none, without ever -// adjusting the figure size). -// -// Otherwise, create a new Axes on the figure with the given number -// (creating it at the appropriate size if it does not exist, but not -// adjusting the figure size otherwise). Note that this will be drawn on -// top of any preexisting Axes on the figure. -// -// Returns -// ------- -// `~matplotlib.image.AxesImage` -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.axes.Axes.imshow` arguments -// -//go:linkname Matshow py.matshow -func Matshow(A *py.Object, fignum *py.Object) *py.Object - -// Make a polar plot. -// -// call signature:: -// -// polar(theta, r, **kwargs) -// -// Multiple *theta*, *r* arguments are supported, with format strings, as in -// `plot`. -// -//go:linkname Polar py.polar -func Polar(__llgo_va_list ...interface{}) *py.Object - -// Add a non-resampled image to the figure. -// -// The image is attached to the lower or upper left corner depending on -// *origin*. -// -// Parameters -// ---------- -// X -// -// The image data. This is an array of one of the following shapes: -// -// - (M, N): an image with scalar data. Color-mapping is controlled -// by *cmap*, *norm*, *vmin*, and *vmax*. -// - (M, N, 3): an image with RGB values (0-1 float or 0-255 int). -// - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), -// i.e. including transparency. -// -// xo, yo : int -// -// The *x*/*y* image offset in pixels. -// -// alpha : None or float -// -// The alpha blending value. -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *X* is RGB(A). -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *X* is RGB(A). -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// This parameter is ignored if *X* is RGB(A). -// -// origin : {'upper', 'lower'}, default: :rc:`image.origin` -// -// Indicates where the [0, 0] index of the array is in the upper left -// or lower left corner of the axes. -// -// resize : bool -// -// If *True*, resize the figure to match the given image size. -// -// Returns -// ------- -// `matplotlib.image.FigureImage` -// -// Other Parameters -// ---------------- -// **kwargs -// -// Additional kwargs are `.Artist` kwargs passed on to `.FigureImage`. -// -// Notes -// ----- -// figimage complements the Axes image (`~matplotlib.axes.Axes.imshow`) -// which will be resampled to fit the current Axes. If you want -// a resampled image to fill the entire figure, you can define an -// `~matplotlib.axes.Axes` with extent [0, 0, 1, 1]. -// -// Examples -// -------- -// :: -// -// f = plt.figure() -// nx = int(f.get_figwidth() * f.dpi) -// ny = int(f.get_figheight() * f.dpi) -// data = np.random.random((ny, nx)) -// f.figimage(data) -// plt.show() -// -//go:linkname Figimage py.figimage -func Figimage(X *py.Object, xo *py.Object, yo *py.Object, alpha *py.Object, norm *py.Object, cmap *py.Object, vmin *py.Object, vmax *py.Object, origin *py.Object, resize *py.Object) *py.Object - -// Add text to figure. -// -// Parameters -// ---------- -// x, y : float -// -// The position to place the text. By default, this is in figure -// coordinates, floats in [0, 1]. The coordinate system can be changed -// using the *transform* keyword. -// -// s : str -// -// The text string. -// -// fontdict : dict, optional -// -// A dictionary to override the default text properties. If not given, -// the defaults are determined by :rc:`font.*`. Properties passed as -// *kwargs* override the corresponding ones given in *fontdict*. -// -// Returns -// ------- -// `~.text.Text` -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.text.Text` properties -// -// Other miscellaneous text parameters. -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased: bool -// backgroundcolor: color -// bbox: dict with properties for `.patches.FancyBboxPatch` -// clip_box: unknown -// clip_on: unknown -// clip_path: unknown -// color or c: color -// figure: `~matplotlib.figure.Figure` -// fontfamily or family or fontname: {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'} -// fontproperties or font or font_properties: `.font_manager.FontProperties` or `str` or `pathlib.Path` -// fontsize or size: float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'} -// fontstretch or stretch: {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'} -// fontstyle or style: {'normal', 'italic', 'oblique'} -// fontvariant or variant: {'normal', 'small-caps'} -// fontweight or weight: {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'} -// gid: str -// horizontalalignment or ha: {'left', 'center', 'right'} -// in_layout: bool -// label: object -// linespacing: float (multiple of font size) -// math_fontfamily: str -// mouseover: bool -// multialignment or ma: {'left', 'right', 'center'} -// parse_math: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// position: (float, float) -// rasterized: bool -// rotation: float or {'vertical', 'horizontal'} -// rotation_mode: {None, 'default', 'anchor'} -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// text: object -// transform: `~matplotlib.transforms.Transform` -// transform_rotates_text: bool -// url: str -// usetex: bool or None -// verticalalignment or va: {'baseline', 'bottom', 'center', 'center_baseline', 'top'} -// visible: bool -// wrap: bool -// x: float -// y: float -// zorder: float -// -// See Also -// -------- -// .Axes.text -// .pyplot.text -// -//go:linkname Figtext py.figtext -func Figtext(x *py.Object, y *py.Object, s *py.Object, fontdict *py.Object) *py.Object - -// Get the current Axes. -// -// If there is currently no Axes on this Figure, a new one is created -// using `.Figure.add_subplot`. (To test whether there is currently an -// Axes on a Figure, check whether “figure.axes“ is empty. To test -// whether there is currently a Figure on the pyplot figure stack, check -// whether `.pyplot.get_fignums()` is empty.) -// -//go:linkname Gca py.gca -func Gca() *py.Object - -// Get the current colorable artist. -// -// Specifically, returns the current `.ScalarMappable` instance (`.Image` -// created by `imshow` or `figimage`, `.Collection` created by `pcolor` or -// `scatter`, etc.), or *None* if no such instance has been defined. -// -// The current image is an attribute of the current Axes, or the nearest -// earlier Axes in the current figure that contains an image. -// -// Notes -// ----- -// Historically, the only colorable artists were images; hence the name -// “gci“ (get current image). -// -//go:linkname Gci py.gci -func Gci() *py.Object - -// Blocking call to interact with a figure. -// -// Wait until the user clicks *n* times on the figure, and return the -// coordinates of each click in a list. -// -// There are three possible interactions: -// -// - Add a point. -// - Remove the most recently added point. -// - Stop the interaction and return the points added so far. -// -// The actions are assigned to mouse buttons via the arguments -// *mouse_add*, *mouse_pop* and *mouse_stop*. -// -// Parameters -// ---------- -// n : int, default: 1 -// -// Number of mouse clicks to accumulate. If negative, accumulate -// clicks until the input is terminated manually. -// -// timeout : float, default: 30 seconds -// -// Number of seconds to wait before timing out. If zero or negative -// will never time out. -// -// show_clicks : bool, default: True -// -// If True, show a red cross at the location of each click. -// -// mouse_add : `.MouseButton` or None, default: `.MouseButton.LEFT` -// -// Mouse button used to add points. -// -// mouse_pop : `.MouseButton` or None, default: `.MouseButton.RIGHT` -// -// Mouse button used to remove the most recently added point. -// -// mouse_stop : `.MouseButton` or None, default: `.MouseButton.MIDDLE` -// -// Mouse button used to stop input. -// -// Returns -// ------- -// list of tuples -// -// A list of the clicked (x, y) coordinates. -// -// Notes -// ----- -// The keyboard can also be used to select points in case your mouse -// does not have one or more of the buttons. The delete and backspace -// keys act like right-clicking (i.e., remove last point), the enter key -// terminates input and any other key (not already used by the window -// manager) selects a point. -// -//go:linkname Ginput py.ginput -func Ginput(n *py.Object, timeout *py.Object, showClicks *py.Object, mouseAdd *py.Object, mousePop *py.Object, mouseStop *py.Object) *py.Object - -// Adjust the subplot layout parameters. -// -// Unset parameters are left unmodified; initial values are given by -// :rc:`figure.subplot.[name]`. -// -// Parameters -// ---------- -// left : float, optional -// -// The position of the left edge of the subplots, -// as a fraction of the figure width. -// -// right : float, optional -// -// The position of the right edge of the subplots, -// as a fraction of the figure width. -// -// bottom : float, optional -// -// The position of the bottom edge of the subplots, -// as a fraction of the figure height. -// -// top : float, optional -// -// The position of the top edge of the subplots, -// as a fraction of the figure height. -// -// wspace : float, optional -// -// The width of the padding between subplots, -// as a fraction of the average Axes width. -// -// hspace : float, optional -// -// The height of the padding between subplots, -// as a fraction of the average Axes height. -// -//go:linkname SubplotsAdjust py.subplots_adjust -func SubplotsAdjust(left *py.Object, bottom *py.Object, right *py.Object, top *py.Object, wspace *py.Object, hspace *py.Object) *py.Object - -// Add a centered suptitle to the figure. -// -// Parameters -// ---------- -// t : str -// -// The suptitle text. -// -// x : float, default: 0.5 -// -// The x location of the text in figure coordinates. -// -// y : float, default: 0.98 -// -// The y location of the text in figure coordinates. -// -// horizontalalignment, ha : {'center', 'left', 'right'}, default: center -// -// The horizontal alignment of the text relative to (*x*, *y*). -// -// verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, default: top -// -// The vertical alignment of the text relative to (*x*, *y*). -// -// fontsize, size : default: :rc:`figure.titlesize` -// -// The font size of the text. See `.Text.set_size` for possible -// values. -// -// fontweight, weight : default: :rc:`figure.titleweight` -// -// The font weight of the text. See `.Text.set_weight` for possible -// values. -// -// Returns -// ------- -// text -// -// The `.Text` instance of the suptitle. -// -// Other Parameters -// ---------------- -// fontproperties : None or dict, optional -// -// A dict of font properties. If *fontproperties* is given the -// default values for font size and weight are taken from the -// `.FontProperties` defaults. :rc:`figure.titlesize` and -// :rc:`figure.titleweight` are ignored in this case. -// -// **kwargs -// -// Additional kwargs are `matplotlib.text.Text` properties. -// -//go:linkname Suptitle py.suptitle -func Suptitle(t *py.Object) *py.Object - -// Adjust the padding between and around subplots. -// -// To exclude an artist on the Axes from the bounding box calculation -// that determines the subplot parameters (i.e. legend, or annotation), -// set “a.set_in_layout(False)“ for that artist. -// -// Parameters -// ---------- -// pad : float, default: 1.08 -// -// Padding between the figure edge and the edges of subplots, -// as a fraction of the font size. -// -// h_pad, w_pad : float, default: *pad* -// -// Padding (height/width) between edges of adjacent subplots, -// as a fraction of the font size. -// -// rect : tuple (left, bottom, right, top), default: (0, 0, 1, 1) -// -// A rectangle in normalized figure coordinates into which the whole -// subplots area (including labels) will fit. -// -// See Also -// -------- -// .Figure.set_layout_engine -// .pyplot.tight_layout -// -//go:linkname TightLayout py.tight_layout -func TightLayout() *py.Object - -// Blocking call to interact with the figure. -// -// Wait for user input and return True if a key was pressed, False if a -// mouse button was pressed and None if no input was given within -// *timeout* seconds. Negative values deactivate *timeout*. -// -//go:linkname Waitforbuttonpress py.waitforbuttonpress -func Waitforbuttonpress(timeout *py.Object) *py.Object - -// Plot the autocorrelation of *x*. -// -// Parameters -// ---------- -// x : array-like -// -// detrend : callable, default: `.mlab.detrend_none` (no detrending) -// -// A detrending function applied to *x*. It must have the -// signature :: -// -// detrend(x: np.ndarray) -> np.ndarray -// -// normed : bool, default: True -// -// If ``True``, input vectors are normalised to unit length. -// -// usevlines : bool, default: True -// -// Determines the plot style. -// -// If ``True``, vertical lines are plotted from 0 to the acorr value -// using `.Axes.vlines`. Additionally, a horizontal line is plotted -// at y=0 using `.Axes.axhline`. -// -// If ``False``, markers are plotted at the acorr values using -// `.Axes.plot`. -// -// maxlags : int, default: 10 -// -// Number of lags to show. If ``None``, will return all -// ``2 * len(x) - 1`` lags. -// -// Returns -// ------- -// lags : array (length “2*maxlags+1“) -// -// The lag vector. -// -// c : array (length “2*maxlags+1“) -// -// The auto correlation vector. -// -// line : `.LineCollection` or `.Line2D` -// -// `.Artist` added to the Axes of the correlation: -// -// - `.LineCollection` if *usevlines* is True. -// - `.Line2D` if *usevlines* is False. -// -// b : `~matplotlib.lines.Line2D` or None -// -// Horizontal line at 0 if *usevlines* is True -// None *usevlines* is False. -// -// Other Parameters -// ---------------- -// linestyle : `~matplotlib.lines.Line2D` property, optional -// -// The linestyle for plotting the data points. -// Only used if *usevlines* is ``False``. -// -// marker : str, default: 'o' -// -// The marker for plotting the data points. -// Only used if *usevlines* is ``False``. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x* -// -// **kwargs -// -// Additional parameters are passed to `.Axes.vlines` and -// `.Axes.axhline` if *usevlines* is ``True``; otherwise they are -// passed to `.Axes.plot`. -// -// Notes -// ----- -// The cross correlation is performed with `numpy.correlate` with -// “mode = "full"“. -// -//go:linkname Acorr py.acorr -func Acorr(x *py.Object) *py.Object - -// Plot the angle spectrum. -// -// Compute the angle spectrum (wrapped phase spectrum) of *x*. -// Data is padded to a length of *pad_to* and the windowing function -// *window* is applied to the signal. -// -// Parameters -// ---------- -// x : 1-D array or sequence -// -// Array or sequence containing the data. -// -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. While not increasing the actual resolution of the spectrum (the -// minimum distance between resolvable peaks), this can give more points in -// the plot, allowing for more detail. This corresponds to the *n* parameter -// in the call to `~numpy.fft.fft`. The default is None, which sets *pad_to* -// equal to the length of the input signal (i.e. no padding). -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// Returns -// ------- -// spectrum : 1-D array -// -// The values for the angle spectrum in radians (real valued). -// -// freqs : 1-D array -// -// The frequencies corresponding to the elements in *spectrum*. -// -// line : `~matplotlib.lines.Line2D` -// -// The line created by this function. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// magnitude_spectrum -// -// Plots the magnitudes of the corresponding frequencies. -// -// phase_spectrum -// -// Plots the unwrapped version of this function. -// -// specgram -// -// Can plot the angle spectrum of segments within the signal in a -// colormap. -// -//go:linkname AngleSpectrum py.angle_spectrum -func AngleSpectrum(x *py.Object, Fs *py.Object, Fc *py.Object, window *py.Object, padTo *py.Object, sides *py.Object) *py.Object - -// Annotate the point *xy* with text *text*. -// -// In the simplest form, the text is placed at *xy*. -// -// Optionally, the text can be displayed in another position *xytext*. -// An arrow pointing from the text to the annotated point *xy* can then -// be added by defining *arrowprops*. -// -// Parameters -// ---------- -// text : str -// -// The text of the annotation. -// -// xy : (float, float) -// -// The point *(x, y)* to annotate. The coordinate system is determined -// by *xycoords*. -// -// xytext : (float, float), default: *xy* -// -// The position *(x, y)* to place the text at. The coordinate system -// is determined by *textcoords*. -// -// xycoords : single or two-tuple of str or `.Artist` or `.Transform` or callable, default: 'data' -// -// The coordinate system that *xy* is given in. The following types -// of values are supported: -// -// - One of the following strings: -// -// ==================== ============================================ -// Value Description -// ==================== ============================================ -// 'figure points' Points from the lower left of the figure -// 'figure pixels' Pixels from the lower left of the figure -// 'figure fraction' Fraction of figure from lower left -// 'subfigure points' Points from the lower left of the subfigure -// 'subfigure pixels' Pixels from the lower left of the subfigure -// 'subfigure fraction' Fraction of subfigure from lower left -// 'axes points' Points from lower left corner of axes -// 'axes pixels' Pixels from lower left corner of axes -// 'axes fraction' Fraction of axes from lower left -// 'data' Use the coordinate system of the object -// being annotated (default) -// 'polar' *(theta, r)* if not native 'data' -// coordinates -// ==================== ============================================ -// -// Note that 'subfigure pixels' and 'figure pixels' are the same -// for the parent figure, so users who want code that is usable in -// a subfigure can use 'subfigure pixels'. -// -// - An `.Artist`: *xy* is interpreted as a fraction of the artist's -// `~matplotlib.transforms.Bbox`. E.g. *(0, 0)* would be the lower -// left corner of the bounding box and *(0.5, 1)* would be the -// center top of the bounding box. -// -// - A `.Transform` to transform *xy* to screen coordinates. -// -// - A function with one of the following signatures:: -// -// def transform(renderer) -> Bbox -// def transform(renderer) -> Transform -// -// where *renderer* is a `.RendererBase` subclass. -// -// The result of the function is interpreted like the `.Artist` and -// `.Transform` cases above. -// -// - A tuple *(xcoords, ycoords)* specifying separate coordinate -// systems for *x* and *y*. *xcoords* and *ycoords* must each be -// of one of the above described types. -// -// See :ref:`plotting-guide-annotation` for more details. -// -// textcoords : single or two-tuple of str or `.Artist` or `.Transform` or callable, default: value of *xycoords* -// -// The coordinate system that *xytext* is given in. -// -// All *xycoords* values are valid as well as the following strings: -// -// ================= ================================================= -// Value Description -// ================= ================================================= -// 'offset points' Offset, in points, from the *xy* value -// 'offset pixels' Offset, in pixels, from the *xy* value -// 'offset fontsize' Offset, relative to fontsize, from the *xy* value -// ================= ================================================= -// -// arrowprops : dict, optional -// -// The properties used to draw a `.FancyArrowPatch` arrow between the -// positions *xy* and *xytext*. Defaults to None, i.e. no arrow is -// drawn. -// -// For historical reasons there are two different ways to specify -// arrows, "simple" and "fancy": -// -// **Simple arrow:** -// -// If *arrowprops* does not contain the key 'arrowstyle' the -// allowed keys are: -// -// ========== ================================================= -// Key Description -// ========== ================================================= -// width The width of the arrow in points -// headwidth The width of the base of the arrow head in points -// headlength The length of the arrow head in points -// shrink Fraction of total length to shrink from both ends -// ? Any `.FancyArrowPatch` property -// ========== ================================================= -// -// The arrow is attached to the edge of the text box, the exact -// position (corners or centers) depending on where it's pointing to. -// -// **Fancy arrow:** -// -// This is used if 'arrowstyle' is provided in the *arrowprops*. -// -// Valid keys are the following `.FancyArrowPatch` parameters: -// -// =============== =================================== -// Key Description -// =============== =================================== -// arrowstyle The arrow style -// connectionstyle The connection style -// relpos See below; default is (0.5, 0.5) -// patchA Default is bounding box of the text -// patchB Default is None -// shrinkA Default is 2 points -// shrinkB Default is 2 points -// mutation_scale Default is text size (in points) -// mutation_aspect Default is 1 -// ? Any `.FancyArrowPatch` property -// =============== =================================== -// -// The exact starting point position of the arrow is defined by -// *relpos*. It's a tuple of relative coordinates of the text box, -// where (0, 0) is the lower left corner and (1, 1) is the upper -// right corner. Values <0 and >1 are supported and specify points -// outside the text box. By default (0.5, 0.5), so the starting point -// is centered in the text box. -// -// annotation_clip : bool or None, default: None -// -// Whether to clip (i.e. not draw) the annotation when the annotation -// point *xy* is outside the axes area. -// -// - If *True*, the annotation will be clipped when *xy* is outside -// the axes. -// - If *False*, the annotation will always be drawn. -// - If *None*, the annotation will be clipped when *xy* is outside -// the axes and *xycoords* is 'data'. -// -// **kwargs -// -// Additional kwargs are passed to `.Text`. -// -// Returns -// ------- -// `.Annotation` -// -// See Also -// -------- -// :ref:`plotting-guide-annotation` -// -//go:linkname Annotate py.annotate -func Annotate(text *py.Object, xy *py.Object, xytext *py.Object, xycoords *py.Object, textcoords *py.Object, arrowprops *py.Object, annotationClip *py.Object) *py.Object - -// Add an arrow to the Axes. -// -// This draws an arrow from “(x, y)“ to “(x+dx, y+dy)“. -// -// Parameters -// ---------- -// x, y : float -// -// The x and y coordinates of the arrow base. -// -// dx, dy : float -// -// The length of the arrow along x and y direction. -// -// width : float, default: 0.001 -// -// Width of full arrow tail. -// -// length_includes_head : bool, default: False -// -// True if head is to be counted in calculating the length. -// -// head_width : float or None, default: 3*width -// -// Total width of the full arrow head. -// -// head_length : float or None, default: 1.5*head_width -// -// Length of arrow head. -// -// shape : {'full', 'left', 'right'}, default: 'full' -// -// Draw the left-half, right-half, or full arrow. -// -// overhang : float, default: 0 -// -// Fraction that the arrow is swept back (0 overhang means -// triangular shape). Can be negative or greater than one. -// -// head_starts_at_zero : bool, default: False -// -// If True, the head starts being drawn at coordinate 0 -// instead of ending at coordinate 0. -// -// **kwargs -// -// `.Patch` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: unknown -// animated: bool -// antialiased or aa: bool or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color: color -// edgecolor or ec: color or None -// facecolor or fc: color or None -// figure: `~matplotlib.figure.Figure` -// fill: bool -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float or None -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// zorder: float -// -// Returns -// ------- -// `.FancyArrow` -// -// The created `.FancyArrow` object. -// -// Notes -// ----- -// The resulting arrow is affected by the Axes aspect ratio and limits. -// This may produce an arrow whose head is not square with its stem. To -// create an arrow whose head is square with its stem, -// use :meth:`annotate` for example: -// -// >>> ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0), -// ... arrowprops=dict(arrowstyle="->")) -// -//go:linkname Arrow py.arrow -func Arrow(x *py.Object, y *py.Object, dx *py.Object, dy *py.Object) *py.Object - -// Autoscale the axis view to the data (toggle). -// -// Convenience method for simple axis view autoscaling. -// It turns autoscaling on or off, and then, -// if autoscaling for either axis is on, it performs -// the autoscaling on the specified axis or Axes. -// -// Parameters -// ---------- -// enable : bool or None, default: True -// -// True turns autoscaling on, False turns it off. -// None leaves the autoscaling state unchanged. -// -// axis : {'both', 'x', 'y'}, default: 'both' -// -// The axis on which to operate. (For 3D Axes, *axis* can also be set -// to 'z', and 'both' refers to all three axes.) -// -// tight : bool or None, default: None -// -// If True, first set the margins to zero. Then, this argument is -// forwarded to `~.axes.Axes.autoscale_view` (regardless of -// its value); see the description of its behavior there. -// -//go:linkname Autoscale py.autoscale -func Autoscale(enable *py.Object, axis *py.Object, tight *py.Object) *py.Object - -// Add a horizontal line across the Axes. -// -// Parameters -// ---------- -// y : float, default: 0 -// -// y position in data coordinates of the horizontal line. -// -// xmin : float, default: 0 -// -// Should be between 0 and 1, 0 being the far left of the plot, 1 the -// far right of the plot. -// -// xmax : float, default: 1 -// -// Should be between 0 and 1, 0 being the far left of the plot, 1 the -// far right of the plot. -// -// Returns -// ------- -// `~matplotlib.lines.Line2D` -// -// Other Parameters -// ---------------- -// **kwargs -// -// Valid keyword arguments are `.Line2D` properties, except for -// 'transform': -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// hlines : Add horizontal lines in data coordinates. -// axhspan : Add a horizontal span (rectangle) across the axis. -// axline : Add a line with an arbitrary slope. -// -// Examples -// -------- -// * draw a thick red hline at 'y' = 0 that spans the xrange:: -// -// >>> axhline(linewidth=4, color='r') -// -// * draw a default hline at 'y' = 1 that spans the xrange:: -// -// >>> axhline(y=1) -// -// - draw a default hline at 'y' = .5 that spans the middle half of -// the xrange:: -// -// >>> axhline(y=.5, xmin=0.25, xmax=0.75) -// -//go:linkname Axhline py.axhline -func Axhline(y *py.Object, xmin *py.Object, xmax *py.Object) *py.Object - -// Add a horizontal span (rectangle) across the Axes. -// -// The rectangle spans from *ymin* to *ymax* vertically, and, by default, -// the whole x-axis horizontally. The x-span can be set using *xmin* -// (default: 0) and *xmax* (default: 1) which are in axis units; e.g. -// “xmin = 0.5“ always refers to the middle of the x-axis regardless of -// the limits set by `~.Axes.set_xlim`. -// -// Parameters -// ---------- -// ymin : float -// -// Lower y-coordinate of the span, in data units. -// -// ymax : float -// -// Upper y-coordinate of the span, in data units. -// -// xmin : float, default: 0 -// -// Lower x-coordinate of the span, in x-axis (0-1) units. -// -// xmax : float, default: 1 -// -// Upper x-coordinate of the span, in x-axis (0-1) units. -// -// Returns -// ------- -// `~matplotlib.patches.Polygon` -// -// Horizontal span (rectangle) from (xmin, ymin) to (xmax, ymax). -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.patches.Polygon` properties -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// closed: bool -// color: color -// edgecolor or ec: color or None -// facecolor or fc: color or None -// figure: `~matplotlib.figure.Figure` -// fill: bool -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float or None -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// xy: (N, 2) array-like -// zorder: float -// -// See Also -// -------- -// axvspan : Add a vertical span across the Axes. -// -//go:linkname Axhspan py.axhspan -func Axhspan(ymin *py.Object, ymax *py.Object, xmin *py.Object, xmax *py.Object) *py.Object - -// Convenience method to get or set some axis properties. -// -// Call signatures:: -// -// xmin, xmax, ymin, ymax = axis() -// xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax]) -// xmin, xmax, ymin, ymax = axis(option) -// xmin, xmax, ymin, ymax = axis(**kwargs) -// -// Parameters -// ---------- -// xmin, xmax, ymin, ymax : float, optional -// -// The axis limits to be set. This can also be achieved using :: -// -// ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax)) -// -// option : bool or str -// -// If a bool, turns axis lines and labels on or off. If a string, -// possible values are: -// -// ================ =========================================================== -// Value Description -// ================ =========================================================== -// 'off' or `False` Hide all axis decorations, i.e. axis labels, spines, -// tick marks, tick labels, and grid lines. -// This is the same as `~.Axes.set_axis_off()`. -// 'on' or `True` Do not hide all axis decorations, i.e. axis labels, spines, -// tick marks, tick labels, and grid lines. -// This is the same as `~.Axes.set_axis_on()`. -// 'equal' Set equal scaling (i.e., make circles circular) by -// changing the axis limits. This is the same as -// ``ax.set_aspect('equal', adjustable='datalim')``. -// Explicit data limits may not be respected in this case. -// 'scaled' Set equal scaling (i.e., make circles circular) by -// changing dimensions of the plot box. This is the same as -// ``ax.set_aspect('equal', adjustable='box', anchor='C')``. -// Additionally, further autoscaling will be disabled. -// 'tight' Set limits just large enough to show all data, then -// disable further autoscaling. -// 'auto' Automatic scaling (fill plot box with data). -// 'image' 'scaled' with axis limits equal to data limits. -// 'square' Square plot; similar to 'scaled', but initially forcing -// ``xmax-xmin == ymax-ymin``. -// ================ =========================================================== -// -// emit : bool, default: True -// -// Whether observers are notified of the axis limit change. -// This option is passed on to `~.Axes.set_xlim` and -// `~.Axes.set_ylim`. -// -// Returns -// ------- -// xmin, xmax, ymin, ymax : float -// -// The axis limits. -// -// See Also -// -------- -// matplotlib.axes.Axes.set_xlim -// matplotlib.axes.Axes.set_ylim -// -// Notes -// ----- -// For 3D axes, this method additionally takes *zmin*, *zmax* as -// parameters and likewise returns them. -// -//go:linkname Axis py.axis -func Axis(arg *py.Object) *py.Object - -// Add an infinitely long straight line. -// -// The line can be defined either by two points *xy1* and *xy2*, or -// by one point *xy1* and a *slope*. -// -// This draws a straight line "on the screen", regardless of the x and y -// scales, and is thus also suitable for drawing exponential decays in -// semilog plots, power laws in loglog plots, etc. However, *slope* -// should only be used with linear scales; It has no clear meaning for -// all other scales, and thus the behavior is undefined. Please specify -// the line using the points *xy1*, *xy2* for non-linear scales. -// -// The *transform* keyword argument only applies to the points *xy1*, -// *xy2*. The *slope* (if given) is always in data coordinates. This can -// be used e.g. with “ax.transAxes“ for drawing grid lines with a fixed -// slope. -// -// Parameters -// ---------- -// xy1, xy2 : (float, float) -// -// Points for the line to pass through. -// Either *xy2* or *slope* has to be given. -// -// slope : float, optional -// -// The slope of the line. Either *xy2* or *slope* has to be given. -// -// Returns -// ------- -// `.AxLine` -// -// Other Parameters -// ---------------- -// **kwargs -// -// Valid kwargs are `.Line2D` properties -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// axhline : for horizontal lines -// axvline : for vertical lines -// -// Examples -// -------- -// Draw a thick red line passing through (0, 0) and (1, 1):: -// -// >>> axline((0, 0), (1, 1), linewidth=4, color='r') -// -//go:linkname Axline py.axline -func Axline(xy1 *py.Object, xy2 *py.Object) *py.Object - -// Add a vertical line across the Axes. -// -// Parameters -// ---------- -// x : float, default: 0 -// -// x position in data coordinates of the vertical line. -// -// ymin : float, default: 0 -// -// Should be between 0 and 1, 0 being the bottom of the plot, 1 the -// top of the plot. -// -// ymax : float, default: 1 -// -// Should be between 0 and 1, 0 being the bottom of the plot, 1 the -// top of the plot. -// -// Returns -// ------- -// `~matplotlib.lines.Line2D` -// -// Other Parameters -// ---------------- -// **kwargs -// -// Valid keyword arguments are `.Line2D` properties, except for -// 'transform': -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// vlines : Add vertical lines in data coordinates. -// axvspan : Add a vertical span (rectangle) across the axis. -// axline : Add a line with an arbitrary slope. -// -// Examples -// -------- -// * draw a thick red vline at *x* = 0 that spans the yrange:: -// -// >>> axvline(linewidth=4, color='r') -// -// * draw a default vline at *x* = 1 that spans the yrange:: -// -// >>> axvline(x=1) -// -// - draw a default vline at *x* = .5 that spans the middle half of -// the yrange:: -// -// >>> axvline(x=.5, ymin=0.25, ymax=0.75) -// -//go:linkname Axvline py.axvline -func Axvline(x *py.Object, ymin *py.Object, ymax *py.Object) *py.Object - -// Add a vertical span (rectangle) across the Axes. -// -// The rectangle spans from *xmin* to *xmax* horizontally, and, by -// default, the whole y-axis vertically. The y-span can be set using -// *ymin* (default: 0) and *ymax* (default: 1) which are in axis units; -// e.g. “ymin = 0.5“ always refers to the middle of the y-axis -// regardless of the limits set by `~.Axes.set_ylim`. -// -// Parameters -// ---------- -// xmin : float -// -// Lower x-coordinate of the span, in data units. -// -// xmax : float -// -// Upper x-coordinate of the span, in data units. -// -// ymin : float, default: 0 -// -// Lower y-coordinate of the span, in y-axis units (0-1). -// -// ymax : float, default: 1 -// -// Upper y-coordinate of the span, in y-axis units (0-1). -// -// Returns -// ------- -// `~matplotlib.patches.Polygon` -// -// Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax). -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.patches.Polygon` properties -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// closed: bool -// color: color -// edgecolor or ec: color or None -// facecolor or fc: color or None -// figure: `~matplotlib.figure.Figure` -// fill: bool -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float or None -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// xy: (N, 2) array-like -// zorder: float -// -// See Also -// -------- -// axhspan : Add a horizontal span across the Axes. -// -// Examples -// -------- -// Draw a vertical, green, translucent rectangle from x = 1.25 to -// x = 1.55 that spans the yrange of the Axes. -// -// >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5) -// -//go:linkname Axvspan py.axvspan -func Axvspan(xmin *py.Object, xmax *py.Object, ymin *py.Object, ymax *py.Object) *py.Object - -// Make a bar plot. -// -// The bars are positioned at *x* with the given *align*\ment. Their -// dimensions are given by *height* and *width*. The vertical baseline -// is *bottom* (default 0). -// -// Many parameters can take either a single value applying to all bars -// or a sequence of values, one for each bar. -// -// Parameters -// ---------- -// x : float or array-like -// -// The x coordinates of the bars. See also *align* for the -// alignment of the bars to the coordinates. -// -// height : float or array-like -// -// The height(s) of the bars. -// -// Note that if *bottom* has units (e.g. datetime), *height* should be in -// units that are a difference from the value of *bottom* (e.g. timedelta). -// -// width : float or array-like, default: 0.8 -// -// The width(s) of the bars. -// -// Note that if *x* has units (e.g. datetime), then *width* should be in -// units that are a difference (e.g. timedelta) around the *x* values. -// -// bottom : float or array-like, default: 0 -// -// The y coordinate(s) of the bottom side(s) of the bars. -// -// Note that if *bottom* has units, then the y-axis will get a Locator and -// Formatter appropriate for the units (e.g. dates, or categorical). -// -// align : {'center', 'edge'}, default: 'center' -// -// Alignment of the bars to the *x* coordinates: -// -// - 'center': Center the base on the *x* positions. -// - 'edge': Align the left edges of the bars with the *x* positions. -// -// To align the bars on the right edge pass a negative *width* and -// ``align='edge'``. -// -// Returns -// ------- -// `.BarContainer` -// -// Container with all the bars and optionally errorbars. -// -// Other Parameters -// ---------------- -// color : color or list of color, optional -// -// The colors of the bar faces. -// -// edgecolor : color or list of color, optional -// -// The colors of the bar edges. -// -// linewidth : float or array-like, optional -// -// Width of the bar edge(s). If 0, don't draw edges. -// -// tick_label : str or list of str, optional -// -// The tick labels of the bars. -// Default: None (Use default numeric labels.) -// -// label : str or list of str, optional -// -// A single label is attached to the resulting `.BarContainer` as a -// label for the whole dataset. -// If a list is provided, it must be the same length as *x* and -// labels the individual bars. Repeated labels are not de-duplicated -// and will cause repeated label entries, so this is best used when -// bars also differ in style (e.g., by passing a list to *color*.) -// -// xerr, yerr : float or array-like of shape(N,) or shape(2, N), optional -// -// If not *None*, add horizontal / vertical errorbars to the bar tips. -// The values are +/- sizes relative to the data: -// -// - scalar: symmetric +/- values for all bars -// - shape(N,): symmetric +/- values for each bar -// - shape(2, N): Separate - and + values for each bar. First row -// contains the lower errors, the second row contains the upper -// errors. -// - *None*: No errorbar. (Default) -// -// See :doc:`/gallery/statistics/errorbar_features` for an example on -// the usage of *xerr* and *yerr*. -// -// ecolor : color or list of color, default: 'black' -// -// The line color of the errorbars. -// -// capsize : float, default: :rc:`errorbar.capsize` -// -// The length of the error bar caps in points. -// -// error_kw : dict, optional -// -// Dictionary of keyword arguments to be passed to the -// `~.Axes.errorbar` method. Values of *ecolor* or *capsize* defined -// here take precedence over the independent keyword arguments. -// -// log : bool, default: False -// -// If *True*, set the y-axis to be log scale. -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs : `.Rectangle` properties -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// angle: unknown -// animated: bool -// antialiased or aa: bool or None -// bounds: (left, bottom, width, height) -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color: color -// edgecolor or ec: color or None -// facecolor or fc: color or None -// figure: `~matplotlib.figure.Figure` -// fill: bool -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// height: unknown -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float or None -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// width: unknown -// x: unknown -// xy: (float, float) -// y: unknown -// zorder: float -// -// See Also -// -------- -// barh : Plot a horizontal bar plot. -// -// Notes -// ----- -// Stacked bars can be achieved by passing individual *bottom* values per -// bar. See :doc:`/gallery/lines_bars_and_markers/bar_stacked`. -// -//go:linkname Bar py.bar -func Bar(x *py.Object, height *py.Object, width *py.Object, bottom *py.Object) *py.Object - -// Plot a 2D field of barbs. -// -// Call signature:: -// -// barbs([X, Y], U, V, [C], **kwargs) -// -// Where *X*, *Y* define the barb locations, *U*, *V* define the barb -// directions, and *C* optionally sets the color. -// -// All arguments may be 1D or 2D. *U*, *V*, *C* may be masked arrays, but masked -// *X*, *Y* are not supported at present. -// -// Barbs are traditionally used in meteorology as a way to plot the speed -// and direction of wind observations, but can technically be used to -// plot any two dimensional vector quantity. As opposed to arrows, which -// give vector magnitude by the length of the arrow, the barbs give more -// quantitative information about the vector magnitude by putting slanted -// lines or a triangle for various increments in magnitude, as show -// schematically below:: -// -// : /\ \ -// : / \ \ -// : / \ \ \ -// : / \ \ \ -// : ------------------------------ -// -// The largest increment is given by a triangle (or "flag"). After those -// come full lines (barbs). The smallest increment is a half line. There -// is only, of course, ever at most 1 half line. If the magnitude is -// small and only needs a single half-line and no full lines or -// triangles, the half-line is offset from the end of the barb so that it -// can be easily distinguished from barbs with a single full line. The -// magnitude for the barb shown above would nominally be 65, using the -// standard increments of 50, 10, and 5. -// -// See also https://en.wikipedia.org/wiki/Wind_barb. -// -// Parameters -// ---------- -// X, Y : 1D or 2D array-like, optional -// -// The x and y coordinates of the barb locations. See *pivot* for how the -// barbs are drawn to the x, y positions. -// -// If not given, they will be generated as a uniform integer meshgrid based -// on the dimensions of *U* and *V*. -// -// If *X* and *Y* are 1D but *U*, *V* are 2D, *X*, *Y* are expanded to 2D -// using ``X, Y = np.meshgrid(X, Y)``. In this case ``len(X)`` and ``len(Y)`` -// must match the column and row dimensions of *U* and *V*. -// -// U, V : 1D or 2D array-like -// -// The x and y components of the barb shaft. -// -// C : 1D or 2D array-like, optional -// -// Numeric data that defines the barb colors by colormapping via *norm* and -// *cmap*. -// -// This does not support explicit colors. If you want to set colors directly, -// use *barbcolor* instead. -// -// length : float, default: 7 -// -// Length of the barb in points; the other parts of the barb -// are scaled against this. -// -// pivot : {'tip', 'middle'} or float, default: 'tip' -// -// The part of the arrow that is anchored to the *X*, *Y* grid. The barb -// rotates about this point. This can also be a number, which shifts the -// start of the barb that many points away from grid point. -// -// barbcolor : color or color sequence -// -// The color of all parts of the barb except for the flags. This parameter -// is analogous to the *edgecolor* parameter for polygons, which can be used -// instead. However this parameter will override facecolor. -// -// flagcolor : color or color sequence -// -// The color of any flags on the barb. This parameter is analogous to the -// *facecolor* parameter for polygons, which can be used instead. However, -// this parameter will override facecolor. If this is not set (and *C* has -// not either) then *flagcolor* will be set to match *barbcolor* so that the -// barb has a uniform color. If *C* has been set, *flagcolor* has no effect. -// -// sizes : dict, optional -// -// A dictionary of coefficients specifying the ratio of a given -// feature to the length of the barb. Only those values one wishes to -// override need to be included. These features include: -// -// - 'spacing' - space between features (flags, full/half barbs) -// - 'height' - height (distance from shaft to top) of a flag or full barb -// - 'width' - width of a flag, twice the width of a full barb -// - 'emptybarb' - radius of the circle used for low magnitudes -// -// fill_empty : bool, default: False -// -// Whether the empty barbs (circles) that are drawn should be filled with -// the flag color. If they are not filled, the center is transparent. -// -// rounding : bool, default: True -// -// Whether the vector magnitude should be rounded when allocating barb -// components. If True, the magnitude is rounded to the nearest multiple -// of the half-barb increment. If False, the magnitude is simply truncated -// to the next lowest multiple. -// -// barb_increments : dict, optional -// -// A dictionary of increments specifying values to associate with -// different parts of the barb. Only those values one wishes to -// override need to be included. -// -// - 'half' - half barbs (Default is 5) -// - 'full' - full barbs (Default is 10) -// - 'flag' - flags (default is 50) -// -// flip_barb : bool or array-like of bool, default: False -// -// Whether the lines and flags should point opposite to normal. -// Normal behavior is for the barbs and lines to point right (comes from wind -// barbs having these features point towards low pressure in the Northern -// Hemisphere). -// -// A single value is applied to all barbs. Individual barbs can be flipped by -// passing a bool array of the same size as *U* and *V*. -// -// Returns -// ------- -// barbs : `~matplotlib.quiver.Barbs` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs -// -// The barbs can further be customized using `.PolyCollection` keyword -// arguments: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -//go:linkname Barbs py.barbs -func Barbs(__llgo_va_list ...interface{}) *py.Object - -// Make a horizontal bar plot. -// -// The bars are positioned at *y* with the given *align*\ment. Their -// dimensions are given by *width* and *height*. The horizontal baseline -// is *left* (default 0). -// -// Many parameters can take either a single value applying to all bars -// or a sequence of values, one for each bar. -// -// Parameters -// ---------- -// y : float or array-like -// -// The y coordinates of the bars. See also *align* for the -// alignment of the bars to the coordinates. -// -// width : float or array-like -// -// The width(s) of the bars. -// -// Note that if *left* has units (e.g. datetime), *width* should be in -// units that are a difference from the value of *left* (e.g. timedelta). -// -// height : float or array-like, default: 0.8 -// -// The heights of the bars. -// -// Note that if *y* has units (e.g. datetime), then *height* should be in -// units that are a difference (e.g. timedelta) around the *y* values. -// -// left : float or array-like, default: 0 -// -// The x coordinates of the left side(s) of the bars. -// -// Note that if *left* has units, then the x-axis will get a Locator and -// Formatter appropriate for the units (e.g. dates, or categorical). -// -// align : {'center', 'edge'}, default: 'center' -// -// Alignment of the base to the *y* coordinates*: -// -// - 'center': Center the bars on the *y* positions. -// - 'edge': Align the bottom edges of the bars with the *y* -// positions. -// -// To align the bars on the top edge pass a negative *height* and -// ``align='edge'``. -// -// Returns -// ------- -// `.BarContainer` -// -// Container with all the bars and optionally errorbars. -// -// Other Parameters -// ---------------- -// color : color or list of color, optional -// -// The colors of the bar faces. -// -// edgecolor : color or list of color, optional -// -// The colors of the bar edges. -// -// linewidth : float or array-like, optional -// -// Width of the bar edge(s). If 0, don't draw edges. -// -// tick_label : str or list of str, optional -// -// The tick labels of the bars. -// Default: None (Use default numeric labels.) -// -// label : str or list of str, optional -// -// A single label is attached to the resulting `.BarContainer` as a -// label for the whole dataset. -// If a list is provided, it must be the same length as *y* and -// labels the individual bars. Repeated labels are not de-duplicated -// and will cause repeated label entries, so this is best used when -// bars also differ in style (e.g., by passing a list to *color*.) -// -// xerr, yerr : float or array-like of shape(N,) or shape(2, N), optional -// -// If not *None*, add horizontal / vertical errorbars to the bar tips. -// The values are +/- sizes relative to the data: -// -// - scalar: symmetric +/- values for all bars -// - shape(N,): symmetric +/- values for each bar -// - shape(2, N): Separate - and + values for each bar. First row -// contains the lower errors, the second row contains the upper -// errors. -// - *None*: No errorbar. (default) -// -// See :doc:`/gallery/statistics/errorbar_features` for an example on -// the usage of *xerr* and *yerr*. -// -// ecolor : color or list of color, default: 'black' -// -// The line color of the errorbars. -// -// capsize : float, default: :rc:`errorbar.capsize` -// -// The length of the error bar caps in points. -// -// error_kw : dict, optional -// -// Dictionary of keyword arguments to be passed to the -// `~.Axes.errorbar` method. Values of *ecolor* or *capsize* defined -// here take precedence over the independent keyword arguments. -// -// log : bool, default: False -// -// If ``True``, set the x-axis to be log scale. -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs : `.Rectangle` properties -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// angle: unknown -// animated: bool -// antialiased or aa: bool or None -// bounds: (left, bottom, width, height) -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color: color -// edgecolor or ec: color or None -// facecolor or fc: color or None -// figure: `~matplotlib.figure.Figure` -// fill: bool -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// height: unknown -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float or None -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// width: unknown -// x: unknown -// xy: (float, float) -// y: unknown -// zorder: float -// -// See Also -// -------- -// bar : Plot a vertical bar plot. -// -// Notes -// ----- -// Stacked bars can be achieved by passing individual *left* values per -// bar. See -// :doc:`/gallery/lines_bars_and_markers/horizontal_barchart_distribution`. -// -//go:linkname Barh py.barh -func Barh(y *py.Object, width *py.Object, height *py.Object, left *py.Object) *py.Object - -// Label a bar plot. -// -// Adds labels to bars in the given `.BarContainer`. -// You may need to adjust the axis limits to fit the labels. -// -// Parameters -// ---------- -// container : `.BarContainer` -// -// Container with all the bars and optionally errorbars, likely -// returned from `.bar` or `.barh`. -// -// labels : array-like, optional -// -// A list of label texts, that should be displayed. If not given, the -// label texts will be the data values formatted with *fmt*. -// -// fmt : str or callable, default: '%g' -// -// An unnamed %-style or {}-style format string for the label or a -// function to call with the value as the first argument. -// When *fmt* is a string and can be interpreted in both formats, -// %-style takes precedence over {}-style. -// -// .. versionadded:: 3.7 -// Support for {}-style format string and callables. -// -// label_type : {'edge', 'center'}, default: 'edge' -// -// The label type. Possible values: -// -// - 'edge': label placed at the end-point of the bar segment, and the -// value displayed will be the position of that end-point. -// - 'center': label placed in the center of the bar segment, and the -// value displayed will be the length of that segment. -// (useful for stacked bars, i.e., -// :doc:`/gallery/lines_bars_and_markers/bar_label_demo`) -// -// padding : float, default: 0 -// -// Distance of label from the end of the bar, in points. -// -// **kwargs -// -// Any remaining keyword arguments are passed through to -// `.Axes.annotate`. The alignment parameters ( -// *horizontalalignment* / *ha*, *verticalalignment* / *va*) are -// not supported because the labels are automatically aligned to -// the bars. -// -// Returns -// ------- -// list of `.Annotation` -// -// A list of `.Annotation` instances for the labels. -// -//go:linkname BarLabel py.bar_label -func BarLabel(container *py.Object, labels *py.Object) *py.Object - -// Draw a box and whisker plot. -// -// The box extends from the first quartile (Q1) to the third -// quartile (Q3) of the data, with a line at the median. -// The whiskers extend from the box to the farthest data point -// lying within 1.5x the inter-quartile range (IQR) from the box. -// Flier points are those past the end of the whiskers. -// See https://en.wikipedia.org/wiki/Box_plot for reference. -// -// .. code-block:: none -// -// Q1-1.5IQR Q1 median Q3 Q3+1.5IQR -// |-----:-----| -// o |--------| : |--------| o o -// |-----:-----| -// flier <-----------> fliers -// IQR -// -// Parameters -// ---------- -// x : Array or a sequence of vectors. -// -// The input data. If a 2D array, a boxplot is drawn for each column -// in *x*. If a sequence of 1D arrays, a boxplot is drawn for each -// array in *x*. -// -// notch : bool, default: False -// -// Whether to draw a notched boxplot (`True`), or a rectangular -// boxplot (`False`). The notches represent the confidence interval -// (CI) around the median. The documentation for *bootstrap* -// describes how the locations of the notches are computed by -// default, but their locations may also be overridden by setting the -// *conf_intervals* parameter. -// -// .. note:: -// -// In cases where the values of the CI are less than the -// lower quartile or greater than the upper quartile, the -// notches will extend beyond the box, giving it a -// distinctive "flipped" appearance. This is expected -// behavior and consistent with other statistical -// visualization packages. -// -// sym : str, optional -// -// The default symbol for flier points. An empty string ('') hides -// the fliers. If `None`, then the fliers default to 'b+'. More -// control is provided by the *flierprops* parameter. -// -// vert : bool, default: True -// -// If `True`, draws vertical boxes. -// If `False`, draw horizontal boxes. -// -// whis : float or (float, float), default: 1.5 -// -// The position of the whiskers. -// -// If a float, the lower whisker is at the lowest datum above -// ``Q1 - whis*(Q3-Q1)``, and the upper whisker at the highest datum -// below ``Q3 + whis*(Q3-Q1)``, where Q1 and Q3 are the first and -// third quartiles. The default value of ``whis = 1.5`` corresponds -// to Tukey's original definition of boxplots. -// -// If a pair of floats, they indicate the percentiles at which to -// draw the whiskers (e.g., (5, 95)). In particular, setting this to -// (0, 100) results in whiskers covering the whole range of the data. -// -// In the edge case where ``Q1 == Q3``, *whis* is automatically set -// to (0, 100) (cover the whole range of the data) if *autorange* is -// True. -// -// Beyond the whiskers, data are considered outliers and are plotted -// as individual points. -// -// bootstrap : int, optional -// -// Specifies whether to bootstrap the confidence intervals -// around the median for notched boxplots. If *bootstrap* is -// None, no bootstrapping is performed, and notches are -// calculated using a Gaussian-based asymptotic approximation -// (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and -// Kendall and Stuart, 1967). Otherwise, bootstrap specifies -// the number of times to bootstrap the median to determine its -// 95% confidence intervals. Values between 1000 and 10000 are -// recommended. -// -// usermedians : 1D array-like, optional -// -// A 1D array-like of length ``len(x)``. Each entry that is not -// `None` forces the value of the median for the corresponding -// dataset. For entries that are `None`, the medians are computed -// by Matplotlib as normal. -// -// conf_intervals : array-like, optional -// -// A 2D array-like of shape ``(len(x), 2)``. Each entry that is not -// None forces the location of the corresponding notch (which is -// only drawn if *notch* is `True`). For entries that are `None`, -// the notches are computed by the method specified by the other -// parameters (e.g., *bootstrap*). -// -// positions : array-like, optional -// -// The positions of the boxes. The ticks and limits are -// automatically set to match the positions. Defaults to -// ``range(1, N+1)`` where N is the number of boxes to be drawn. -// -// widths : float or array-like -// -// The widths of the boxes. The default is 0.5, or ``0.15*(distance -// between extreme positions)``, if that is smaller. -// -// patch_artist : bool, default: False -// -// If `False` produces boxes with the Line2D artist. Otherwise, -// boxes are drawn with Patch artists. -// -// labels : sequence, optional -// -// Labels for each dataset (one per dataset). -// -// manage_ticks : bool, default: True -// -// If True, the tick locations and labels will be adjusted to match -// the boxplot positions. -// -// autorange : bool, default: False -// -// When `True` and the data are distributed such that the 25th and -// 75th percentiles are equal, *whis* is set to (0, 100) such -// that the whisker ends are at the minimum and maximum of the data. -// -// meanline : bool, default: False -// -// If `True` (and *showmeans* is `True`), will try to render the -// mean as a line spanning the full width of the box according to -// *meanprops* (see below). Not recommended if *shownotches* is also -// True. Otherwise, means will be shown as points. -// -// zorder : float, default: “Line2D.zorder = 2“ -// -// The zorder of the boxplot. -// -// Returns -// ------- -// dict -// -// A dictionary mapping each component of the boxplot to a list -// of the `.Line2D` instances created. That dictionary has the -// following keys (assuming vertical boxplots): -// -// - ``boxes``: the main body of the boxplot showing the -// quartiles and the median's confidence intervals if -// enabled. -// -// - ``medians``: horizontal lines at the median of each box. -// -// - ``whiskers``: the vertical lines extending to the most -// extreme, non-outlier data points. -// -// - ``caps``: the horizontal lines at the ends of the -// whiskers. -// -// - ``fliers``: points representing data that extend beyond -// the whiskers (fliers). -// -// - ``means``: points or lines representing the means. -// -// Other Parameters -// ---------------- -// showcaps : bool, default: True -// -// Show the caps on the ends of whiskers. -// -// showbox : bool, default: True -// -// Show the central box. -// -// showfliers : bool, default: True -// -// Show the outliers beyond the caps. -// -// showmeans : bool, default: False -// -// Show the arithmetic means. -// -// capprops : dict, default: None -// -// The style of the caps. -// -// capwidths : float or array, default: None -// -// The widths of the caps. -// -// boxprops : dict, default: None -// -// The style of the box. -// -// whiskerprops : dict, default: None -// -// The style of the whiskers. -// -// flierprops : dict, default: None -// -// The style of the fliers. -// -// medianprops : dict, default: None -// -// The style of the median. -// -// meanprops : dict, default: None -// -// The style of the mean. -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// See Also -// -------- -// violinplot : Draw an estimate of the probability density function. -// -//go:linkname Boxplot py.boxplot -func Boxplot(x *py.Object, notch *py.Object, sym *py.Object, vert *py.Object, whis *py.Object, positions *py.Object, widths *py.Object, patchArtist *py.Object, bootstrap *py.Object, usermedians *py.Object, confIntervals *py.Object, meanline *py.Object, showmeans *py.Object, showcaps *py.Object, showbox *py.Object, showfliers *py.Object, boxprops *py.Object, labels *py.Object, flierprops *py.Object, medianprops *py.Object, meanprops *py.Object, capprops *py.Object, whiskerprops *py.Object, manageTicks *py.Object, autorange *py.Object, zorder *py.Object, capwidths *py.Object) *py.Object - -// Plot a horizontal sequence of rectangles. -// -// A rectangle is drawn for each element of *xranges*. All rectangles -// have the same vertical position and size defined by *yrange*. -// -// Parameters -// ---------- -// xranges : sequence of tuples (*xmin*, *xwidth*) -// -// The x-positions and extents of the rectangles. For each tuple -// (*xmin*, *xwidth*) a rectangle is drawn from *xmin* to *xmin* + -// *xwidth*. -// -// yrange : (*ymin*, *yheight*) -// -// The y-position and extent for all the rectangles. -// -// Returns -// ------- -// `~.collections.PolyCollection` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs : `.PolyCollection` properties -// -// Each *kwarg* can be either a single argument applying to all -// rectangles, e.g.:: -// -// facecolors='black' -// -// or a sequence of arguments over which is cycled, e.g.:: -// -// facecolors=('black', 'blue') -// -// would create interleaving black and blue rectangles. -// -// Supported keywords: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -//go:linkname BrokenBarh py.broken_barh -func BrokenBarh(xranges *py.Object, yrange *py.Object) *py.Object - -// Label a contour plot. -// -// Adds labels to line contours in given `.ContourSet`. -// -// Parameters -// ---------- -// CS : `.ContourSet` instance -// -// Line contours to label. -// -// levels : array-like, optional -// -// A list of level values, that should be labeled. The list must be -// a subset of ``CS.levels``. If not given, all levels are labeled. -// -// **kwargs -// -// All other parameters are documented in `~.ContourLabeler.clabel`. -// -//go:linkname Clabel py.clabel -func Clabel(CS *py.Object, levels *py.Object) *py.Object - -// Plot the coherence between *x* and *y*. -// -// Coherence is the normalized cross spectral density: -// -// .. math:: -// -// C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}} -// -// Parameters -// ---------- -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. This can be different from *NFFT*, which specifies the number -// of data points used. While not increasing the actual resolution of the -// spectrum (the minimum distance between resolvable peaks), this can give -// more points in the plot, allowing for more detail. This corresponds to -// the *n* parameter in the call to `~numpy.fft.fft`. The default is None, -// which sets *pad_to* equal to *NFFT* -// -// NFFT : int, default: 256 -// -// The number of data points used in each block for the FFT. A power 2 is -// most efficient. This should *NOT* be used to get zero padding, or the -// scaling of the result will be incorrect; use *pad_to* for this instead. -// -// detrend : {'none', 'mean', 'linear'} or callable, default: 'none' -// -// The function applied to each segment before fft-ing, designed to remove -// the mean or linear trend. Unlike in MATLAB, where the *detrend* parameter -// is a vector, in Matplotlib it is a function. The :mod:`~matplotlib.mlab` -// module defines `.detrend_none`, `.detrend_mean`, and `.detrend_linear`, -// but you can use a custom function as well. You can also use a string to -// choose one of the functions: 'none' calls `.detrend_none`. 'mean' calls -// `.detrend_mean`. 'linear' calls `.detrend_linear`. -// -// scale_by_freq : bool, default: True -// -// Whether the resulting density values should be scaled by the scaling -// frequency, which gives density in units of 1/Hz. This allows for -// integration over the returned frequency values. The default is True for -// MATLAB compatibility. -// -// noverlap : int, default: 0 (no overlap) -// -// The number of points of overlap between blocks. -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// Returns -// ------- -// Cxy : 1-D array -// -// The coherence vector. -// -// freqs : 1-D array -// -// The frequencies for the elements in *Cxy*. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// References -// ---------- -// Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, -// John Wiley & Sons (1986) -// -//go:linkname Cohere py.cohere -func Cohere(x *py.Object, y *py.Object, NFFT *py.Object, Fs *py.Object, Fc *py.Object, detrend *py.Object, window *py.Object, noverlap *py.Object, padTo *py.Object, sides *py.Object, scaleByFreq *py.Object) *py.Object - -// Plot contour lines. -// -// Call signature:: -// -// contour([X, Y,] Z, [levels], **kwargs) -// -// `.contour` and `.contourf` draw contour lines and filled contours, -// respectively. Except as noted, function signatures and return values -// are the same for both versions. -// -// Parameters -// ---------- -// X, Y : array-like, optional -// -// The coordinates of the values in *Z*. -// -// *X* and *Y* must both be 2D with the same shape as *Z* (e.g. -// created via `numpy.meshgrid`), or they must both be 1-D such -// that ``len(X) == N`` is the number of columns in *Z* and -// ``len(Y) == M`` is the number of rows in *Z*. -// -// *X* and *Y* must both be ordered monotonically. -// -// If not given, they are assumed to be integer indices, i.e. -// ``X = range(N)``, ``Y = range(M)``. -// -// Z : (M, N) array-like -// -// The height values over which the contour is drawn. Color-mapping is -// controlled by *cmap*, *norm*, *vmin*, and *vmax*. -// -// levels : int or array-like, optional -// -// Determines the number and positions of the contour lines / regions. -// -// If an int *n*, use `~matplotlib.ticker.MaxNLocator`, which tries -// to automatically choose no more than *n+1* "nice" contour levels -// between minimum and maximum numeric values of *Z*. -// -// If array-like, draw contour lines at the specified levels. -// The values must be in increasing order. -// -// Returns -// ------- -// `~.contour.QuadContourSet` -// -// Other Parameters -// ---------------- -// corner_mask : bool, default: :rc:`contour.corner_mask` -// -// Enable/disable corner masking, which only has an effect if *Z* is -// a masked array. If ``False``, any quad touching a masked point is -// masked out. If ``True``, only the triangular corners of quads -// nearest those points are always masked out, other triangular -// corners comprising three unmasked points are contoured as usual. -// -// colors : color string or sequence of colors, optional -// -// The colors of the levels, i.e. the lines for `.contour` and the -// areas for `.contourf`. -// -// The sequence is cycled for the levels in ascending order. If the -// sequence is shorter than the number of levels, it's repeated. -// -// As a shortcut, single color strings may be used in place of -// one-element lists, i.e. ``'red'`` instead of ``['red']`` to color -// all levels with the same color. This shortcut does only work for -// color strings, not for other ways of specifying colors. -// -// By default (value *None*), the colormap specified by *cmap* -// will be used. -// -// alpha : float, default: 1 -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *colors* is set. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *colors* is set. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// If *vmin* or *vmax* are not given, the default color scaling is based on -// *levels*. -// -// This parameter is ignored if *colors* is set. -// -// origin : {*None*, 'upper', 'lower', 'image'}, default: None -// -// Determines the orientation and exact position of *Z* by specifying -// the position of ``Z[0, 0]``. This is only relevant, if *X*, *Y* -// are not given. -// -// - *None*: ``Z[0, 0]`` is at X=0, Y=0 in the lower left corner. -// - 'lower': ``Z[0, 0]`` is at X=0.5, Y=0.5 in the lower left corner. -// - 'upper': ``Z[0, 0]`` is at X=N+0.5, Y=0.5 in the upper left -// corner. -// - 'image': Use the value from :rc:`image.origin`. -// -// extent : (x0, x1, y0, y1), optional -// -// If *origin* is not *None*, then *extent* is interpreted as in -// `.imshow`: it gives the outer pixel boundaries. In this case, the -// position of Z[0, 0] is the center of the pixel, not a corner. If -// *origin* is *None*, then (*x0*, *y0*) is the position of Z[0, 0], -// and (*x1*, *y1*) is the position of Z[-1, -1]. -// -// This argument is ignored if *X* and *Y* are specified in the call -// to contour. -// -// locator : ticker.Locator subclass, optional -// -// The locator is used to determine the contour levels if they -// are not given explicitly via *levels*. -// Defaults to `~.ticker.MaxNLocator`. -// -// extend : {'neither', 'both', 'min', 'max'}, default: 'neither' -// -// Determines the ``contourf``-coloring of values that are outside the -// *levels* range. -// -// If 'neither', values outside the *levels* range are not colored. -// If 'min', 'max' or 'both', color the values below, above or below -// and above the *levels* range. -// -// Values below ``min(levels)`` and above ``max(levels)`` are mapped -// to the under/over values of the `.Colormap`. Note that most -// colormaps do not have dedicated colors for these by default, so -// that the over and under values are the edge values of the colormap. -// You may want to set these values explicitly using -// `.Colormap.set_under` and `.Colormap.set_over`. -// -// .. note:: -// -// An existing `.QuadContourSet` does not get notified if -// properties of its colormap are changed. Therefore, an explicit -// call `.QuadContourSet.changed()` is needed after modifying the -// colormap. The explicit call can be left out, if a colorbar is -// assigned to the `.QuadContourSet` because it internally calls -// `.QuadContourSet.changed()`. -// -// Example:: -// -// x = np.arange(1, 10) -// y = x.reshape(-1, 1) -// h = x * y -// -// cs = plt.contourf(h, levels=[10, 30, 50], -// colors=['#808080', '#A0A0A0', '#C0C0C0'], extend='both') -// cs.cmap.set_over('red') -// cs.cmap.set_under('blue') -// cs.changed() -// -// xunits, yunits : registered units, optional -// -// Override axis units by specifying an instance of a -// :class:`matplotlib.units.ConversionInterface`. -// -// antialiased : bool, optional -// -// Enable antialiasing, overriding the defaults. For -// filled contours, the default is *False*. For line contours, -// it is taken from :rc:`lines.antialiased`. -// -// nchunk : int >= 0, optional -// -// If 0, no subdivision of the domain. Specify a positive integer to -// divide the domain into subdomains of *nchunk* by *nchunk* quads. -// Chunking reduces the maximum length of polygons generated by the -// contouring algorithm which reduces the rendering workload passed -// on to the backend and also requires slightly less RAM. It can -// however introduce rendering artifacts at chunk boundaries depending -// on the backend, the *antialiased* flag and value of *alpha*. -// -// linewidths : float or array-like, default: :rc:`contour.linewidth` -// -// *Only applies to* `.contour`. -// -// The line width of the contour lines. -// -// If a number, all levels will be plotted with this linewidth. -// -// If a sequence, the levels in ascending order will be plotted with -// the linewidths in the order specified. -// -// If None, this falls back to :rc:`lines.linewidth`. -// -// linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional -// -// *Only applies to* `.contour`. -// -// If *linestyles* is *None*, the default is 'solid' unless the lines are -// monochrome. In that case, negative contours will instead take their -// linestyle from the *negative_linestyles* argument. -// -// *linestyles* can also be an iterable of the above strings specifying a set -// of linestyles to be used. If this iterable is shorter than the number of -// contour levels it will be repeated as necessary. -// -// negative_linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional -// -// *Only applies to* `.contour`. -// -// If *linestyles* is *None* and the lines are monochrome, this argument -// specifies the line style for negative contours. -// -// If *negative_linestyles* is *None*, the default is taken from -// :rc:`contour.negative_linestyles`. -// -// *negative_linestyles* can also be an iterable of the above strings -// specifying a set of linestyles to be used. If this iterable is shorter than -// the number of contour levels it will be repeated as necessary. -// -// hatches : list[str], optional -// -// *Only applies to* `.contourf`. -// -// A list of cross hatch patterns to use on the filled areas. -// If None, no hatching will be added to the contour. -// Hatching is supported in the PostScript, PDF, SVG and Agg -// backends only. -// -// algorithm : {'mpl2005', 'mpl2014', 'serial', 'threaded'}, optional -// -// Which contouring algorithm to use to calculate the contour lines and -// polygons. The algorithms are implemented in -// `ContourPy `_, consult the -// `ContourPy documentation `_ for -// further information. -// -// The default is taken from :rc:`contour.algorithm`. -// -// clip_path : `~matplotlib.patches.Patch` or `.Path` or `.TransformedPath` -// -// Set the clip path. See `~matplotlib.artist.Artist.set_clip_path`. -// -// .. versionadded:: 3.8 -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// Notes -// ----- -// -// 1. `.contourf` differs from the MATLAB version in that it does not draw -// the polygon edges. To draw edges, add line contours with calls to -// `.contour`. -// -// 2. `.contourf` fills intervals that are closed at the top; that is, for -// boundaries *z1* and *z2*, the filled region is:: -// -// z1 < Z <= z2 -// -// except for the lowest interval, which is closed on both sides (i.e. -// it includes the lowest value). -// -// 3. `.contour` and `.contourf` use a `marching squares -// `_ algorithm to -// compute contour locations. More information can be found in -// `ContourPy documentation `_. -// -//go:linkname Contour py.contour -func Contour(__llgo_va_list ...interface{}) *py.Object - -// Plot filled contours. -// -// Call signature:: -// -// contourf([X, Y,] Z, [levels], **kwargs) -// -// `.contour` and `.contourf` draw contour lines and filled contours, -// respectively. Except as noted, function signatures and return values -// are the same for both versions. -// -// Parameters -// ---------- -// X, Y : array-like, optional -// -// The coordinates of the values in *Z*. -// -// *X* and *Y* must both be 2D with the same shape as *Z* (e.g. -// created via `numpy.meshgrid`), or they must both be 1-D such -// that ``len(X) == N`` is the number of columns in *Z* and -// ``len(Y) == M`` is the number of rows in *Z*. -// -// *X* and *Y* must both be ordered monotonically. -// -// If not given, they are assumed to be integer indices, i.e. -// ``X = range(N)``, ``Y = range(M)``. -// -// Z : (M, N) array-like -// -// The height values over which the contour is drawn. Color-mapping is -// controlled by *cmap*, *norm*, *vmin*, and *vmax*. -// -// levels : int or array-like, optional -// -// Determines the number and positions of the contour lines / regions. -// -// If an int *n*, use `~matplotlib.ticker.MaxNLocator`, which tries -// to automatically choose no more than *n+1* "nice" contour levels -// between minimum and maximum numeric values of *Z*. -// -// If array-like, draw contour lines at the specified levels. -// The values must be in increasing order. -// -// Returns -// ------- -// `~.contour.QuadContourSet` -// -// Other Parameters -// ---------------- -// corner_mask : bool, default: :rc:`contour.corner_mask` -// -// Enable/disable corner masking, which only has an effect if *Z* is -// a masked array. If ``False``, any quad touching a masked point is -// masked out. If ``True``, only the triangular corners of quads -// nearest those points are always masked out, other triangular -// corners comprising three unmasked points are contoured as usual. -// -// colors : color string or sequence of colors, optional -// -// The colors of the levels, i.e. the lines for `.contour` and the -// areas for `.contourf`. -// -// The sequence is cycled for the levels in ascending order. If the -// sequence is shorter than the number of levels, it's repeated. -// -// As a shortcut, single color strings may be used in place of -// one-element lists, i.e. ``'red'`` instead of ``['red']`` to color -// all levels with the same color. This shortcut does only work for -// color strings, not for other ways of specifying colors. -// -// By default (value *None*), the colormap specified by *cmap* -// will be used. -// -// alpha : float, default: 1 -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *colors* is set. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *colors* is set. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// If *vmin* or *vmax* are not given, the default color scaling is based on -// *levels*. -// -// This parameter is ignored if *colors* is set. -// -// origin : {*None*, 'upper', 'lower', 'image'}, default: None -// -// Determines the orientation and exact position of *Z* by specifying -// the position of ``Z[0, 0]``. This is only relevant, if *X*, *Y* -// are not given. -// -// - *None*: ``Z[0, 0]`` is at X=0, Y=0 in the lower left corner. -// - 'lower': ``Z[0, 0]`` is at X=0.5, Y=0.5 in the lower left corner. -// - 'upper': ``Z[0, 0]`` is at X=N+0.5, Y=0.5 in the upper left -// corner. -// - 'image': Use the value from :rc:`image.origin`. -// -// extent : (x0, x1, y0, y1), optional -// -// If *origin* is not *None*, then *extent* is interpreted as in -// `.imshow`: it gives the outer pixel boundaries. In this case, the -// position of Z[0, 0] is the center of the pixel, not a corner. If -// *origin* is *None*, then (*x0*, *y0*) is the position of Z[0, 0], -// and (*x1*, *y1*) is the position of Z[-1, -1]. -// -// This argument is ignored if *X* and *Y* are specified in the call -// to contour. -// -// locator : ticker.Locator subclass, optional -// -// The locator is used to determine the contour levels if they -// are not given explicitly via *levels*. -// Defaults to `~.ticker.MaxNLocator`. -// -// extend : {'neither', 'both', 'min', 'max'}, default: 'neither' -// -// Determines the ``contourf``-coloring of values that are outside the -// *levels* range. -// -// If 'neither', values outside the *levels* range are not colored. -// If 'min', 'max' or 'both', color the values below, above or below -// and above the *levels* range. -// -// Values below ``min(levels)`` and above ``max(levels)`` are mapped -// to the under/over values of the `.Colormap`. Note that most -// colormaps do not have dedicated colors for these by default, so -// that the over and under values are the edge values of the colormap. -// You may want to set these values explicitly using -// `.Colormap.set_under` and `.Colormap.set_over`. -// -// .. note:: -// -// An existing `.QuadContourSet` does not get notified if -// properties of its colormap are changed. Therefore, an explicit -// call `.QuadContourSet.changed()` is needed after modifying the -// colormap. The explicit call can be left out, if a colorbar is -// assigned to the `.QuadContourSet` because it internally calls -// `.QuadContourSet.changed()`. -// -// Example:: -// -// x = np.arange(1, 10) -// y = x.reshape(-1, 1) -// h = x * y -// -// cs = plt.contourf(h, levels=[10, 30, 50], -// colors=['#808080', '#A0A0A0', '#C0C0C0'], extend='both') -// cs.cmap.set_over('red') -// cs.cmap.set_under('blue') -// cs.changed() -// -// xunits, yunits : registered units, optional -// -// Override axis units by specifying an instance of a -// :class:`matplotlib.units.ConversionInterface`. -// -// antialiased : bool, optional -// -// Enable antialiasing, overriding the defaults. For -// filled contours, the default is *False*. For line contours, -// it is taken from :rc:`lines.antialiased`. -// -// nchunk : int >= 0, optional -// -// If 0, no subdivision of the domain. Specify a positive integer to -// divide the domain into subdomains of *nchunk* by *nchunk* quads. -// Chunking reduces the maximum length of polygons generated by the -// contouring algorithm which reduces the rendering workload passed -// on to the backend and also requires slightly less RAM. It can -// however introduce rendering artifacts at chunk boundaries depending -// on the backend, the *antialiased* flag and value of *alpha*. -// -// linewidths : float or array-like, default: :rc:`contour.linewidth` -// -// *Only applies to* `.contour`. -// -// The line width of the contour lines. -// -// If a number, all levels will be plotted with this linewidth. -// -// If a sequence, the levels in ascending order will be plotted with -// the linewidths in the order specified. -// -// If None, this falls back to :rc:`lines.linewidth`. -// -// linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional -// -// *Only applies to* `.contour`. -// -// If *linestyles* is *None*, the default is 'solid' unless the lines are -// monochrome. In that case, negative contours will instead take their -// linestyle from the *negative_linestyles* argument. -// -// *linestyles* can also be an iterable of the above strings specifying a set -// of linestyles to be used. If this iterable is shorter than the number of -// contour levels it will be repeated as necessary. -// -// negative_linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional -// -// *Only applies to* `.contour`. -// -// If *linestyles* is *None* and the lines are monochrome, this argument -// specifies the line style for negative contours. -// -// If *negative_linestyles* is *None*, the default is taken from -// :rc:`contour.negative_linestyles`. -// -// *negative_linestyles* can also be an iterable of the above strings -// specifying a set of linestyles to be used. If this iterable is shorter than -// the number of contour levels it will be repeated as necessary. -// -// hatches : list[str], optional -// -// *Only applies to* `.contourf`. -// -// A list of cross hatch patterns to use on the filled areas. -// If None, no hatching will be added to the contour. -// Hatching is supported in the PostScript, PDF, SVG and Agg -// backends only. -// -// algorithm : {'mpl2005', 'mpl2014', 'serial', 'threaded'}, optional -// -// Which contouring algorithm to use to calculate the contour lines and -// polygons. The algorithms are implemented in -// `ContourPy `_, consult the -// `ContourPy documentation `_ for -// further information. -// -// The default is taken from :rc:`contour.algorithm`. -// -// clip_path : `~matplotlib.patches.Patch` or `.Path` or `.TransformedPath` -// -// Set the clip path. See `~matplotlib.artist.Artist.set_clip_path`. -// -// .. versionadded:: 3.8 -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// Notes -// ----- -// -// 1. `.contourf` differs from the MATLAB version in that it does not draw -// the polygon edges. To draw edges, add line contours with calls to -// `.contour`. -// -// 2. `.contourf` fills intervals that are closed at the top; that is, for -// boundaries *z1* and *z2*, the filled region is:: -// -// z1 < Z <= z2 -// -// except for the lowest interval, which is closed on both sides (i.e. -// it includes the lowest value). -// -// 3. `.contour` and `.contourf` use a `marching squares -// `_ algorithm to -// compute contour locations. More information can be found in -// `ContourPy documentation `_. -// -//go:linkname Contourf py.contourf -func Contourf(__llgo_va_list ...interface{}) *py.Object - -// Plot the cross-spectral density. -// -// The cross spectral density :math:`P_{xy}` by Welch's average -// periodogram method. The vectors *x* and *y* are divided into -// *NFFT* length segments. Each segment is detrended by function -// *detrend* and windowed by function *window*. *noverlap* gives -// the length of the overlap between segments. The product of -// the direct FFTs of *x* and *y* are averaged over each segment -// to compute :math:`P_{xy}`, with a scaling to correct for power -// loss due to windowing. -// -// If len(*x*) < *NFFT* or len(*y*) < *NFFT*, they will be zero -// padded to *NFFT*. -// -// Parameters -// ---------- -// x, y : 1-D arrays or sequences -// -// Arrays or sequences containing the data. -// -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. This can be different from *NFFT*, which specifies the number -// of data points used. While not increasing the actual resolution of the -// spectrum (the minimum distance between resolvable peaks), this can give -// more points in the plot, allowing for more detail. This corresponds to -// the *n* parameter in the call to `~numpy.fft.fft`. The default is None, -// which sets *pad_to* equal to *NFFT* -// -// NFFT : int, default: 256 -// -// The number of data points used in each block for the FFT. A power 2 is -// most efficient. This should *NOT* be used to get zero padding, or the -// scaling of the result will be incorrect; use *pad_to* for this instead. -// -// detrend : {'none', 'mean', 'linear'} or callable, default: 'none' -// -// The function applied to each segment before fft-ing, designed to remove -// the mean or linear trend. Unlike in MATLAB, where the *detrend* parameter -// is a vector, in Matplotlib it is a function. The :mod:`~matplotlib.mlab` -// module defines `.detrend_none`, `.detrend_mean`, and `.detrend_linear`, -// but you can use a custom function as well. You can also use a string to -// choose one of the functions: 'none' calls `.detrend_none`. 'mean' calls -// `.detrend_mean`. 'linear' calls `.detrend_linear`. -// -// scale_by_freq : bool, default: True -// -// Whether the resulting density values should be scaled by the scaling -// frequency, which gives density in units of 1/Hz. This allows for -// integration over the returned frequency values. The default is True for -// MATLAB compatibility. -// -// noverlap : int, default: 0 (no overlap) -// -// The number of points of overlap between segments. -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// return_line : bool, default: False -// -// Whether to include the line object plotted in the returned values. -// -// Returns -// ------- -// Pxy : 1-D array -// -// The values for the cross spectrum :math:`P_{xy}` before scaling -// (complex valued). -// -// freqs : 1-D array -// -// The frequencies corresponding to the elements in *Pxy*. -// -// line : `~matplotlib.lines.Line2D` -// -// The line created by this function. -// Only returned if *return_line* is True. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// psd : is equivalent to setting “y = x“. -// -// Notes -// ----- -// For plotting, the power is plotted as -// :math:`10 \log_{10}(P_{xy})` for decibels, though :math:`P_{xy}` itself -// is returned. -// -// References -// ---------- -// Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, -// John Wiley & Sons (1986) -// -//go:linkname Csd py.csd -func Csd(x *py.Object, y *py.Object, NFFT *py.Object, Fs *py.Object, Fc *py.Object, detrend *py.Object, window *py.Object, noverlap *py.Object, padTo *py.Object, sides *py.Object, scaleByFreq *py.Object, returnLine *py.Object) *py.Object - -// Compute and plot the empirical cumulative distribution function of *x*. -// -// .. versionadded:: 3.8 -// -// Parameters -// ---------- -// x : 1d array-like -// -// The input data. Infinite entries are kept (and move the relevant -// end of the ecdf from 0/1), but NaNs and masked values are errors. -// -// weights : 1d array-like or None, default: None -// -// The weights of the entries; must have the same shape as *x*. -// Weights corresponding to NaN data points are dropped, and then the -// remaining weights are normalized to sum to 1. If unset, all -// entries have the same weight. -// -// complementary : bool, default: False -// -// Whether to plot a cumulative distribution function, which increases -// from 0 to 1 (the default), or a complementary cumulative -// distribution function, which decreases from 1 to 0. -// -// orientation : {"vertical", "horizontal"}, default: "vertical" -// -// Whether the entries are plotted along the x-axis ("vertical", the -// default) or the y-axis ("horizontal"). This parameter takes the -// same values as in `~.Axes.hist`. -// -// compress : bool, default: False -// -// Whether multiple entries with the same values are grouped together -// (with a summed weight) before plotting. This is mainly useful if -// *x* contains many identical data points, to decrease the rendering -// complexity of the plot. If *x* contains no duplicate points, this -// has no effect and just uses some time and memory. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *weights* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// Returns -// ------- -// `.Line2D` -// -// Notes -// ----- -// The ecdf plot can be thought of as a cumulative histogram with one bin -// per data entry; i.e. it reports on the entire dataset without any -// arbitrary binning. -// -// If *x* contains NaNs or masked entries, either remove them first from -// the array (if they should not taken into account), or replace them by -// -inf or +inf (if they should be sorted at the beginning or the end of -// the array). -// -//go:linkname Ecdf py.ecdf -func Ecdf(x *py.Object, weights *py.Object) *py.Object - -// Plot y versus x as lines and/or markers with attached errorbars. -// -// *x*, *y* define the data locations, *xerr*, *yerr* define the errorbar -// sizes. By default, this draws the data markers/lines as well as the -// errorbars. Use fmt='none' to draw errorbars without any data markers. -// -// .. versionadded:: 3.7 -// -// Caps and error lines are drawn in polar coordinates on polar plots. -// -// Parameters -// ---------- -// x, y : float or array-like -// -// The data positions. -// -// xerr, yerr : float or array-like, shape(N,) or shape(2, N), optional -// -// The errorbar sizes: -// -// - scalar: Symmetric +/- values for all data points. -// - shape(N,): Symmetric +/-values for each data point. -// - shape(2, N): Separate - and + values for each bar. First row -// contains the lower errors, the second row contains the upper -// errors. -// - *None*: No errorbar. -// -// All values must be >= 0. -// -// See :doc:`/gallery/statistics/errorbar_features` -// for an example on the usage of ``xerr`` and ``yerr``. -// -// fmt : str, default: ” -// -// The format for the data points / data lines. See `.plot` for -// details. -// -// Use 'none' (case-insensitive) to plot errorbars without any data -// markers. -// -// ecolor : color, default: None -// -// The color of the errorbar lines. If None, use the color of the -// line connecting the markers. -// -// elinewidth : float, default: None -// -// The linewidth of the errorbar lines. If None, the linewidth of -// the current style is used. -// -// capsize : float, default: :rc:`errorbar.capsize` -// -// The length of the error bar caps in points. -// -// capthick : float, default: None -// -// An alias to the keyword argument *markeredgewidth* (a.k.a. *mew*). -// This setting is a more sensible name for the property that -// controls the thickness of the error bar cap in points. For -// backwards compatibility, if *mew* or *markeredgewidth* are given, -// then they will over-ride *capthick*. This may change in future -// releases. -// -// barsabove : bool, default: False -// -// If True, will plot the errorbars above the plot -// symbols. Default is below. -// -// lolims, uplims, xlolims, xuplims : bool or array-like, default: False -// -// These arguments can be used to indicate that a value gives only -// upper/lower limits. In that case a caret symbol is used to -// indicate this. *lims*-arguments may be scalars, or array-likes of -// the same length as *xerr* and *yerr*. To use limits with inverted -// axes, `~.Axes.set_xlim` or `~.Axes.set_ylim` must be called before -// :meth:`errorbar`. Note the tricky parameter names: setting e.g. -// *lolims* to True means that the y-value is a *lower* limit of the -// True value, so, only an *upward*-pointing arrow will be drawn! -// -// errorevery : int or (int, int), default: 1 -// -// draws error bars on a subset of the data. *errorevery* =N draws -// error bars on the points (x[::N], y[::N]). -// *errorevery* =(start, N) draws error bars on the points -// (x[start::N], y[start::N]). e.g. errorevery=(6, 3) -// adds error bars to the data at (x[6], x[9], x[12], x[15], ...). -// Used to avoid overlapping error bars when two series share x-axis -// values. -// -// Returns -// ------- -// `.ErrorbarContainer` -// -// The container contains: -// -// - plotline: `~matplotlib.lines.Line2D` instance of x, y plot markers -// and/or line. -// - caplines: A tuple of `~matplotlib.lines.Line2D` instances of the error -// bar caps. -// - barlinecols: A tuple of `.LineCollection` with the horizontal and -// vertical error ranges. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y*, *xerr*, *yerr* -// -// **kwargs -// -// All other keyword arguments are passed on to the `~.Axes.plot` call -// drawing the markers. For example, this code makes big red squares -// with thick green edges:: -// -// x, y, yerr = rand(3, 10) -// errorbar(x, y, yerr, marker='s', mfc='red', -// mec='green', ms=20, mew=4) -// -// where *mfc*, *mec*, *ms* and *mew* are aliases for the longer -// property names, *markerfacecolor*, *markeredgecolor*, *markersize* -// and *markeredgewidth*. -// -// Valid kwargs for the marker properties are: -// -// - *dashes* -// - *dash_capstyle* -// - *dash_joinstyle* -// - *drawstyle* -// - *fillstyle* -// - *linestyle* -// - *marker* -// - *markeredgecolor* -// - *markeredgewidth* -// - *markerfacecolor* -// - *markerfacecoloralt* -// - *markersize* -// - *markevery* -// - *solid_capstyle* -// - *solid_joinstyle* -// -// Refer to the corresponding `.Line2D` property for more details: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -//go:linkname Errorbar py.errorbar -func Errorbar(x *py.Object, y *py.Object, yerr *py.Object, xerr *py.Object, fmt *py.Object, ecolor *py.Object, elinewidth *py.Object, capsize *py.Object, barsabove *py.Object, lolims *py.Object, uplims *py.Object, xlolims *py.Object, xuplims *py.Object, errorevery *py.Object, capthick *py.Object) *py.Object - -// Plot identical parallel lines at the given positions. -// -// This type of plot is commonly used in neuroscience for representing -// neural events, where it is usually called a spike raster, dot raster, -// or raster plot. -// -// However, it is useful in any situation where you wish to show the -// timing or position of multiple sets of discrete events, such as the -// arrival times of people to a business on each day of the month or the -// date of hurricanes each year of the last century. -// -// Parameters -// ---------- -// positions : array-like or list of array-like -// -// A 1D array-like defines the positions of one sequence of events. -// -// Multiple groups of events may be passed as a list of array-likes. -// Each group can be styled independently by passing lists of values -// to *lineoffsets*, *linelengths*, *linewidths*, *colors* and -// *linestyles*. -// -// Note that *positions* can be a 2D array, but in practice different -// event groups usually have different counts so that one will use a -// list of different-length arrays rather than a 2D array. -// -// orientation : {'horizontal', 'vertical'}, default: 'horizontal' -// -// The direction of the event sequence: -// -// - 'horizontal': the events are arranged horizontally. -// The indicator lines are vertical. -// - 'vertical': the events are arranged vertically. -// The indicator lines are horizontal. -// -// lineoffsets : float or array-like, default: 1 -// -// The offset of the center of the lines from the origin, in the -// direction orthogonal to *orientation*. -// -// If *positions* is 2D, this can be a sequence with length matching -// the length of *positions*. -// -// linelengths : float or array-like, default: 1 -// -// The total height of the lines (i.e. the lines stretches from -// ``lineoffset - linelength/2`` to ``lineoffset + linelength/2``). -// -// If *positions* is 2D, this can be a sequence with length matching -// the length of *positions*. -// -// linewidths : float or array-like, default: :rc:`lines.linewidth` -// -// The line width(s) of the event lines, in points. -// -// If *positions* is 2D, this can be a sequence with length matching -// the length of *positions*. -// -// colors : color or list of colors, default: :rc:`lines.color` -// -// The color(s) of the event lines. -// -// If *positions* is 2D, this can be a sequence with length matching -// the length of *positions*. -// -// alpha : float or array-like, default: 1 -// -// The alpha blending value(s), between 0 (transparent) and 1 -// (opaque). -// -// If *positions* is 2D, this can be a sequence with length matching -// the length of *positions*. -// -// linestyles : str or tuple or list of such values, default: 'solid' -// -// Default is 'solid'. Valid strings are ['solid', 'dashed', -// 'dashdot', 'dotted', '-', '--', '-.', ':']. Dash tuples -// should be of the form:: -// -// (offset, onoffseq), -// -// where *onoffseq* is an even length tuple of on and off ink -// in points. -// -// If *positions* is 2D, this can be a sequence with length matching -// the length of *positions*. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *positions*, *lineoffsets*, *linelengths*, *linewidths*, *colors*, *linestyles* -// -// **kwargs -// -// Other keyword arguments are line collection properties. See -// `.LineCollection` for a list of the valid properties. -// -// Returns -// ------- -// list of `.EventCollection` -// -// The `.EventCollection` that were added. -// -// Notes -// ----- -// For *linelengths*, *linewidths*, *colors*, *alpha* and *linestyles*, if -// only a single value is given, that value is applied to all lines. If an -// array-like is given, it must have the same length as *positions*, and -// each value will be applied to the corresponding row of the array. -// -// Examples -// -------- -// .. plot:: gallery/lines_bars_and_markers/eventplot_demo.py -// -//go:linkname Eventplot py.eventplot -func Eventplot(positions *py.Object, orientation *py.Object, lineoffsets *py.Object, linelengths *py.Object, linewidths *py.Object, colors *py.Object, alpha *py.Object, linestyles *py.Object) *py.Object - -// Plot filled polygons. -// -// Parameters -// ---------- -// *args : sequence of x, y, [color] -// -// Each polygon is defined by the lists of *x* and *y* positions of -// its nodes, optionally followed by a *color* specifier. See -// :mod:`matplotlib.colors` for supported color specifiers. The -// standard color cycle is used for polygons without a color -// specifier. -// -// You can plot multiple polygons by providing multiple *x*, *y*, -// *[color]* groups. -// -// For example, each of the following is legal:: -// -// ax.fill(x, y) # a polygon with default color -// ax.fill(x, y, "b") # a blue polygon -// ax.fill(x, y, x2, y2) # two polygons -// ax.fill(x, y, "b", x2, y2, "r") # a blue and a red polygon -// -// data : indexable object, optional -// -// An object with labelled data. If given, provide the label names to -// plot in *x* and *y*, e.g.:: -// -// ax.fill("time", "signal", -// data={"time": [0, 1, 2], "signal": [0, 1, 0]}) -// -// Returns -// ------- -// list of `~matplotlib.patches.Polygon` -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.patches.Polygon` properties -// -// Notes -// ----- -// Use :meth:`fill_between` if you would like to fill the region between -// two curves. -// -//go:linkname Fill py.fill -func Fill(__llgo_va_list ...interface{}) *py.Object - -// Fill the area between two horizontal curves. -// -// The curves are defined by the points (*x*, *y1*) and (*x*, -// *y2*). This creates one or multiple polygons describing the filled -// area. -// -// You may exclude some horizontal sections from filling using *where*. -// -// By default, the edges connect the given points directly. Use *step* -// if the filling should be a step function, i.e. constant in between -// *x*. -// -// Parameters -// ---------- -// x : array (length N) -// -// The x coordinates of the nodes defining the curves. -// -// y1 : array (length N) or scalar -// -// The y coordinates of the nodes defining the first curve. -// -// y2 : array (length N) or scalar, default: 0 -// -// The y coordinates of the nodes defining the second curve. -// -// where : array of bool (length N), optional -// -// Define *where* to exclude some horizontal regions from being filled. -// The filled regions are defined by the coordinates ``x[where]``. -// More precisely, fill between ``x[i]`` and ``x[i+1]`` if -// ``where[i] and where[i+1]``. Note that this definition implies -// that an isolated *True* value between two *False* values in *where* -// will not result in filling. Both sides of the *True* position -// remain unfilled due to the adjacent *False* values. -// -// interpolate : bool, default: False -// -// This option is only relevant if *where* is used and the two curves -// are crossing each other. -// -// Semantically, *where* is often used for *y1* > *y2* or -// similar. By default, the nodes of the polygon defining the filled -// region will only be placed at the positions in the *x* array. -// Such a polygon cannot describe the above semantics close to the -// intersection. The x-sections containing the intersection are -// simply clipped. -// -// Setting *interpolate* to *True* will calculate the actual -// intersection point and extend the filled region up to this point. -// -// step : {'pre', 'post', 'mid'}, optional -// -// Define *step* if the filling should be a step function, -// i.e. constant in between *x*. The value determines where the -// step will occur: -// -// - 'pre': The y value is continued constantly to the left from -// every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the -// value ``y[i]``. -// - 'post': The y value is continued constantly to the right from -// every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the -// value ``y[i]``. -// - 'mid': Steps occur half-way between the *x* positions. -// -// Returns -// ------- -// `.PolyCollection` -// -// A `.PolyCollection` containing the plotted polygons. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y1*, *y2*, *where* -// -// **kwargs -// -// All other keyword arguments are passed on to `.PolyCollection`. -// They control the `.Polygon` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -// See Also -// -------- -// fill_between : Fill between two sets of y-values. -// fill_betweenx : Fill between two sets of x-values. -// -//go:linkname FillBetween py.fill_between -func FillBetween(x *py.Object, y1 *py.Object, y2 *py.Object, where *py.Object, interpolate *py.Object, step *py.Object) *py.Object - -// Fill the area between two vertical curves. -// -// The curves are defined by the points (*y*, *x1*) and (*y*, -// *x2*). This creates one or multiple polygons describing the filled -// area. -// -// You may exclude some vertical sections from filling using *where*. -// -// By default, the edges connect the given points directly. Use *step* -// if the filling should be a step function, i.e. constant in between -// *y*. -// -// Parameters -// ---------- -// y : array (length N) -// -// The y coordinates of the nodes defining the curves. -// -// x1 : array (length N) or scalar -// -// The x coordinates of the nodes defining the first curve. -// -// x2 : array (length N) or scalar, default: 0 -// -// The x coordinates of the nodes defining the second curve. -// -// where : array of bool (length N), optional -// -// Define *where* to exclude some vertical regions from being filled. -// The filled regions are defined by the coordinates ``y[where]``. -// More precisely, fill between ``y[i]`` and ``y[i+1]`` if -// ``where[i] and where[i+1]``. Note that this definition implies -// that an isolated *True* value between two *False* values in *where* -// will not result in filling. Both sides of the *True* position -// remain unfilled due to the adjacent *False* values. -// -// interpolate : bool, default: False -// -// This option is only relevant if *where* is used and the two curves -// are crossing each other. -// -// Semantically, *where* is often used for *x1* > *x2* or -// similar. By default, the nodes of the polygon defining the filled -// region will only be placed at the positions in the *y* array. -// Such a polygon cannot describe the above semantics close to the -// intersection. The y-sections containing the intersection are -// simply clipped. -// -// Setting *interpolate* to *True* will calculate the actual -// intersection point and extend the filled region up to this point. -// -// step : {'pre', 'post', 'mid'}, optional -// -// Define *step* if the filling should be a step function, -// i.e. constant in between *y*. The value determines where the -// step will occur: -// -// - 'pre': The y value is continued constantly to the left from -// every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the -// value ``y[i]``. -// - 'post': The y value is continued constantly to the right from -// every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the -// value ``y[i]``. -// - 'mid': Steps occur half-way between the *x* positions. -// -// Returns -// ------- -// `.PolyCollection` -// -// A `.PolyCollection` containing the plotted polygons. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *y*, *x1*, *x2*, *where* -// -// **kwargs -// -// All other keyword arguments are passed on to `.PolyCollection`. -// They control the `.Polygon` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -// See Also -// -------- -// fill_between : Fill between two sets of y-values. -// fill_betweenx : Fill between two sets of x-values. -// -//go:linkname FillBetweenx py.fill_betweenx -func FillBetweenx(y *py.Object, x1 *py.Object, x2 *py.Object, where *py.Object, step *py.Object, interpolate *py.Object) *py.Object - -// Configure the grid lines. -// -// Parameters -// ---------- -// visible : bool or None, optional -// -// Whether to show the grid lines. If any *kwargs* are supplied, it -// is assumed you want the grid on and *visible* will be set to True. -// -// If *visible* is *None* and there are no *kwargs*, this toggles the -// visibility of the lines. -// -// which : {'major', 'minor', 'both'}, optional -// -// The grid lines to apply the changes on. -// -// axis : {'both', 'x', 'y'}, optional -// -// The axis to apply the changes on. -// -// **kwargs : `~matplotlib.lines.Line2D` properties -// -// Define the line properties of the grid, e.g.:: -// -// grid(color='r', linestyle='-', linewidth=2) -// -// Valid keyword arguments are: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// Notes -// ----- -// The axis is drawn as a unit, so the effective zorder for drawing the -// grid is determined by the zorder of each axis, not by the zorder of the -// `.Line2D` objects comprising the grid. Therefore, to set grid zorder, -// use `.set_axisbelow` or, for more control, call the -// `~.Artist.set_zorder` method of each axis. -// -//go:linkname Grid py.grid -func Grid(visible *py.Object, which *py.Object, axis *py.Object) *py.Object - -// Make a 2D hexagonal binning plot of points *x*, *y*. -// -// If *C* is *None*, the value of the hexagon is determined by the number -// of points in the hexagon. Otherwise, *C* specifies values at the -// coordinate (x[i], y[i]). For each hexagon, these values are reduced -// using *reduce_C_function*. -// -// Parameters -// ---------- -// x, y : array-like -// -// The data positions. *x* and *y* must be of the same length. -// -// C : array-like, optional -// -// If given, these values are accumulated in the bins. Otherwise, -// every point has a value of 1. Must be of the same length as *x* -// and *y*. -// -// gridsize : int or (int, int), default: 100 -// -// If a single int, the number of hexagons in the *x*-direction. -// The number of hexagons in the *y*-direction is chosen such that -// the hexagons are approximately regular. -// -// Alternatively, if a tuple (*nx*, *ny*), the number of hexagons -// in the *x*-direction and the *y*-direction. In the -// *y*-direction, counting is done along vertically aligned -// hexagons, not along the zig-zag chains of hexagons; see the -// following illustration. -// -// .. plot:: -// -// import numpy -// import matplotlib.pyplot as plt -// -// np.random.seed(19680801) -// n= 300 -// x = np.random.standard_normal(n) -// y = np.random.standard_normal(n) -// -// fig, ax = plt.subplots(figsize=(4, 4)) -// h = ax.hexbin(x, y, gridsize=(5, 3)) -// hx, hy = h.get_offsets().T -// ax.plot(hx[24::3], hy[24::3], 'ro-') -// ax.plot(hx[-3:], hy[-3:], 'ro-') -// ax.set_title('gridsize=(5, 3)') -// ax.axis('off') -// -// To get approximately regular hexagons, choose -// :math:`n_x = \sqrt{3}\,n_y`. -// -// bins : 'log' or int or sequence, default: None -// -// Discretization of the hexagon values. -// -// - If *None*, no binning is applied; the color of each hexagon -// directly corresponds to its count value. -// - If 'log', use a logarithmic scale for the colormap. -// Internally, :math:`log_{10}(i+1)` is used to determine the -// hexagon color. This is equivalent to ``norm=LogNorm()``. -// - If an integer, divide the counts in the specified number -// of bins, and color the hexagons accordingly. -// - If a sequence of values, the values of the lower bound of -// the bins to be used. -// -// xscale : {'linear', 'log'}, default: 'linear' -// -// Use a linear or log10 scale on the horizontal axis. -// -// yscale : {'linear', 'log'}, default: 'linear' -// -// Use a linear or log10 scale on the vertical axis. -// -// mincnt : int >= 0, default: *None* -// -// If not *None*, only display cells with at least *mincnt* -// number of points in the cell. -// -// marginals : bool, default: *False* -// -// If marginals is *True*, plot the marginal density as -// colormapped rectangles along the bottom of the x-axis and -// left of the y-axis. -// -// extent : 4-tuple of float, default: *None* -// -// The limits of the bins (xmin, xmax, ymin, ymax). -// The default assigns the limits based on -// *gridsize*, *x*, *y*, *xscale* and *yscale*. -// -// If *xscale* or *yscale* is set to 'log', the limits are -// expected to be the exponent for a power of 10. E.g. for -// x-limits of 1 and 50 in 'linear' scale and y-limits -// of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3). -// -// Returns -// ------- -// `~matplotlib.collections.PolyCollection` -// -// A `.PolyCollection` defining the hexagonal bins. -// -// - `.PolyCollection.get_offsets` contains a Mx2 array containing -// the x, y positions of the M hexagon centers. -// - `.PolyCollection.get_array` contains the values of the M -// hexagons. -// -// If *marginals* is *True*, horizontal -// bar and vertical bar (both PolyCollections) will be attached -// to the return collection as attributes *hbar* and *vbar*. -// -// Other Parameters -// ---------------- -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// alpha : float between 0 and 1, optional -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// linewidths : float, default: *None* -// -// If *None*, defaults to :rc:`patch.linewidth`. -// -// edgecolors : {'face', 'none', *None*} or color, default: 'face' -// -// The color of the hexagon edges. Possible values are: -// -// - 'face': Draw the edges in the same color as the fill color. -// - 'none': No edges are drawn. This can sometimes lead to unsightly -// unpainted pixels between the hexagons. -// - *None*: Draw outlines in the default color. -// - An explicit color. -// -// reduce_C_function : callable, default: `numpy.mean` -// -// The function to aggregate *C* within the bins. It is ignored if -// *C* is not given. This must have the signature:: -// -// def reduce_C_function(C: array) -> float -// -// Commonly used functions are: -// -// - `numpy.mean`: average of the points -// - `numpy.sum`: integral of the point values -// - `numpy.amax`: value taken from the largest point -// -// By default will only reduce cells with at least 1 point because some -// reduction functions (such as `numpy.amax`) will error/warn with empty -// input. Changing *mincnt* will adjust the cutoff, and if set to 0 will -// pass empty input to the reduction function. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y*, *C* -// -// **kwargs : `~matplotlib.collections.PolyCollection` properties -// -// All other keyword arguments are passed on to `.PolyCollection`: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -// See Also -// -------- -// hist2d : 2D histogram rectangular bins -// -//go:linkname Hexbin py.hexbin -func Hexbin(x *py.Object, y *py.Object, C *py.Object, gridsize *py.Object, bins *py.Object, xscale *py.Object, yscale *py.Object, extent *py.Object, cmap *py.Object, norm *py.Object, vmin *py.Object, vmax *py.Object, alpha *py.Object, linewidths *py.Object, edgecolors *py.Object, reduceCFunction *py.Object, mincnt *py.Object, marginals *py.Object) *py.Object - -// Compute and plot a histogram. -// -// This method uses `numpy.histogram` to bin the data in *x* and count the -// number of values in each bin, then draws the distribution either as a -// `.BarContainer` or `.Polygon`. The *bins*, *range*, *density*, and -// *weights* parameters are forwarded to `numpy.histogram`. -// -// If the data has already been binned and counted, use `~.bar` or -// `~.stairs` to plot the distribution:: -// -// counts, bins = np.histogram(x) -// plt.stairs(counts, bins) -// -// Alternatively, plot pre-computed bins and counts using “hist()“ by -// treating each bin as a single point with a weight equal to its count:: -// -// plt.hist(bins[:-1], bins, weights=counts) -// -// The data input *x* can be a singular array, a list of datasets of -// potentially different lengths ([*x0*, *x1*, ...]), or a 2D ndarray in -// which each column is a dataset. Note that the ndarray form is -// transposed relative to the list form. If the input is an array, then -// the return value is a tuple (*n*, *bins*, *patches*); if the input is a -// sequence of arrays, then the return value is a tuple -// ([*n0*, *n1*, ...], *bins*, [*patches0*, *patches1*, ...]). -// -// Masked arrays are not supported. -// -// Parameters -// ---------- -// x : (n,) array or sequence of (n,) arrays -// -// Input values, this takes either a single array or a sequence of -// arrays which are not required to be of the same length. -// -// bins : int or sequence or str, default: :rc:`hist.bins` -// -// If *bins* is an integer, it defines the number of equal-width bins -// in the range. -// -// If *bins* is a sequence, it defines the bin edges, including the -// left edge of the first bin and the right edge of the last bin; -// in this case, bins may be unequally spaced. All but the last -// (righthand-most) bin is half-open. In other words, if *bins* is:: -// -// [1, 2, 3, 4] -// -// then the first bin is ``[1, 2)`` (including 1, but excluding 2) and -// the second ``[2, 3)``. The last bin, however, is ``[3, 4]``, which -// *includes* 4. -// -// If *bins* is a string, it is one of the binning strategies -// supported by `numpy.histogram_bin_edges`: 'auto', 'fd', 'doane', -// 'scott', 'stone', 'rice', 'sturges', or 'sqrt'. -// -// range : tuple or None, default: None -// -// The lower and upper range of the bins. Lower and upper outliers -// are ignored. If not provided, *range* is ``(x.min(), x.max())``. -// Range has no effect if *bins* is a sequence. -// -// If *bins* is a sequence or *range* is specified, autoscaling -// is based on the specified bin range instead of the -// range of x. -// -// density : bool, default: False -// -// If ``True``, draw and return a probability density: each bin -// will display the bin's raw count divided by the total number of -// counts *and the bin width* -// (``density = counts / (sum(counts) * np.diff(bins))``), -// so that the area under the histogram integrates to 1 -// (``np.sum(density * np.diff(bins)) == 1``). -// -// If *stacked* is also ``True``, the sum of the histograms is -// normalized to 1. -// -// weights : (n,) array-like or None, default: None -// -// An array of weights, of the same shape as *x*. Each value in -// *x* only contributes its associated weight towards the bin count -// (instead of 1). If *density* is ``True``, the weights are -// normalized, so that the integral of the density over the range -// remains 1. -// -// cumulative : bool or -1, default: False -// -// If ``True``, then a histogram is computed where each bin gives the -// counts in that bin plus all bins for smaller values. The last bin -// gives the total number of datapoints. -// -// If *density* is also ``True`` then the histogram is normalized such -// that the last bin equals 1. -// -// If *cumulative* is a number less than 0 (e.g., -1), the direction -// of accumulation is reversed. In this case, if *density* is also -// ``True``, then the histogram is normalized such that the first bin -// equals 1. -// -// bottom : array-like, scalar, or None, default: None -// -// Location of the bottom of each bin, i.e. bins are drawn from -// ``bottom`` to ``bottom + hist(x, bins)`` If a scalar, the bottom -// of each bin is shifted by the same amount. If an array, each bin -// is shifted independently and the length of bottom must match the -// number of bins. If None, defaults to 0. -// -// histtype : {'bar', 'barstacked', 'step', 'stepfilled'}, default: 'bar' -// -// The type of histogram to draw. -// -// - 'bar' is a traditional bar-type histogram. If multiple data -// are given the bars are arranged side by side. -// - 'barstacked' is a bar-type histogram where multiple -// data are stacked on top of each other. -// - 'step' generates a lineplot that is by default unfilled. -// - 'stepfilled' generates a lineplot that is by default filled. -// -// align : {'left', 'mid', 'right'}, default: 'mid' -// -// The horizontal alignment of the histogram bars. -// -// - 'left': bars are centered on the left bin edges. -// - 'mid': bars are centered between the bin edges. -// - 'right': bars are centered on the right bin edges. -// -// orientation : {'vertical', 'horizontal'}, default: 'vertical' -// -// If 'horizontal', `~.Axes.barh` will be used for bar-type histograms -// and the *bottom* kwarg will be the left edges. -// -// rwidth : float or None, default: None -// -// The relative width of the bars as a fraction of the bin width. If -// ``None``, automatically compute the width. -// -// Ignored if *histtype* is 'step' or 'stepfilled'. -// -// log : bool, default: False -// -// If ``True``, the histogram axis will be set to a log scale. -// -// color : color or array-like of colors or None, default: None -// -// Color or sequence of colors, one per dataset. Default (``None``) -// uses the standard line color sequence. -// -// label : str or None, default: None -// -// String, or sequence of strings to match multiple datasets. Bar -// charts yield multiple patches per dataset, but only the first gets -// the label, so that `~.Axes.legend` will work as expected. -// -// stacked : bool, default: False -// -// If ``True``, multiple data are stacked on top of each other If -// ``False`` multiple data are arranged side by side if histtype is -// 'bar' or on top of each other if histtype is 'step' -// -// Returns -// ------- -// n : array or list of arrays -// -// The values of the histogram bins. See *density* and *weights* for a -// description of the possible semantics. If input *x* is an array, -// then this is an array of length *nbins*. If input is a sequence of -// arrays ``[data1, data2, ...]``, then this is a list of arrays with -// the values of the histograms for each of the arrays in the same -// order. The dtype of the array *n* (or of its element arrays) will -// always be float even if no weighting or normalization is used. -// -// bins : array -// -// The edges of the bins. Length nbins + 1 (nbins left edges and right -// edge of last bin). Always a single array even when multiple data -// sets are passed in. -// -// patches : `.BarContainer` or list of a single `.Polygon` or list of such objects -// -// Container of individual artists used to create the histogram -// or list of such containers if there are multiple input datasets. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *weights* -// -// **kwargs -// -// `~matplotlib.patches.Patch` properties -// -// See Also -// -------- -// hist2d : 2D histogram with rectangular bins -// hexbin : 2D histogram with hexagonal bins -// stairs : Plot a pre-computed histogram -// bar : Plot a pre-computed histogram -// -// Notes -// ----- -// For large numbers of bins (>1000), plotting can be significantly -// accelerated by using `~.Axes.stairs` to plot a pre-computed histogram -// (“plt.stairs(*np.histogram(data))“), or by setting *histtype* to -// 'step' or 'stepfilled' rather than 'bar' or 'barstacked'. -// -//go:linkname Hist py.hist -func Hist(x *py.Object, bins *py.Object, range_ *py.Object, density *py.Object, weights *py.Object, cumulative *py.Object, bottom *py.Object, histtype *py.Object, align *py.Object, orientation *py.Object, rwidth *py.Object, log *py.Object, color *py.Object, label *py.Object, stacked *py.Object) *py.Object - -// A stepwise constant function as a line with bounding edges -// or a filled plot. -// -// Parameters -// ---------- -// values : array-like -// -// The step heights. -// -// edges : array-like -// -// The edge positions, with ``len(edges) == len(vals) + 1``, -// between which the curve takes on vals values. -// -// orientation : {'vertical', 'horizontal'}, default: 'vertical' -// -// The direction of the steps. Vertical means that *values* are along -// the y-axis, and edges are along the x-axis. -// -// baseline : float, array-like or None, default: 0 -// -// The bottom value of the bounding edges or when -// ``fill=True``, position of lower edge. If *fill* is -// True or an array is passed to *baseline*, a closed -// path is drawn. -// -// fill : bool, default: False -// -// Whether the area under the step curve should be filled. -// -// Returns -// ------- -// StepPatch : `~matplotlib.patches.StepPatch` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs -// -// `~matplotlib.patches.StepPatch` properties -// -//go:linkname Stairs py.stairs -func Stairs(values *py.Object, edges *py.Object) *py.Object - -// Make a 2D histogram plot. -// -// Parameters -// ---------- -// x, y : array-like, shape (n, ) -// -// Input values -// -// bins : None or int or [int, int] or array-like or [array, array] -// -// The bin specification: -// -// - If int, the number of bins for the two dimensions -// (``nx = ny = bins``). -// - If ``[int, int]``, the number of bins in each dimension -// (``nx, ny = bins``). -// - If array-like, the bin edges for the two dimensions -// (``x_edges = y_edges = bins``). -// - If ``[array, array]``, the bin edges in each dimension -// (``x_edges, y_edges = bins``). -// -// The default value is 10. -// -// range : array-like shape(2, 2), optional -// -// The leftmost and rightmost edges of the bins along each dimension -// (if not specified explicitly in the bins parameters): ``[[xmin, -// xmax], [ymin, ymax]]``. All values outside of this range will be -// considered outliers and not tallied in the histogram. -// -// density : bool, default: False -// -// Normalize histogram. See the documentation for the *density* -// parameter of `~.Axes.hist` for more details. -// -// weights : array-like, shape (n, ), optional -// -// An array of values w_i weighing each sample (x_i, y_i). -// -// cmin, cmax : float, default: None -// -// All bins that has count less than *cmin* or more than *cmax* will not be -// displayed (set to NaN before passing to `~.Axes.pcolormesh`) and these count -// values in the return value count histogram will also be set to nan upon -// return. -// -// Returns -// ------- -// h : 2D array -// -// The bi-dimensional histogram of samples x and y. Values in x are -// histogrammed along the first dimension and values in y are -// histogrammed along the second dimension. -// -// xedges : 1D array -// -// The bin edges along the x-axis. -// -// yedges : 1D array -// -// The bin edges along the y-axis. -// -// image : `~.matplotlib.collections.QuadMesh` -// -// Other Parameters -// ---------------- -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// alpha : “0 <= scalar <= 1“ or “None“, optional -// -// The alpha blending value. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y*, *weights* -// -// **kwargs -// -// Additional parameters are passed along to the -// `~.Axes.pcolormesh` method and `~matplotlib.collections.QuadMesh` -// constructor. -// -// See Also -// -------- -// hist : 1D histogram plotting -// hexbin : 2D histogram with hexagonal bins -// -// Notes -// ----- -// - Currently “hist2d“ calculates its own axis limits, and any limits -// previously set are ignored. -// - Rendering the histogram with a logarithmic color scale is -// accomplished by passing a `.colors.LogNorm` instance to the *norm* -// keyword argument. Likewise, power-law normalization (similar -// in effect to gamma correction) can be accomplished with -// `.colors.PowerNorm`. -// -//go:linkname Hist2d py.hist2d -func Hist2d(x *py.Object, y *py.Object, bins *py.Object, range_ *py.Object, density *py.Object, weights *py.Object, cmin *py.Object, cmax *py.Object) *py.Object - -// Plot horizontal lines at each *y* from *xmin* to *xmax*. -// -// Parameters -// ---------- -// y : float or array-like -// -// y-indexes where to plot the lines. -// -// xmin, xmax : float or array-like -// -// Respective beginning and end of each line. If scalars are -// provided, all lines will have the same length. -// -// colors : color or list of colors, default: :rc:`lines.color` -// -// linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid' -// -// label : str, default: ” -// -// Returns -// ------- -// `~matplotlib.collections.LineCollection` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *y*, *xmin*, *xmax*, *colors* -// -// **kwargs : `~matplotlib.collections.LineCollection` properties. -// -// See Also -// -------- -// vlines : vertical lines -// axhline : horizontal line across the Axes -// -//go:linkname Hlines py.hlines -func Hlines(y *py.Object, xmin *py.Object, xmax *py.Object, colors *py.Object, linestyles *py.Object, label *py.Object) *py.Object - -// Display data as an image, i.e., on a 2D regular raster. -// -// The input may either be actual RGB(A) data, or 2D scalar data, which -// will be rendered as a pseudocolor image. For displaying a grayscale -// image, set up the colormapping using the parameters -// “cmap='gray', vmin=0, vmax=255“. -// -// The number of pixels used to render an image is set by the Axes size -// and the figure *dpi*. This can lead to aliasing artifacts when -// the image is resampled, because the displayed image size will usually -// not match the size of *X* (see -// :doc:`/gallery/images_contours_and_fields/image_antialiasing`). -// The resampling can be controlled via the *interpolation* parameter -// and/or :rc:`image.interpolation`. -// -// Parameters -// ---------- -// X : array-like or PIL image -// -// The image data. Supported array shapes are: -// -// - (M, N): an image with scalar data. The values are mapped to -// colors using normalization and a colormap. See parameters *norm*, -// *cmap*, *vmin*, *vmax*. -// - (M, N, 3): an image with RGB values (0-1 float or 0-255 int). -// - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), -// i.e. including transparency. -// -// The first two dimensions (M, N) define the rows and columns of -// the image. -// -// Out-of-range RGB(A) values are clipped. -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *X* is RGB(A). -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *X* is RGB(A). -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// This parameter is ignored if *X* is RGB(A). -// -// aspect : {'equal', 'auto'} or float or None, default: None -// -// The aspect ratio of the Axes. This parameter is particularly -// relevant for images since it determines whether data pixels are -// square. -// -// This parameter is a shortcut for explicitly calling -// `.Axes.set_aspect`. See there for further details. -// -// - 'equal': Ensures an aspect ratio of 1. Pixels will be square -// (unless pixel sizes are explicitly made non-square in data -// coordinates using *extent*). -// - 'auto': The Axes is kept fixed and the aspect is adjusted so -// that the data fit in the Axes. In general, this will result in -// non-square pixels. -// -// Normally, None (the default) means to use :rc:`image.aspect`. However, if -// the image uses a transform that does not contain the axes data transform, -// then None means to not modify the axes aspect at all (in that case, directly -// call `.Axes.set_aspect` if desired). -// -// interpolation : str, default: :rc:`image.interpolation` -// -// The interpolation method used. -// -// Supported values are 'none', 'antialiased', 'nearest', 'bilinear', -// 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', -// 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', -// 'sinc', 'lanczos', 'blackman'. -// -// The data *X* is resampled to the pixel size of the image on the -// figure canvas, using the interpolation method to either up- or -// downsample the data. -// -// If *interpolation* is 'none', then for the ps, pdf, and svg -// backends no down- or upsampling occurs, and the image data is -// passed to the backend as a native image. Note that different ps, -// pdf, and svg viewers may display these raw pixels differently. On -// other backends, 'none' is the same as 'nearest'. -// -// If *interpolation* is the default 'antialiased', then 'nearest' -// interpolation is used if the image is upsampled by more than a -// factor of three (i.e. the number of display pixels is at least -// three times the size of the data array). If the upsampling rate is -// smaller than 3, or the image is downsampled, then 'hanning' -// interpolation is used to act as an anti-aliasing filter, unless the -// image happens to be upsampled by exactly a factor of two or one. -// -// See -// :doc:`/gallery/images_contours_and_fields/interpolation_methods` -// for an overview of the supported interpolation methods, and -// :doc:`/gallery/images_contours_and_fields/image_antialiasing` for -// a discussion of image antialiasing. -// -// Some interpolation methods require an additional radius parameter, -// which can be set by *filterrad*. Additionally, the antigrain image -// resize filter is controlled by the parameter *filternorm*. -// -// interpolation_stage : {'data', 'rgba'}, default: 'data' -// -// If 'data', interpolation -// is carried out on the data provided by the user. If 'rgba', the -// interpolation is carried out after the colormapping has been -// applied (visual interpolation). -// -// alpha : float or array-like, optional -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// If *alpha* is an array, the alpha blending values are applied pixel -// by pixel, and *alpha* must have the same shape as *X*. -// -// origin : {'upper', 'lower'}, default: :rc:`image.origin` -// -// Place the [0, 0] index of the array in the upper left or lower -// left corner of the Axes. The convention (the default) 'upper' is -// typically used for matrices and images. -// -// Note that the vertical axis points upward for 'lower' -// but downward for 'upper'. -// -// See the :ref:`imshow_extent` tutorial for -// examples and a more detailed description. -// -// extent : floats (left, right, bottom, top), optional -// -// The bounding box in data coordinates that the image will fill. -// These values may be unitful and match the units of the Axes. -// The image is stretched individually along x and y to fill the box. -// -// The default extent is determined by the following conditions. -// Pixels have unit size in data coordinates. Their centers are on -// integer coordinates, and their center coordinates range from 0 to -// columns-1 horizontally and from 0 to rows-1 vertically. -// -// Note that the direction of the vertical axis and thus the default -// values for top and bottom depend on *origin*: -// -// - For ``origin == 'upper'`` the default is -// ``(-0.5, numcols-0.5, numrows-0.5, -0.5)``. -// - For ``origin == 'lower'`` the default is -// ``(-0.5, numcols-0.5, -0.5, numrows-0.5)``. -// -// See the :ref:`imshow_extent` tutorial for -// examples and a more detailed description. -// -// filternorm : bool, default: True -// -// A parameter for the antigrain image resize filter (see the -// antigrain documentation). If *filternorm* is set, the filter -// normalizes integer values and corrects the rounding errors. It -// doesn't do anything with the source floating point values, it -// corrects only integers according to the rule of 1.0 which means -// that any sum of pixel weights must be equal to 1.0. So, the -// filter function must produce a graph of the proper shape. -// -// filterrad : float > 0, default: 4.0 -// -// The filter radius for filters that have a radius parameter, i.e. -// when interpolation is one of: 'sinc', 'lanczos' or 'blackman'. -// -// resample : bool, default: :rc:`image.resample` -// -// When *True*, use a full resampling method. When *False*, only -// resample when the output image is larger than the input image. -// -// url : str, optional -// -// Set the url of the created `.AxesImage`. See `.Artist.set_url`. -// -// Returns -// ------- -// `~matplotlib.image.AxesImage` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs : `~matplotlib.artist.Artist` properties -// -// These parameters are passed on to the constructor of the -// `.AxesImage` artist. -// -// See Also -// -------- -// matshow : Plot a matrix or an array as an image. -// -// Notes -// ----- -// Unless *extent* is used, pixel centers will be located at integer -// coordinates. In other words: the origin will coincide with the center -// of pixel (0, 0). -// -// There are two common representations for RGB images with an alpha -// channel: -// -// - Straight (unassociated) alpha: R, G, and B channels represent the -// color of the pixel, disregarding its opacity. -// - Premultiplied (associated) alpha: R, G, and B channels represent -// the color of the pixel, adjusted for its opacity by multiplication. -// -// `~matplotlib.pyplot.imshow` expects RGB images adopting the straight -// (unassociated) alpha representation. -// -//go:linkname Imshow py.imshow -func Imshow(X *py.Object, cmap *py.Object, norm *py.Object) *py.Object - -// Place a legend on the Axes. -// -// Call signatures:: -// -// legend() -// legend(handles, labels) -// legend(handles=handles) -// legend(labels) -// -// The call signatures correspond to the following different ways to use -// this method: -// -// **1. Automatic detection of elements to be shown in the legend** -// -// The elements to be added to the legend are automatically determined, -// when you do not pass in any extra arguments. -// -// In this case, the labels are taken from the artist. You can specify -// them either at artist creation or by calling the -// :meth:`~.Artist.set_label` method on the artist:: -// -// ax.plot([1, 2, 3], label='Inline label') -// ax.legend() -// -// or:: -// -// line, = ax.plot([1, 2, 3]) -// line.set_label('Label via method') -// ax.legend() -// -// .. note:: -// -// Specific artists can be excluded from the automatic legend element -// selection by using a label starting with an underscore, "_". -// A string starting with an underscore is the default label for all -// artists, so calling `.Axes.legend` without any arguments and -// without setting the labels manually will result in no legend being -// drawn. -// -// **2. Explicitly listing the artists and labels in the legend** -// -// For full control of which artists have a legend entry, it is possible -// to pass an iterable of legend artists followed by an iterable of -// legend labels respectively:: -// -// ax.legend([line1, line2, line3], ['label1', 'label2', 'label3']) -// -// **3. Explicitly listing the artists in the legend** -// -// This is similar to 2, but the labels are taken from the artists' -// label properties. Example:: -// -// line1, = ax.plot([1, 2, 3], label='label1') -// line2, = ax.plot([1, 2, 3], label='label2') -// ax.legend(handles=[line1, line2]) -// -// **4. Labeling existing plot elements** -// -// .. admonition:: Discouraged -// -// This call signature is discouraged, because the relation between -// plot elements and labels is only implicit by their order and can -// easily be mixed up. -// -// To make a legend for all artists on an Axes, call this function with -// an iterable of strings, one for each legend item. For example:: -// -// ax.plot([1, 2, 3]) -// ax.plot([5, 6, 7]) -// ax.legend(['First line', 'Second line']) -// -// Parameters -// ---------- -// handles : list of (`.Artist` or tuple of `.Artist`), optional -// -// A list of Artists (lines, patches) to be added to the legend. -// Use this together with *labels*, if you need full control on what -// is shown in the legend and the automatic mechanism described above -// is not sufficient. -// -// The length of handles and labels should be the same in this -// case. If they are not, they are truncated to the smaller length. -// -// If an entry contains a tuple, then the legend handler for all Artists in the -// tuple will be placed alongside a single label. -// -// labels : list of str, optional -// -// A list of labels to show next to the artists. -// Use this together with *handles*, if you need full control on what -// is shown in the legend and the automatic mechanism described above -// is not sufficient. -// -// Returns -// ------- -// `~matplotlib.legend.Legend` -// -// Other Parameters -// ---------------- -// -// loc : str or pair of floats, default: :rc:`legend.loc` -// -// The location of the legend. -// -// The strings ``'upper left'``, ``'upper right'``, ``'lower left'``, -// ``'lower right'`` place the legend at the corresponding corner of the -// axes. -// -// The strings ``'upper center'``, ``'lower center'``, ``'center left'``, -// ``'center right'`` place the legend at the center of the corresponding edge -// of the axes. -// -// The string ``'center'`` places the legend at the center of the axes. -// -// The string ``'best'`` places the legend at the location, among the nine -// locations defined so far, with the minimum overlap with other drawn -// artists. This option can be quite slow for plots with large amounts of -// data; your plotting speed may benefit from providing a specific location. -// -// The location can also be a 2-tuple giving the coordinates of the lower-left -// corner of the legend in axes coordinates (in which case *bbox_to_anchor* -// will be ignored). -// -// For back-compatibility, ``'center right'`` (but no other location) can also -// be spelled ``'right'``, and each "string" location can also be given as a -// numeric value: -// -// ================== ============= -// Location String Location Code -// ================== ============= -// 'best' (Axes only) 0 -// 'upper right' 1 -// 'upper left' 2 -// 'lower left' 3 -// 'lower right' 4 -// 'right' 5 -// 'center left' 6 -// 'center right' 7 -// 'lower center' 8 -// 'upper center' 9 -// 'center' 10 -// ================== ============= -// -// bbox_to_anchor : `.BboxBase`, 2-tuple, or 4-tuple of floats -// -// Box that is used to position the legend in conjunction with *loc*. -// Defaults to `axes.bbox` (if called as a method to `.Axes.legend`) or -// `figure.bbox` (if `.Figure.legend`). This argument allows arbitrary -// placement of the legend. -// -// Bbox coordinates are interpreted in the coordinate system given by -// *bbox_transform*, with the default transform -// Axes or Figure coordinates, depending on which ``legend`` is called. -// -// If a 4-tuple or `.BboxBase` is given, then it specifies the bbox -// ``(x, y, width, height)`` that the legend is placed in. -// To put the legend in the best location in the bottom right -// quadrant of the axes (or figure):: -// -// loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.5) -// -// A 2-tuple ``(x, y)`` places the corner of the legend specified by *loc* at -// x, y. For example, to put the legend's upper right-hand corner in the -// center of the axes (or figure) the following keywords can be used:: -// -// loc='upper right', bbox_to_anchor=(0.5, 0.5) -// -// ncols : int, default: 1 -// -// The number of columns that the legend has. -// -// For backward compatibility, the spelling *ncol* is also supported -// but it is discouraged. If both are given, *ncols* takes precedence. -// -// prop : None or `~matplotlib.font_manager.FontProperties` or dict -// -// The font properties of the legend. If None (default), the current -// :data:`matplotlib.rcParams` will be used. -// -// fontsize : int or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'} -// -// The font size of the legend. If the value is numeric the size will be the -// absolute font size in points. String values are relative to the current -// default font size. This argument is only used if *prop* is not specified. -// -// labelcolor : str or list, default: :rc:`legend.labelcolor` -// -// The color of the text in the legend. Either a valid color string -// (for example, 'red'), or a list of color strings. The labelcolor can -// also be made to match the color of the line or marker using 'linecolor', -// 'markerfacecolor' (or 'mfc'), or 'markeredgecolor' (or 'mec'). -// -// Labelcolor can be set globally using :rc:`legend.labelcolor`. If None, -// use :rc:`text.color`. -// -// numpoints : int, default: :rc:`legend.numpoints` -// -// The number of marker points in the legend when creating a legend -// entry for a `.Line2D` (line). -// -// scatterpoints : int, default: :rc:`legend.scatterpoints` -// -// The number of marker points in the legend when creating -// a legend entry for a `.PathCollection` (scatter plot). -// -// scatteryoffsets : iterable of floats, default: “[0.375, 0.5, 0.3125]“ -// -// The vertical offset (relative to the font size) for the markers -// created for a scatter plot legend entry. 0.0 is at the base the -// legend text, and 1.0 is at the top. To draw all markers at the -// same height, set to ``[0.5]``. -// -// markerscale : float, default: :rc:`legend.markerscale` -// -// The relative size of legend markers compared to the originally drawn ones. -// -// markerfirst : bool, default: True -// -// If *True*, legend marker is placed to the left of the legend label. -// If *False*, legend marker is placed to the right of the legend label. -// -// reverse : bool, default: False -// -// If *True*, the legend labels are displayed in reverse order from the input. -// If *False*, the legend labels are displayed in the same order as the input. -// -// .. versionadded:: 3.7 -// -// frameon : bool, default: :rc:`legend.frameon` -// -// Whether the legend should be drawn on a patch (frame). -// -// fancybox : bool, default: :rc:`legend.fancybox` -// -// Whether round edges should be enabled around the `.FancyBboxPatch` which -// makes up the legend's background. -// -// shadow : None, bool or dict, default: :rc:`legend.shadow` -// -// Whether to draw a shadow behind the legend. -// The shadow can be configured using `.Patch` keywords. -// Customization via :rc:`legend.shadow` is currently not supported. -// -// framealpha : float, default: :rc:`legend.framealpha` -// -// The alpha transparency of the legend's background. -// If *shadow* is activated and *framealpha* is ``None``, the default value is -// ignored. -// -// facecolor : "inherit" or color, default: :rc:`legend.facecolor` -// -// The legend's background color. -// If ``"inherit"``, use :rc:`axes.facecolor`. -// -// edgecolor : "inherit" or color, default: :rc:`legend.edgecolor` -// -// The legend's background patch edge color. -// If ``"inherit"``, use take :rc:`axes.edgecolor`. -// -// mode : {"expand", None} -// -// If *mode* is set to ``"expand"`` the legend will be horizontally -// expanded to fill the axes area (or *bbox_to_anchor* if defines -// the legend's size). -// -// bbox_transform : None or `~matplotlib.transforms.Transform` -// -// The transform for the bounding box (*bbox_to_anchor*). For a value -// of ``None`` (default) the Axes' -// :data:`~matplotlib.axes.Axes.transAxes` transform will be used. -// -// title : str or None -// -// The legend's title. Default is no title (``None``). -// -// title_fontproperties : None or `~matplotlib.font_manager.FontProperties` or dict -// -// The font properties of the legend's title. If None (default), the -// *title_fontsize* argument will be used if present; if *title_fontsize* is -// also None, the current :rc:`legend.title_fontsize` will be used. -// -// title_fontsize : int or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}, default: :rc:`legend.title_fontsize` -// -// The font size of the legend's title. -// Note: This cannot be combined with *title_fontproperties*. If you want -// to set the fontsize alongside other font properties, use the *size* -// parameter in *title_fontproperties*. -// -// alignment : {'center', 'left', 'right'}, default: 'center' -// -// The alignment of the legend title and the box of entries. The entries -// are aligned as a single block, so that markers always lined up. -// -// borderpad : float, default: :rc:`legend.borderpad` -// -// The fractional whitespace inside the legend border, in font-size units. -// -// labelspacing : float, default: :rc:`legend.labelspacing` -// -// The vertical space between the legend entries, in font-size units. -// -// handlelength : float, default: :rc:`legend.handlelength` -// -// The length of the legend handles, in font-size units. -// -// handleheight : float, default: :rc:`legend.handleheight` -// -// The height of the legend handles, in font-size units. -// -// handletextpad : float, default: :rc:`legend.handletextpad` -// -// The pad between the legend handle and text, in font-size units. -// -// borderaxespad : float, default: :rc:`legend.borderaxespad` -// -// The pad between the axes and legend border, in font-size units. -// -// columnspacing : float, default: :rc:`legend.columnspacing` -// -// The spacing between columns, in font-size units. -// -// handler_map : dict or None -// -// The custom dictionary mapping instances or types to a legend -// handler. This *handler_map* updates the default handler map -// found at `matplotlib.legend.Legend.get_legend_handler_map`. -// -// draggable : bool, default: False -// -// Whether the legend can be dragged with the mouse. -// -// See Also -// -------- -// .Figure.legend -// -// Notes -// ----- -// Some artists are not supported by this function. See -// :ref:`legend_guide` for details. -// -// Examples -// -------- -// .. plot:: gallery/text_labels_and_annotations/legend.py -// -//go:linkname Legend py.legend -func Legend(__llgo_va_list ...interface{}) *py.Object - -// Control behavior of major tick locators. -// -// Because the locator is involved in autoscaling, `~.Axes.autoscale_view` -// is called automatically after the parameters are changed. -// -// Parameters -// ---------- -// axis : {'both', 'x', 'y'}, default: 'both' -// -// The axis on which to operate. (For 3D Axes, *axis* can also be -// set to 'z', and 'both' refers to all three axes.) -// -// tight : bool or None, optional -// -// Parameter passed to `~.Axes.autoscale_view`. -// Default is None, for no change. -// -// Other Parameters -// ---------------- -// **kwargs -// -// Remaining keyword arguments are passed to directly to the -// ``set_params()`` method of the locator. Supported keywords depend -// on the type of the locator. See for example -// `~.ticker.MaxNLocator.set_params` for the `.ticker.MaxNLocator` -// used by default for linear. -// -// Examples -// -------- -// When plotting small subplots, one might want to reduce the maximum -// number of ticks and use tight bounds, for example:: -// -// ax.locator_params(tight=True, nbins=4) -// -//go:linkname LocatorParams py.locator_params -func LocatorParams(axis *py.Object, tight *py.Object) *py.Object - -// Make a plot with log scaling on both the x- and y-axis. -// -// Call signatures:: -// -// loglog([x], y, [fmt], data=None, **kwargs) -// loglog([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) -// -// This is just a thin wrapper around `.plot` which additionally changes -// both the x-axis and the y-axis to log scaling. All the concepts and -// parameters of plot can be used here as well. -// -// The additional parameters *base*, *subs* and *nonpositive* control the -// x/y-axis properties. They are just forwarded to `.Axes.set_xscale` and -// `.Axes.set_yscale`. To use different properties on the x-axis and the -// y-axis, use e.g. -// “ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)“. -// -// Parameters -// ---------- -// base : float, default: 10 -// -// Base of the logarithm. -// -// subs : sequence, optional -// -// The location of the minor ticks. If *None*, reasonable locations -// are automatically chosen depending on the number of decades in the -// plot. See `.Axes.set_xscale`/`.Axes.set_yscale` for details. -// -// nonpositive : {'mask', 'clip'}, default: 'clip' -// -// Non-positive values can be masked as invalid, or clipped to a very -// small positive number. -// -// **kwargs -// -// All parameters supported by `.plot`. -// -// Returns -// ------- -// list of `.Line2D` -// -// Objects representing the plotted data. -// -//go:linkname Loglog py.loglog -func Loglog(__llgo_va_list ...interface{}) *py.Object - -// Plot the magnitude spectrum. -// -// Compute the magnitude spectrum of *x*. Data is padded to a -// length of *pad_to* and the windowing function *window* is applied to -// the signal. -// -// Parameters -// ---------- -// x : 1-D array or sequence -// -// Array or sequence containing the data. -// -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. While not increasing the actual resolution of the spectrum (the -// minimum distance between resolvable peaks), this can give more points in -// the plot, allowing for more detail. This corresponds to the *n* parameter -// in the call to `~numpy.fft.fft`. The default is None, which sets *pad_to* -// equal to the length of the input signal (i.e. no padding). -// -// scale : {'default', 'linear', 'dB'} -// -// The scaling of the values in the *spec*. 'linear' is no scaling. -// 'dB' returns the values in dB scale, i.e., the dB amplitude -// (20 * log10). 'default' is 'linear'. -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// Returns -// ------- -// spectrum : 1-D array -// -// The values for the magnitude spectrum before scaling (real valued). -// -// freqs : 1-D array -// -// The frequencies corresponding to the elements in *spectrum*. -// -// line : `~matplotlib.lines.Line2D` -// -// The line created by this function. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// psd -// -// Plots the power spectral density. -// -// angle_spectrum -// -// Plots the angles of the corresponding frequencies. -// -// phase_spectrum -// -// Plots the phase (unwrapped angle) of the corresponding frequencies. -// -// specgram -// -// Can plot the magnitude spectrum of segments within the signal in a -// colormap. -// -//go:linkname MagnitudeSpectrum py.magnitude_spectrum -func MagnitudeSpectrum(x *py.Object, Fs *py.Object, Fc *py.Object, window *py.Object, padTo *py.Object, sides *py.Object, scale *py.Object) *py.Object - -// Set or retrieve autoscaling margins. -// -// The padding added to each limit of the Axes is the *margin* -// times the data interval. All input parameters must be floats -// greater than -0.5. Passing both positional and keyword -// arguments is invalid and will raise a TypeError. If no -// arguments (positional or otherwise) are provided, the current -// margins will remain unchanged and simply be returned. -// -// Specifying any margin changes only the autoscaling; for example, -// if *xmargin* is not None, then *xmargin* times the X data -// interval will be added to each end of that interval before -// it is used in autoscaling. -// -// Parameters -// ---------- -// *margins : float, optional -// -// If a single positional argument is provided, it specifies -// both margins of the x-axis and y-axis limits. If two -// positional arguments are provided, they will be interpreted -// as *xmargin*, *ymargin*. If setting the margin on a single -// axis is desired, use the keyword arguments described below. -// -// x, y : float, optional -// -// Specific margin values for the x-axis and y-axis, -// respectively. These cannot be used with positional -// arguments, but can be used individually to alter on e.g., -// only the y-axis. -// -// tight : bool or None, default: True -// -// The *tight* parameter is passed to `~.axes.Axes.autoscale_view`, -// which is executed after a margin is changed; the default -// here is *True*, on the assumption that when margins are -// specified, no additional padding to match tick marks is -// usually desired. Setting *tight* to *None* preserves -// the previous setting. -// -// Returns -// ------- -// xmargin, ymargin : float -// -// Notes -// ----- -// If a previously used Axes method such as :meth:`pcolor` has set -// :attr:`use_sticky_edges` to `True`, only the limits not set by -// the "sticky artists" will be modified. To force all of the -// margins to be set, set :attr:`use_sticky_edges` to `False` -// before calling :meth:`margins`. -// -//go:linkname Margins py.margins -func Margins(__llgo_va_list ...interface{}) *py.Object - -// Remove minor ticks from the Axes. -// -//go:linkname MinorticksOff py.minorticks_off -func MinorticksOff() *py.Object - -// Display minor ticks on the Axes. -// -// Displaying minor ticks may reduce performance; you may turn them off -// using `minorticks_off()` if drawing speed is a problem. -// -//go:linkname MinorticksOn py.minorticks_on -func MinorticksOn() *py.Object - -// Create a pseudocolor plot with a non-regular rectangular grid. -// -// Call signature:: -// -// pcolor([X, Y,] C, **kwargs) -// -// *X* and *Y* can be used to specify the corners of the quadrilaterals. -// -// .. hint:: -// -// ``pcolor()`` can be very slow for large arrays. In most -// cases you should use the similar but much faster -// `~.Axes.pcolormesh` instead. See -// :ref:`Differences between pcolor() and pcolormesh() -// ` for a discussion of the -// differences. -// -// Parameters -// ---------- -// C : 2D array-like -// -// The color-mapped values. Color-mapping is controlled by *cmap*, -// *norm*, *vmin*, and *vmax*. -// -// X, Y : array-like, optional -// -// The coordinates of the corners of quadrilaterals of a pcolormesh:: -// -// (X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1]) -// ●╶───╴● -// │ │ -// ●╶───╴● -// (X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1]) -// -// Note that the column index corresponds to the x-coordinate, and -// the row index corresponds to y. For details, see the -// :ref:`Notes ` section below. -// -// If ``shading='flat'`` the dimensions of *X* and *Y* should be one -// greater than those of *C*, and the quadrilateral is colored due -// to the value at ``C[i, j]``. If *X*, *Y* and *C* have equal -// dimensions, a warning will be raised and the last row and column -// of *C* will be ignored. -// -// If ``shading='nearest'``, the dimensions of *X* and *Y* should be -// the same as those of *C* (if not, a ValueError will be raised). The -// color ``C[i, j]`` will be centered on ``(X[i, j], Y[i, j])``. -// -// If *X* and/or *Y* are 1-D arrays or column vectors they will be -// expanded as needed into the appropriate 2D arrays, making a -// rectangular grid. -// -// shading : {'flat', 'nearest', 'auto'}, default: :rc:`pcolor.shading` -// -// The fill style for the quadrilateral. Possible values: -// -// - 'flat': A solid color is used for each quad. The color of the -// quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by -// ``C[i, j]``. The dimensions of *X* and *Y* should be -// one greater than those of *C*; if they are the same as *C*, -// then a deprecation warning is raised, and the last row -// and column of *C* are dropped. -// - 'nearest': Each grid point will have a color centered on it, -// extending halfway between the adjacent grid centers. The -// dimensions of *X* and *Y* must be the same as *C*. -// - 'auto': Choose 'flat' if dimensions of *X* and *Y* are one -// larger than *C*. Choose 'nearest' if dimensions are the same. -// -// See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids` -// for more description. -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// edgecolors : {'none', None, 'face', color, color sequence}, optional -// -// The color of the edges. Defaults to 'none'. Possible values: -// -// - 'none' or '': No edge. -// - *None*: :rc:`patch.edgecolor` will be used. Note that currently -// :rc:`patch.force_edgecolor` has to be True for this to work. -// - 'face': Use the adjacent face color. -// - A color or sequence of colors will set the edge color. -// -// The singular form *edgecolor* works as an alias. -// -// alpha : float, default: None -// -// The alpha blending value of the face color, between 0 (transparent) -// and 1 (opaque). Note: The edgecolor is currently not affected by -// this. -// -// snap : bool, default: False -// -// Whether to snap the mesh to pixel boundaries. -// -// Returns -// ------- -// `matplotlib.collections.PolyQuadMesh` -// -// Other Parameters -// ---------------- -// antialiaseds : bool, default: False -// -// The default *antialiaseds* is False if the default -// *edgecolors*\ ="none" is used. This eliminates artificial lines -// at patch boundaries, and works regardless of the value of alpha. -// If *edgecolors* is not "none", then the default *antialiaseds* -// is taken from :rc:`patch.antialiased`. -// Stroking the edges may be preferred if *alpha* is 1, but will -// cause artifacts otherwise. -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs -// -// Additionally, the following arguments are allowed. They are passed -// along to the `~matplotlib.collections.PolyQuadMesh` constructor: -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -// See Also -// -------- -// pcolormesh : for an explanation of the differences between -// -// pcolor and pcolormesh. -// -// imshow : If *X* and *Y* are each equidistant, `~.Axes.imshow` can be a -// -// faster alternative. -// -// Notes -// ----- -// **Masked arrays** -// -// *X*, *Y* and *C* may be masked arrays. If either “C[i, j]“, or one -// of the vertices surrounding “C[i, j]“ (*X* or *Y* at -// “[i, j], [i+1, j], [i, j+1], [i+1, j+1]“) is masked, nothing is -// plotted. -// -// .. _axes-pcolor-grid-orientation: -// -// **Grid orientation** -// -// The grid orientation follows the standard matrix convention: An array -// *C* with shape (nrows, ncolumns) is plotted with the column number as -// *X* and the row number as *Y*. -// -//go:linkname Pcolor py.pcolor -func Pcolor(__llgo_va_list ...interface{}) *py.Object - -// Create a pseudocolor plot with a non-regular rectangular grid. -// -// Call signature:: -// -// pcolormesh([X, Y,] C, **kwargs) -// -// *X* and *Y* can be used to specify the corners of the quadrilaterals. -// -// .. hint:: -// -// `~.Axes.pcolormesh` is similar to `~.Axes.pcolor`. It is much faster -// and preferred in most cases. For a detailed discussion on the -// differences see :ref:`Differences between pcolor() and pcolormesh() -// `. -// -// Parameters -// ---------- -// C : array-like -// -// The mesh data. Supported array shapes are: -// -// - (M, N) or M*N: a mesh with scalar data. The values are mapped to -// colors using normalization and a colormap. See parameters *norm*, -// *cmap*, *vmin*, *vmax*. -// - (M, N, 3): an image with RGB values (0-1 float or 0-255 int). -// - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), -// i.e. including transparency. -// -// The first two dimensions (M, N) define the rows and columns of -// the mesh data. -// -// X, Y : array-like, optional -// -// The coordinates of the corners of quadrilaterals of a pcolormesh:: -// -// (X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1]) -// ●╶───╴● -// │ │ -// ●╶───╴● -// (X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1]) -// -// Note that the column index corresponds to the x-coordinate, and -// the row index corresponds to y. For details, see the -// :ref:`Notes ` section below. -// -// If ``shading='flat'`` the dimensions of *X* and *Y* should be one -// greater than those of *C*, and the quadrilateral is colored due -// to the value at ``C[i, j]``. If *X*, *Y* and *C* have equal -// dimensions, a warning will be raised and the last row and column -// of *C* will be ignored. -// -// If ``shading='nearest'`` or ``'gouraud'``, the dimensions of *X* -// and *Y* should be the same as those of *C* (if not, a ValueError -// will be raised). For ``'nearest'`` the color ``C[i, j]`` is -// centered on ``(X[i, j], Y[i, j])``. For ``'gouraud'``, a smooth -// interpolation is caried out between the quadrilateral corners. -// -// If *X* and/or *Y* are 1-D arrays or column vectors they will be -// expanded as needed into the appropriate 2D arrays, making a -// rectangular grid. -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// edgecolors : {'none', None, 'face', color, color sequence}, optional -// -// The color of the edges. Defaults to 'none'. Possible values: -// -// - 'none' or '': No edge. -// - *None*: :rc:`patch.edgecolor` will be used. Note that currently -// :rc:`patch.force_edgecolor` has to be True for this to work. -// - 'face': Use the adjacent face color. -// - A color or sequence of colors will set the edge color. -// -// The singular form *edgecolor* works as an alias. -// -// alpha : float, default: None -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// shading : {'flat', 'nearest', 'gouraud', 'auto'}, optional -// -// The fill style for the quadrilateral; defaults to -// :rc:`pcolor.shading`. Possible values: -// -// - 'flat': A solid color is used for each quad. The color of the -// quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by -// ``C[i, j]``. The dimensions of *X* and *Y* should be -// one greater than those of *C*; if they are the same as *C*, -// then a deprecation warning is raised, and the last row -// and column of *C* are dropped. -// - 'nearest': Each grid point will have a color centered on it, -// extending halfway between the adjacent grid centers. The -// dimensions of *X* and *Y* must be the same as *C*. -// - 'gouraud': Each quad will be Gouraud shaded: The color of the -// corners (i', j') are given by ``C[i', j']``. The color values of -// the area in between is interpolated from the corner values. -// The dimensions of *X* and *Y* must be the same as *C*. When -// Gouraud shading is used, *edgecolors* is ignored. -// - 'auto': Choose 'flat' if dimensions of *X* and *Y* are one -// larger than *C*. Choose 'nearest' if dimensions are the same. -// -// See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids` -// for more description. -// -// snap : bool, default: False -// -// Whether to snap the mesh to pixel boundaries. -// -// rasterized : bool, optional -// -// Rasterize the pcolormesh when drawing vector graphics. This can -// speed up rendering and produce smaller files for large data sets. -// See also :doc:`/gallery/misc/rasterization_demo`. -// -// Returns -// ------- -// `matplotlib.collections.QuadMesh` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs -// -// Additionally, the following arguments are allowed. They are passed -// along to the `~matplotlib.collections.QuadMesh` constructor: -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// visible: bool -// zorder: float -// -// See Also -// -------- -// pcolor : An alternative implementation with slightly different -// -// features. For a detailed discussion on the differences see -// :ref:`Differences between pcolor() and pcolormesh() -// `. -// -// imshow : If *X* and *Y* are each equidistant, `~.Axes.imshow` can be a -// -// faster alternative. -// -// Notes -// ----- -// **Masked arrays** -// -// *C* may be a masked array. If “C[i, j]“ is masked, the corresponding -// quadrilateral will be transparent. Masking of *X* and *Y* is not -// supported. Use `~.Axes.pcolor` if you need this functionality. -// -// .. _axes-pcolormesh-grid-orientation: -// -// **Grid orientation** -// -// The grid orientation follows the standard matrix convention: An array -// *C* with shape (nrows, ncolumns) is plotted with the column number as -// *X* and the row number as *Y*. -// -// .. _differences-pcolor-pcolormesh: -// -// **Differences between pcolor() and pcolormesh()** -// -// Both methods are used to create a pseudocolor plot of a 2D array -// using quadrilaterals. -// -// The main difference lies in the created object and internal data -// handling: -// While `~.Axes.pcolor` returns a `.PolyQuadMesh`, `~.Axes.pcolormesh` -// returns a `.QuadMesh`. The latter is more specialized for the given -// purpose and thus is faster. It should almost always be preferred. -// -// There is also a slight difference in the handling of masked arrays. -// Both `~.Axes.pcolor` and `~.Axes.pcolormesh` support masked arrays -// for *C*. However, only `~.Axes.pcolor` supports masked arrays for *X* -// and *Y*. The reason lies in the internal handling of the masked values. -// `~.Axes.pcolor` leaves out the respective polygons from the -// PolyQuadMesh. `~.Axes.pcolormesh` sets the facecolor of the masked -// elements to transparent. You can see the difference when using -// edgecolors. While all edges are drawn irrespective of masking in a -// QuadMesh, the edge between two adjacent masked quadrilaterals in -// `~.Axes.pcolor` is not drawn as the corresponding polygons do not -// exist in the PolyQuadMesh. Because PolyQuadMesh draws each individual -// polygon, it also supports applying hatches and linestyles to the collection. -// -// Another difference is the support of Gouraud shading in -// `~.Axes.pcolormesh`, which is not available with `~.Axes.pcolor`. -// -//go:linkname Pcolormesh py.pcolormesh -func Pcolormesh(__llgo_va_list ...interface{}) *py.Object - -// Plot the phase spectrum. -// -// Compute the phase spectrum (unwrapped angle spectrum) of *x*. -// Data is padded to a length of *pad_to* and the windowing function -// *window* is applied to the signal. -// -// Parameters -// ---------- -// x : 1-D array or sequence -// -// Array or sequence containing the data -// -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. While not increasing the actual resolution of the spectrum (the -// minimum distance between resolvable peaks), this can give more points in -// the plot, allowing for more detail. This corresponds to the *n* parameter -// in the call to `~numpy.fft.fft`. The default is None, which sets *pad_to* -// equal to the length of the input signal (i.e. no padding). -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// Returns -// ------- -// spectrum : 1-D array -// -// The values for the phase spectrum in radians (real valued). -// -// freqs : 1-D array -// -// The frequencies corresponding to the elements in *spectrum*. -// -// line : `~matplotlib.lines.Line2D` -// -// The line created by this function. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// magnitude_spectrum -// -// Plots the magnitudes of the corresponding frequencies. -// -// angle_spectrum -// -// Plots the wrapped version of this function. -// -// specgram -// -// Can plot the phase spectrum of segments within the signal in a -// colormap. -// -//go:linkname PhaseSpectrum py.phase_spectrum -func PhaseSpectrum(x *py.Object, Fs *py.Object, Fc *py.Object, window *py.Object, padTo *py.Object, sides *py.Object) *py.Object - -// Plot a pie chart. -// -// Make a pie chart of array *x*. The fractional area of each wedge is -// given by “x/sum(x)“. -// -// The wedges are plotted counterclockwise, by default starting from the -// x-axis. -// -// Parameters -// ---------- -// x : 1D array-like -// -// The wedge sizes. -// -// explode : array-like, default: None -// -// If not *None*, is a ``len(x)`` array which specifies the fraction -// of the radius with which to offset each wedge. -// -// labels : list, default: None -// -// A sequence of strings providing the labels for each wedge -// -// colors : color or array-like of color, default: None -// -// A sequence of colors through which the pie chart will cycle. If -// *None*, will use the colors in the currently active cycle. -// -// hatch : str or list, default: None -// -// Hatching pattern applied to all pie wedges or sequence of patterns -// through which the chart will cycle. For a list of valid patterns, -// see :doc:`/gallery/shapes_and_collections/hatch_style_reference`. -// -// .. versionadded:: 3.7 -// -// autopct : None or str or callable, default: None -// -// If not *None*, *autopct* is a string or function used to label the -// wedges with their numeric value. The label will be placed inside -// the wedge. If *autopct* is a format string, the label will be -// ``fmt % pct``. If *autopct* is a function, then it will be called. -// -// pctdistance : float, default: 0.6 -// -// The relative distance along the radius at which the text -// generated by *autopct* is drawn. To draw the text outside the pie, -// set *pctdistance* > 1. This parameter is ignored if *autopct* is -// ``None``. -// -// labeldistance : float or None, default: 1.1 -// -// The relative distance along the radius at which the labels are -// drawn. To draw the labels inside the pie, set *labeldistance* < 1. -// If set to ``None``, labels are not drawn but are still stored for -// use in `.legend`. -// -// shadow : bool or dict, default: False -// -// If bool, whether to draw a shadow beneath the pie. If dict, draw a shadow -// passing the properties in the dict to `.Shadow`. -// -// .. versionadded:: 3.8 -// *shadow* can be a dict. -// -// startangle : float, default: 0 degrees -// -// The angle by which the start of the pie is rotated, -// counterclockwise from the x-axis. -// -// radius : float, default: 1 -// -// The radius of the pie. -// -// counterclock : bool, default: True -// -// Specify fractions direction, clockwise or counterclockwise. -// -// wedgeprops : dict, default: None -// -// Dict of arguments passed to each `.patches.Wedge` of the pie. -// For example, ``wedgeprops = {'linewidth': 3}`` sets the width of -// the wedge border lines equal to 3. By default, ``clip_on=False``. -// When there is a conflict between these properties and other -// keywords, properties passed to *wedgeprops* take precedence. -// -// textprops : dict, default: None -// -// Dict of arguments to pass to the text objects. -// -// center : (float, float), default: (0, 0) -// -// The coordinates of the center of the chart. -// -// frame : bool, default: False -// -// Plot Axes frame with the chart if true. -// -// rotatelabels : bool, default: False -// -// Rotate each label to the angle of the corresponding slice if true. -// -// normalize : bool, default: True -// -// When *True*, always make a full pie by normalizing x so that -// ``sum(x) == 1``. *False* makes a partial pie if ``sum(x) <= 1`` -// and raises a `ValueError` for ``sum(x) > 1``. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *explode*, *labels*, *colors* -// -// Returns -// ------- -// patches : list -// -// A sequence of `matplotlib.patches.Wedge` instances -// -// texts : list -// -// A list of the label `.Text` instances. -// -// autotexts : list -// -// A list of `.Text` instances for the numeric labels. This will only -// be returned if the parameter *autopct* is not *None*. -// -// Notes -// ----- -// The pie chart will probably look best if the figure and Axes are -// square, or the Axes aspect is equal. -// This method sets the aspect ratio of the axis to "equal". -// The Axes aspect ratio can be controlled with `.Axes.set_aspect`. -// -//go:linkname Pie py.pie -func Pie(x *py.Object, explode *py.Object, labels *py.Object, colors *py.Object, autopct *py.Object, pctdistance *py.Object, shadow *py.Object, labeldistance *py.Object, startangle *py.Object, radius *py.Object, counterclock *py.Object, wedgeprops *py.Object, textprops *py.Object, center *py.Object, frame *py.Object, rotatelabels *py.Object) *py.Object - -// Plot y versus x as lines and/or markers. -// -// Call signatures:: -// -// plot([x], y, [fmt], *, data=None, **kwargs) -// plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) -// -// The coordinates of the points or line nodes are given by *x*, *y*. -// -// The optional parameter *fmt* is a convenient way for defining basic -// formatting like color, marker and linestyle. It's a shortcut string -// notation described in the *Notes* section below. -// -// >>> plot(x, y) # plot x and y using default line style and color -// >>> plot(x, y, 'bo') # plot x and y using blue circle markers -// >>> plot(y) # plot y using x as index array 0..N-1 -// >>> plot(y, 'r+') # ditto, but with red plusses -// -// You can use `.Line2D` properties as keyword arguments for more -// control on the appearance. Line properties and *fmt* can be mixed. -// The following two calls yield identical results: -// -// >>> plot(x, y, 'go--', linewidth=2, markersize=12) -// >>> plot(x, y, color='green', marker='o', linestyle='dashed', -// ... linewidth=2, markersize=12) -// -// When conflicting with *fmt*, keyword arguments take precedence. -// -// **Plotting labelled data** -// -// There's a convenient way for plotting objects with labelled data (i.e. -// data that can be accessed by index “obj['y']“). Instead of giving -// the data in *x* and *y*, you can provide the object in the *data* -// parameter and just give the labels for *x* and *y*:: -// -// >>> plot('xlabel', 'ylabel', data=obj) -// -// All indexable objects are supported. This could e.g. be a `dict`, a -// `pandas.DataFrame` or a structured numpy array. -// -// **Plotting multiple sets of data** -// -// There are various ways to plot multiple sets of data. -// -// - The most straight forward way is just to call `plot` multiple times. -// Example: -// -// >>> plot(x1, y1, 'bo') -// >>> plot(x2, y2, 'go') -// -// - If *x* and/or *y* are 2D arrays a separate data set will be drawn -// for every column. If both *x* and *y* are 2D, they must have the -// same shape. If only one of them is 2D with shape (N, m) the other -// must have length N and will be used for every data set m. -// -// Example: -// -// >>> x = [1, 2, 3] -// >>> y = np.array([[1, 2], [3, 4], [5, 6]]) -// >>> plot(x, y) -// -// is equivalent to: -// -// >>> for col in range(y.shape[1]): -// ... plot(x, y[:, col]) -// -// - The third way is to specify multiple sets of *[x]*, *y*, *[fmt]* -// groups:: -// -// >>> plot(x1, y1, 'g^', x2, y2, 'g-') -// -// In this case, any additional keyword argument applies to all -// datasets. Also, this syntax cannot be combined with the *data* -// parameter. -// -// By default, each line is assigned a different style specified by a -// 'style cycle'. The *fmt* and line property parameters are only -// necessary if you want explicit deviations from these defaults. -// Alternatively, you can also change the style cycle using -// :rc:`axes.prop_cycle`. -// -// Parameters -// ---------- -// x, y : array-like or scalar -// -// The horizontal / vertical coordinates of the data points. -// *x* values are optional and default to ``range(len(y))``. -// -// Commonly, these parameters are 1D arrays. -// -// They can also be scalars, or two-dimensional (in that case, the -// columns represent separate data sets). -// -// These arguments cannot be passed as keywords. -// -// fmt : str, optional -// -// A format string, e.g. 'ro' for red circles. See the *Notes* -// section for a full description of the format strings. -// -// Format strings are just an abbreviation for quickly setting -// basic line properties. All of these and more can also be -// controlled by keyword arguments. -// -// This argument cannot be passed as keyword. -// -// data : indexable object, optional -// -// An object with labelled data. If given, provide the label names to -// plot in *x* and *y*. -// -// .. note:: -// Technically there's a slight ambiguity in calls where the -// second label is a valid *fmt*. ``plot('n', 'o', data=obj)`` -// could be ``plt(x, y)`` or ``plt(y, fmt)``. In such cases, -// the former interpretation is chosen, but a warning is issued. -// You may suppress the warning by adding an empty format string -// ``plot('n', 'o', '', data=obj)``. -// -// Returns -// ------- -// list of `.Line2D` -// -// A list of lines representing the plotted data. -// -// Other Parameters -// ---------------- -// scalex, scaley : bool, default: True -// -// These parameters determine if the view limits are adapted to the -// data limits. The values are passed on to -// `~.axes.Axes.autoscale_view`. -// -// **kwargs : `~matplotlib.lines.Line2D` properties, optional -// -// *kwargs* are used to specify properties like a line label (for -// auto legends), linewidth, antialiasing, marker face color. -// Example:: -// -// >>> plot([1, 2, 3], [1, 2, 3], 'go-', label='line 1', linewidth=2) -// >>> plot([1, 2, 3], [1, 4, 9], 'rs', label='line 2') -// -// If you specify multiple lines with one plot call, the kwargs apply -// to all those lines. In case the label object is iterable, each -// element is used as labels for each set of data. -// -// Here is a list of available `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// scatter : XY scatter plot with markers of varying size and/or color ( -// -// sometimes also called bubble chart). -// -// Notes -// ----- -// **Format Strings** -// -// A format string consists of a part for color, marker and line:: -// -// fmt = '[marker][line][color]' -// -// Each of them is optional. If not provided, the value from the style -// cycle is used. Exception: If “line“ is given, but no “marker“, -// the data will be a line without markers. -// -// Other combinations such as “[color][marker][line]“ are also -// supported, but note that their parsing may be ambiguous. -// -// **Markers** -// -// ============= =============================== -// character description -// ============= =============================== -// “'.'“ point marker -// “','“ pixel marker -// “'o'“ circle marker -// “'v'“ triangle_down marker -// “'^'“ triangle_up marker -// “'<'“ triangle_left marker -// “'>'“ triangle_right marker -// “'1'“ tri_down marker -// “'2'“ tri_up marker -// “'3'“ tri_left marker -// “'4'“ tri_right marker -// “'8'“ octagon marker -// “'s'“ square marker -// “'p'“ pentagon marker -// “'P'“ plus (filled) marker -// “'*'“ star marker -// “'h'“ hexagon1 marker -// “'H'“ hexagon2 marker -// “'+'“ plus marker -// “'x'“ x marker -// “'X'“ x (filled) marker -// “'D'“ diamond marker -// “'d'“ thin_diamond marker -// “'|'“ vline marker -// “'_'“ hline marker -// ============= =============================== -// -// **Line Styles** -// -// ============= =============================== -// character description -// ============= =============================== -// “'-'“ solid line style -// “'--'“ dashed line style -// “'-.'“ dash-dot line style -// “':'“ dotted line style -// ============= =============================== -// -// Example format strings:: -// -// 'b' # blue markers with default shape -// 'or' # red circles -// '-g' # green solid line -// '--' # dashed line with default color -// '^k:' # black triangle_up markers connected by a dotted line -// -// **Colors** -// -// # The supported color abbreviations are the single letter codes -// -// ============= =============================== -// character color -// ============= =============================== -// “'b'“ blue -// “'g'“ green -// “'r'“ red -// “'c'“ cyan -// “'m'“ magenta -// “'y'“ yellow -// “'k'“ black -// “'w'“ white -// ============= =============================== -// -// and the “'CN'“ colors that index into the default property cycle. -// -// If the color is the only part of the format string, you can -// additionally use any `matplotlib.colors` spec, e.g. full names -// (“'green'“) or hex strings (“'#008000'“). -// -//go:linkname Plot py.plot -func Plot(__llgo_va_list ...interface{}) *py.Object - -// [*Discouraged*] Plot coercing the axis to treat floats as dates. -// -// .. admonition:: Discouraged -// -// This method exists for historic reasons and will be deprecated in -// the future. -// -// - ``datetime``-like data should directly be plotted using -// `~.Axes.plot`. -// - If you need to plot plain numeric data as :ref:`date-format` or -// need to set a timezone, call ``ax.xaxis.axis_date`` / -// ``ax.yaxis.axis_date`` before `~.Axes.plot`. See -// `.Axis.axis_date`. -// -// Similar to `.plot`, this plots *y* vs. *x* as lines or markers. -// However, the axis labels are formatted as dates depending on *xdate* -// and *ydate*. Note that `.plot` will work with `datetime` and -// `numpy.datetime64` objects without resorting to this method. -// -// Parameters -// ---------- -// x, y : array-like -// -// The coordinates of the data points. If *xdate* or *ydate* is -// *True*, the respective values *x* or *y* are interpreted as -// :ref:`Matplotlib dates `. -// -// fmt : str, optional -// -// The plot format string. For details, see the corresponding -// parameter in `.plot`. -// -// tz : timezone string or `datetime.tzinfo`, default: :rc:`timezone` -// -// The time zone to use in labeling dates. -// -// xdate : bool, default: True -// -// If *True*, the *x*-axis will be interpreted as Matplotlib dates. -// -// ydate : bool, default: False -// -// If *True*, the *y*-axis will be interpreted as Matplotlib dates. -// -// Returns -// ------- -// list of `.Line2D` -// -// Objects representing the plotted data. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// matplotlib.dates : Helper functions on dates. -// matplotlib.dates.date2num : Convert dates to num. -// matplotlib.dates.num2date : Convert num to dates. -// matplotlib.dates.drange : Create an equally spaced sequence of dates. -// -// Notes -// ----- -// If you are using custom date tickers and formatters, it may be -// necessary to set the formatters/locators after the call to -// `.plot_date`. `.plot_date` will set the default tick locator to -// `.AutoDateLocator` (if the tick locator is not already set to a -// `.DateLocator` instance) and the default tick formatter to -// `.AutoDateFormatter` (if the tick formatter is not already set to a -// `.DateFormatter` instance). -// -//go:linkname PlotDate py.plot_date -func PlotDate(x *py.Object, y *py.Object, fmt *py.Object, tz *py.Object, xdate *py.Object, ydate *py.Object) *py.Object - -// Plot the power spectral density. -// -// The power spectral density :math:`P_{xx}` by Welch's average -// periodogram method. The vector *x* is divided into *NFFT* length -// segments. Each segment is detrended by function *detrend* and -// windowed by function *window*. *noverlap* gives the length of -// the overlap between segments. The :math:`|\mathrm{fft}(i)|^2` -// of each segment :math:`i` are averaged to compute :math:`P_{xx}`, -// with a scaling to correct for power loss due to windowing. -// -// If len(*x*) < *NFFT*, it will be zero padded to *NFFT*. -// -// Parameters -// ---------- -// x : 1-D array or sequence -// -// Array or sequence containing the data -// -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. This can be different from *NFFT*, which specifies the number -// of data points used. While not increasing the actual resolution of the -// spectrum (the minimum distance between resolvable peaks), this can give -// more points in the plot, allowing for more detail. This corresponds to -// the *n* parameter in the call to `~numpy.fft.fft`. The default is None, -// which sets *pad_to* equal to *NFFT* -// -// NFFT : int, default: 256 -// -// The number of data points used in each block for the FFT. A power 2 is -// most efficient. This should *NOT* be used to get zero padding, or the -// scaling of the result will be incorrect; use *pad_to* for this instead. -// -// detrend : {'none', 'mean', 'linear'} or callable, default: 'none' -// -// The function applied to each segment before fft-ing, designed to remove -// the mean or linear trend. Unlike in MATLAB, where the *detrend* parameter -// is a vector, in Matplotlib it is a function. The :mod:`~matplotlib.mlab` -// module defines `.detrend_none`, `.detrend_mean`, and `.detrend_linear`, -// but you can use a custom function as well. You can also use a string to -// choose one of the functions: 'none' calls `.detrend_none`. 'mean' calls -// `.detrend_mean`. 'linear' calls `.detrend_linear`. -// -// scale_by_freq : bool, default: True -// -// Whether the resulting density values should be scaled by the scaling -// frequency, which gives density in units of 1/Hz. This allows for -// integration over the returned frequency values. The default is True for -// MATLAB compatibility. -// -// noverlap : int, default: 0 (no overlap) -// -// The number of points of overlap between segments. -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// return_line : bool, default: False -// -// Whether to include the line object plotted in the returned values. -// -// Returns -// ------- -// Pxx : 1-D array -// -// The values for the power spectrum :math:`P_{xx}` before scaling -// (real valued). -// -// freqs : 1-D array -// -// The frequencies corresponding to the elements in *Pxx*. -// -// line : `~matplotlib.lines.Line2D` -// -// The line created by this function. -// Only returned if *return_line* is True. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x* -// -// **kwargs -// -// Keyword arguments control the `.Line2D` properties: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -// See Also -// -------- -// specgram -// -// Differs in the default overlap; in not returning the mean of the -// segment periodograms; in returning the times of the segments; and -// in plotting a colormap instead of a line. -// -// magnitude_spectrum -// -// Plots the magnitude spectrum. -// -// csd -// -// Plots the spectral density between two signals. -// -// Notes -// ----- -// For plotting, the power is plotted as -// :math:`10\log_{10}(P_{xx})` for decibels, though *Pxx* itself -// is returned. -// -// References -// ---------- -// Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, -// John Wiley & Sons (1986) -// -//go:linkname Psd py.psd -func Psd(x *py.Object, NFFT *py.Object, Fs *py.Object, Fc *py.Object, detrend *py.Object, window *py.Object, noverlap *py.Object, padTo *py.Object, sides *py.Object, scaleByFreq *py.Object, returnLine *py.Object) *py.Object - -// Plot a 2D field of arrows. -// -// Call signature:: -// -// quiver([X, Y], U, V, [C], **kwargs) -// -// *X*, *Y* define the arrow locations, *U*, *V* define the arrow directions, and -// *C* optionally sets the color. -// -// **Arrow length** -// -// The default settings auto-scales the length of the arrows to a reasonable size. -// To change this behavior see the *scale* and *scale_units* parameters. -// -// **Arrow shape** -// -// The arrow shape is determined by *width*, *headwidth*, *headlength* and -// *headaxislength*. See the notes below. -// -// **Arrow styling** -// -// Each arrow is internally represented by a filled polygon with a default edge -// linewidth of 0. As a result, an arrow is rather a filled area, not a line with -// a head, and `.PolyCollection` properties like *linewidth*, *edgecolor*, -// *facecolor*, etc. act accordingly. -// -// Parameters -// ---------- -// X, Y : 1D or 2D array-like, optional -// -// The x and y coordinates of the arrow locations. -// -// If not given, they will be generated as a uniform integer meshgrid based -// on the dimensions of *U* and *V*. -// -// If *X* and *Y* are 1D but *U*, *V* are 2D, *X*, *Y* are expanded to 2D -// using ``X, Y = np.meshgrid(X, Y)``. In this case ``len(X)`` and ``len(Y)`` -// must match the column and row dimensions of *U* and *V*. -// -// U, V : 1D or 2D array-like -// -// The x and y direction components of the arrow vectors. The interpretation -// of these components (in data or in screen space) depends on *angles*. -// -// *U* and *V* must have the same number of elements, matching the number of -// arrow locations in *X*, *Y*. *U* and *V* may be masked. Locations masked -// in any of *U*, *V*, and *C* will not be drawn. -// -// C : 1D or 2D array-like, optional -// -// Numeric data that defines the arrow colors by colormapping via *norm* and -// *cmap*. -// -// This does not support explicit colors. If you want to set colors directly, -// use *color* instead. The size of *C* must match the number of arrow -// locations. -// -// angles : {'uv', 'xy'} or array-like, default: 'uv' -// -// Method for determining the angle of the arrows. -// -// - 'uv': Arrow direction in screen coordinates. Use this if the arrows -// symbolize a quantity that is not based on *X*, *Y* data coordinates. -// -// If *U* == *V* the orientation of the arrow on the plot is 45 degrees -// counter-clockwise from the horizontal axis (positive to the right). -// -// - 'xy': Arrow direction in data coordinates, i.e. the arrows point from -// (x, y) to (x+u, y+v). Use this e.g. for plotting a gradient field. -// -// - Arbitrary angles may be specified explicitly as an array of values -// in degrees, counter-clockwise from the horizontal axis. -// -// In this case *U*, *V* is only used to determine the length of the -// arrows. -// -// Note: inverting a data axis will correspondingly invert the -// arrows only with ``angles='xy'``. -// -// pivot : {'tail', 'mid', 'middle', 'tip'}, default: 'tail' -// -// The part of the arrow that is anchored to the *X*, *Y* grid. The arrow -// rotates about this point. -// -// 'mid' is a synonym for 'middle'. -// -// scale : float, optional -// -// Scales the length of the arrow inversely. -// -// Number of data units per arrow length unit, e.g., m/s per plot width; a -// smaller scale parameter makes the arrow longer. Default is *None*. -// -// If *None*, a simple autoscaling algorithm is used, based on the average -// vector length and the number of vectors. The arrow length unit is given by -// the *scale_units* parameter. -// -// scale_units : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, optional -// -// If the *scale* kwarg is *None*, the arrow length unit. Default is *None*. -// -// e.g. *scale_units* is 'inches', *scale* is 2.0, and ``(u, v) = (1, 0)``, -// then the vector will be 0.5 inches long. -// -// If *scale_units* is 'width' or 'height', then the vector will be half the -// width/height of the axes. -// -// If *scale_units* is 'x' then the vector will be 0.5 x-axis -// units. To plot vectors in the x-y plane, with u and v having -// the same units as x and y, use -// ``angles='xy', scale_units='xy', scale=1``. -// -// units : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, default: 'width' -// -// Affects the arrow size (except for the length). In particular, the shaft -// *width* is measured in multiples of this unit. -// -// Supported values are: -// -// - 'width', 'height': The width or height of the Axes. -// - 'dots', 'inches': Pixels or inches based on the figure dpi. -// - 'x', 'y', 'xy': *X*, *Y* or :math:`\sqrt{X^2 + Y^2}` in data units. -// -// The following table summarizes how these values affect the visible arrow -// size under zooming and figure size changes: -// -// ================= ================= ================== -// units zoom figure size change -// ================= ================= ================== -// 'x', 'y', 'xy' arrow size scales — -// 'width', 'height' — arrow size scales -// 'dots', 'inches' — — -// ================= ================= ================== -// -// width : float, optional -// -// Shaft width in arrow units. All head parameters are relative to *width*. -// -// The default depends on choice of *units* above, and number of vectors; -// a typical starting value is about 0.005 times the width of the plot. -// -// headwidth : float, default: 3 -// -// Head width as multiple of shaft *width*. See the notes below. -// -// headlength : float, default: 5 -// -// Head length as multiple of shaft *width*. See the notes below. -// -// headaxislength : float, default: 4.5 -// -// Head length at shaft intersection as multiple of shaft *width*. -// See the notes below. -// -// minshaft : float, default: 1 -// -// Length below which arrow scales, in units of head length. Do not -// set this to less than 1, or small arrows will look terrible! -// -// minlength : float, default: 1 -// -// Minimum length as a multiple of shaft width; if an arrow length -// is less than this, plot a dot (hexagon) of this diameter instead. -// -// color : color or color sequence, optional -// -// Explicit color(s) for the arrows. If *C* has been set, *color* has no -// effect. -// -// This is a synonym for the `.PolyCollection` *facecolor* parameter. -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs : `~matplotlib.collections.PolyCollection` properties, optional -// -// All other keyword arguments are passed on to `.PolyCollection`: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: array-like or scalar or None -// animated: bool -// antialiased or aa or antialiaseds: bool or list of bools -// array: array-like or None -// capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// clim: (vmin: float, vmax: float) -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// cmap: `.Colormap` or str or None -// color: color or list of RGBA tuples -// edgecolor or ec or edgecolors: color or list of colors or 'face' -// facecolor or facecolors or fc: color or list of colors -// figure: `~matplotlib.figure.Figure` -// gid: str -// hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} -// in_layout: bool -// joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// label: object -// linestyle or dashes or linestyles or ls: str or tuple or list thereof -// linewidth or linewidths or lw: float or list of floats -// mouseover: bool -// norm: `.Normalize` or str or None -// offset_transform or transOffset: `.Transform` -// offsets: (N, 2) or (2,) array-like -// path_effects: list of `.AbstractPathEffect` -// paths: list of array-like -// picker: None or bool or float or callable -// pickradius: float -// rasterized: bool -// sizes: `numpy.ndarray` or None -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// urls: list of str or None -// verts: list of array-like -// verts_and_codes: unknown -// visible: bool -// zorder: float -// -// Returns -// ------- -// `~matplotlib.quiver.Quiver` -// -// See Also -// -------- -// .Axes.quiverkey : Add a key to a quiver plot. -// -// Notes -// ----- -// -// **Arrow shape** -// -// The arrow is drawn as a polygon using the nodes as shown below. The values -// *headwidth*, *headlength*, and *headaxislength* are in units of *width*. -// -// .. image:: /_static/quiver_sizes.svg -// -// :width: 500px -// -// The defaults give a slightly swept-back arrow. Here are some guidelines how to -// get other head shapes: -// -// - To make the head a triangle, make *headaxislength* the same as *headlength*. -// - To make the arrow more pointed, reduce *headwidth* or increase *headlength* -// and *headaxislength*. -// - To make the head smaller relative to the shaft, scale down all the head -// parameters proportionally. -// - To remove the head completely, set all *head* parameters to 0. -// - To get a diamond-shaped head, make *headaxislength* larger than *headlength*. -// - Warning: For *headaxislength* < (*headlength* / *headwidth*), the "headaxis" -// nodes (i.e. the ones connecting the head with the shaft) will protrude out -// of the head in forward direction so that the arrow head looks broken. -// -//go:linkname Quiver py.quiver -func Quiver(__llgo_va_list ...interface{}) *py.Object - -// Add a key to a quiver plot. -// -// The positioning of the key depends on *X*, *Y*, *coordinates*, and -// *labelpos*. If *labelpos* is 'N' or 'S', *X*, *Y* give the position of -// the middle of the key arrow. If *labelpos* is 'E', *X*, *Y* positions -// the head, and if *labelpos* is 'W', *X*, *Y* positions the tail; in -// either of these two cases, *X*, *Y* is somewhere in the middle of the -// arrow+label key object. -// -// Parameters -// ---------- -// Q : `~matplotlib.quiver.Quiver` -// -// A `.Quiver` object as returned by a call to `~.Axes.quiver()`. -// -// X, Y : float -// -// The location of the key. -// -// U : float -// -// The length of the key. -// -// label : str -// -// The key label (e.g., length and units of the key). -// -// angle : float, default: 0 -// -// The angle of the key arrow, in degrees anti-clockwise from the -// horizontal axis. -// -// coordinates : {'axes', 'figure', 'data', 'inches'}, default: 'axes' -// -// Coordinate system and units for *X*, *Y*: 'axes' and 'figure' are -// normalized coordinate systems with (0, 0) in the lower left and -// (1, 1) in the upper right; 'data' are the axes data coordinates -// (used for the locations of the vectors in the quiver plot itself); -// 'inches' is position in the figure in inches, with (0, 0) at the -// lower left corner. -// -// color : color -// -// Overrides face and edge colors from *Q*. -// -// labelpos : {'N', 'S', 'E', 'W'} -// -// Position the label above, below, to the right, to the left of the -// arrow, respectively. -// -// labelsep : float, default: 0.1 -// -// Distance in inches between the arrow and the label. -// -// labelcolor : color, default: :rc:`text.color` -// -// Label color. -// -// fontproperties : dict, optional -// -// A dictionary with keyword arguments accepted by the -// `~matplotlib.font_manager.FontProperties` initializer: -// *family*, *style*, *variant*, *size*, *weight*. -// -// **kwargs -// -// Any additional keyword arguments are used to override vector -// properties taken from *Q*. -// -//go:linkname Quiverkey py.quiverkey -func Quiverkey(Q *py.Object, X *py.Object, Y *py.Object, U *py.Object, label *py.Object) *py.Object - -// A scatter plot of *y* vs. *x* with varying marker size and/or color. -// -// Parameters -// ---------- -// x, y : float or array-like, shape (n, ) -// -// The data positions. -// -// s : float or array-like, shape (n, ), optional -// -// The marker size in points**2 (typographic points are 1/72 in.). -// Default is ``rcParams['lines.markersize'] ** 2``. -// -// The linewidth and edgecolor can visually interact with the marker -// size, and can lead to artifacts if the marker size is smaller than -// the linewidth. -// -// If the linewidth is greater than 0 and the edgecolor is anything -// but *'none'*, then the effective size of the marker will be -// increased by half the linewidth because the stroke will be centered -// on the edge of the shape. -// -// To eliminate the marker edge either set *linewidth=0* or -// *edgecolor='none'*. -// -// c : array-like or list of colors or color, optional -// -// The marker colors. Possible values: -// -// - A scalar or sequence of n numbers to be mapped to colors using -// *cmap* and *norm*. -// - A 2D array in which the rows are RGB or RGBA. -// - A sequence of colors of length n. -// - A single color format string. -// -// Note that *c* should not be a single numeric RGB or RGBA sequence -// because that is indistinguishable from an array of values to be -// colormapped. If you want to specify the same RGB or RGBA value for -// all points, use a 2D array with a single row. Otherwise, -// value-matching will have precedence in case of a size matching with -// *x* and *y*. -// -// If you wish to specify a single color for all points -// prefer the *color* keyword argument. -// -// Defaults to `None`. In that case the marker color is determined -// by the value of *color*, *facecolor* or *facecolors*. In case -// those are not specified or `None`, the marker color is determined -// by the next color of the ``Axes``' current "shape and fill" color -// cycle. This cycle defaults to :rc:`axes.prop_cycle`. -// -// marker : `~.markers.MarkerStyle`, default: :rc:`scatter.marker` -// -// The marker style. *marker* can be either an instance of the class -// or the text shorthand for a particular marker. -// See :mod:`matplotlib.markers` for more information about marker -// styles. -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *c* is RGB(A). -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *c* is RGB(A). -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// This parameter is ignored if *c* is RGB(A). -// -// alpha : float, default: None -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// linewidths : float or array-like, default: :rc:`lines.linewidth` -// -// The linewidth of the marker edges. Note: The default *edgecolors* -// is 'face'. You may want to change this as well. -// -// edgecolors : {'face', 'none', *None*} or color or sequence of color, default: :rc:`scatter.edgecolors` -// -// The edge color of the marker. Possible values: -// -// - 'face': The edge color will always be the same as the face color. -// - 'none': No patch boundary will be drawn. -// - A color or sequence of colors. -// -// For non-filled markers, *edgecolors* is ignored. Instead, the color -// is determined like with 'face', i.e. from *c*, *colors*, or -// *facecolors*. -// -// plotnonfinite : bool, default: False -// -// Whether to plot points with nonfinite *c* (i.e. ``inf``, ``-inf`` -// or ``nan``). If ``True`` the points are drawn with the *bad* -// colormap color (see `.Colormap.set_bad`). -// -// Returns -// ------- -// `~matplotlib.collections.PathCollection` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y*, *s*, *linewidths*, *edgecolors*, *c*, *facecolor*, *facecolors*, *color* -// -// **kwargs : `~matplotlib.collections.Collection` properties -// -// See Also -// -------- -// plot : To plot scatter plots when markers are identical in size and -// -// color. -// -// Notes -// ----- -// -// - The `.plot` function will be faster for scatterplots where markers -// don't vary in size or color. -// -// - Any or all of *x*, *y*, *s*, and *c* may be masked arrays, in which -// case all masks will be combined and only unmasked points will be -// plotted. -// -// - Fundamentally, scatter works with 1D arrays; *x*, *y*, *s*, and *c* -// may be input as N-D arrays, but within scatter they will be -// flattened. The exception is *c*, which will be flattened only if its -// size matches the size of *x* and *y*. -// -//go:linkname Scatter py.scatter -func Scatter(x *py.Object, y *py.Object, s *py.Object, c *py.Object, marker *py.Object, cmap *py.Object, norm *py.Object, vmin *py.Object, vmax *py.Object, alpha *py.Object, linewidths *py.Object) *py.Object - -// Make a plot with log scaling on the x-axis. -// -// Call signatures:: -// -// semilogx([x], y, [fmt], data=None, **kwargs) -// semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) -// -// This is just a thin wrapper around `.plot` which additionally changes -// the x-axis to log scaling. All the concepts and parameters of plot can -// be used here as well. -// -// The additional parameters *base*, *subs*, and *nonpositive* control the -// x-axis properties. They are just forwarded to `.Axes.set_xscale`. -// -// Parameters -// ---------- -// base : float, default: 10 -// -// Base of the x logarithm. -// -// subs : array-like, optional -// -// The location of the minor xticks. If *None*, reasonable locations -// are automatically chosen depending on the number of decades in the -// plot. See `.Axes.set_xscale` for details. -// -// nonpositive : {'mask', 'clip'}, default: 'clip' -// -// Non-positive values in x can be masked as invalid, or clipped to a -// very small positive number. -// -// **kwargs -// -// All parameters supported by `.plot`. -// -// Returns -// ------- -// list of `.Line2D` -// -// Objects representing the plotted data. -// -//go:linkname Semilogx py.semilogx -func Semilogx(__llgo_va_list ...interface{}) *py.Object - -// Make a plot with log scaling on the y-axis. -// -// Call signatures:: -// -// semilogy([x], y, [fmt], data=None, **kwargs) -// semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) -// -// This is just a thin wrapper around `.plot` which additionally changes -// the y-axis to log scaling. All the concepts and parameters of plot can -// be used here as well. -// -// The additional parameters *base*, *subs*, and *nonpositive* control the -// y-axis properties. They are just forwarded to `.Axes.set_yscale`. -// -// Parameters -// ---------- -// base : float, default: 10 -// -// Base of the y logarithm. -// -// subs : array-like, optional -// -// The location of the minor yticks. If *None*, reasonable locations -// are automatically chosen depending on the number of decades in the -// plot. See `.Axes.set_yscale` for details. -// -// nonpositive : {'mask', 'clip'}, default: 'clip' -// -// Non-positive values in y can be masked as invalid, or clipped to a -// very small positive number. -// -// **kwargs -// -// All parameters supported by `.plot`. -// -// Returns -// ------- -// list of `.Line2D` -// -// Objects representing the plotted data. -// -//go:linkname Semilogy py.semilogy -func Semilogy(__llgo_va_list ...interface{}) *py.Object - -// Plot a spectrogram. -// -// Compute and plot a spectrogram of data in *x*. Data are split into -// *NFFT* length segments and the spectrum of each section is -// computed. The windowing function *window* is applied to each -// segment, and the amount of overlap of each segment is -// specified with *noverlap*. The spectrogram is plotted as a colormap -// (using imshow). -// -// Parameters -// ---------- -// x : 1-D array or sequence -// -// Array or sequence containing the data. -// -// Fs : float, default: 2 -// -// The sampling frequency (samples per time unit). It is used to calculate -// the Fourier frequencies, *freqs*, in cycles per time unit. -// -// window : callable or ndarray, default: `.window_hanning` -// -// A function or a vector of length *NFFT*. To create window vectors see -// `.window_hanning`, `.window_none`, `numpy.blackman`, `numpy.hamming`, -// `numpy.bartlett`, `scipy.signal`, `scipy.signal.get_window`, etc. If a -// function is passed as the argument, it must take a data segment as an -// argument and return the windowed version of the segment. -// -// sides : {'default', 'onesided', 'twosided'}, optional -// -// Which sides of the spectrum to return. 'default' is one-sided for real -// data and two-sided for complex data. 'onesided' forces the return of a -// one-sided spectrum, while 'twosided' forces two-sided. -// -// pad_to : int, optional -// -// The number of points to which the data segment is padded when performing -// the FFT. This can be different from *NFFT*, which specifies the number -// of data points used. While not increasing the actual resolution of the -// spectrum (the minimum distance between resolvable peaks), this can give -// more points in the plot, allowing for more detail. This corresponds to -// the *n* parameter in the call to `~numpy.fft.fft`. The default is None, -// which sets *pad_to* equal to *NFFT* -// -// NFFT : int, default: 256 -// -// The number of data points used in each block for the FFT. A power 2 is -// most efficient. This should *NOT* be used to get zero padding, or the -// scaling of the result will be incorrect; use *pad_to* for this instead. -// -// detrend : {'none', 'mean', 'linear'} or callable, default: 'none' -// -// The function applied to each segment before fft-ing, designed to remove -// the mean or linear trend. Unlike in MATLAB, where the *detrend* parameter -// is a vector, in Matplotlib it is a function. The :mod:`~matplotlib.mlab` -// module defines `.detrend_none`, `.detrend_mean`, and `.detrend_linear`, -// but you can use a custom function as well. You can also use a string to -// choose one of the functions: 'none' calls `.detrend_none`. 'mean' calls -// `.detrend_mean`. 'linear' calls `.detrend_linear`. -// -// scale_by_freq : bool, default: True -// -// Whether the resulting density values should be scaled by the scaling -// frequency, which gives density in units of 1/Hz. This allows for -// integration over the returned frequency values. The default is True for -// MATLAB compatibility. -// -// mode : {'default', 'psd', 'magnitude', 'angle', 'phase'} -// -// What sort of spectrum to use. Default is 'psd', which takes the -// power spectral density. 'magnitude' returns the magnitude -// spectrum. 'angle' returns the phase spectrum without unwrapping. -// 'phase' returns the phase spectrum with unwrapping. -// -// noverlap : int, default: 128 -// -// The number of points of overlap between blocks. -// -// scale : {'default', 'linear', 'dB'} -// -// The scaling of the values in the *spec*. 'linear' is no scaling. -// 'dB' returns the values in dB scale. When *mode* is 'psd', -// this is dB power (10 * log10). Otherwise, this is dB amplitude -// (20 * log10). 'default' is 'dB' if *mode* is 'psd' or -// 'magnitude' and 'linear' otherwise. This must be 'linear' -// if *mode* is 'angle' or 'phase'. -// -// Fc : int, default: 0 -// -// The center frequency of *x*, which offsets the x extents of the -// plot to reflect the frequency range used when a signal is acquired -// and then filtered and downsampled to baseband. -// -// cmap : `.Colormap`, default: :rc:`image.cmap` -// -// xextent : *None* or (xmin, xmax) -// -// The image extent along the x-axis. The default sets *xmin* to the -// left border of the first bin (*spectrum* column) and *xmax* to the -// right border of the last bin. Note that for *noverlap>0* the width -// of the bins is smaller than those of the segments. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x* -// -// **kwargs -// -// Additional keyword arguments are passed on to `~.axes.Axes.imshow` -// which makes the specgram image. The origin keyword argument -// is not supported. -// -// Returns -// ------- -// spectrum : 2D array -// -// Columns are the periodograms of successive segments. -// -// freqs : 1-D array -// -// The frequencies corresponding to the rows in *spectrum*. -// -// t : 1-D array -// -// The times corresponding to midpoints of segments (i.e., the columns -// in *spectrum*). -// -// im : `.AxesImage` -// -// The image created by imshow containing the spectrogram. -// -// See Also -// -------- -// psd -// -// Differs in the default overlap; in returning the mean of the -// segment periodograms; in not returning times; and in generating a -// line plot instead of colormap. -// -// magnitude_spectrum -// -// A single spectrum, similar to having a single segment when *mode* -// is 'magnitude'. Plots a line instead of a colormap. -// -// angle_spectrum -// -// A single spectrum, similar to having a single segment when *mode* -// is 'angle'. Plots a line instead of a colormap. -// -// phase_spectrum -// -// A single spectrum, similar to having a single segment when *mode* -// is 'phase'. Plots a line instead of a colormap. -// -// Notes -// ----- -// The parameters *detrend* and *scale_by_freq* do only apply when *mode* -// is set to 'psd'. -// -//go:linkname Specgram py.specgram -func Specgram(x *py.Object, NFFT *py.Object, Fs *py.Object, Fc *py.Object, detrend *py.Object, window *py.Object, noverlap *py.Object, cmap *py.Object, xextent *py.Object, padTo *py.Object, sides *py.Object, scaleByFreq *py.Object, mode *py.Object, scale *py.Object, vmin *py.Object, vmax *py.Object) *py.Object - -// Plot the sparsity pattern of a 2D array. -// -// This visualizes the non-zero values of the array. -// -// Two plotting styles are available: image and marker. Both -// are available for full arrays, but only the marker style -// works for `scipy.sparse.spmatrix` instances. -// -// **Image style** -// -// If *marker* and *markersize* are *None*, `~.Axes.imshow` is used. Any -// extra remaining keyword arguments are passed to this method. -// -// **Marker style** -// -// If *Z* is a `scipy.sparse.spmatrix` or *marker* or *markersize* are -// *None*, a `.Line2D` object will be returned with the value of marker -// determining the marker type, and any remaining keyword arguments -// passed to `~.Axes.plot`. -// -// Parameters -// ---------- -// Z : (M, N) array-like -// -// The array to be plotted. -// -// precision : float or 'present', default: 0 -// -// If *precision* is 0, any non-zero value will be plotted. Otherwise, -// values of :math:`|Z| > precision` will be plotted. -// -// For `scipy.sparse.spmatrix` instances, you can also -// pass 'present'. In this case any value present in the array -// will be plotted, even if it is identically zero. -// -// aspect : {'equal', 'auto', None} or float, default: 'equal' -// -// The aspect ratio of the Axes. This parameter is particularly -// relevant for images since it determines whether data pixels are -// square. -// -// This parameter is a shortcut for explicitly calling -// `.Axes.set_aspect`. See there for further details. -// -// - 'equal': Ensures an aspect ratio of 1. Pixels will be square. -// - 'auto': The Axes is kept fixed and the aspect is adjusted so -// that the data fit in the Axes. In general, this will result in -// non-square pixels. -// - *None*: Use :rc:`image.aspect`. -// -// origin : {'upper', 'lower'}, default: :rc:`image.origin` -// -// Place the [0, 0] index of the array in the upper left or lower left -// corner of the Axes. The convention 'upper' is typically used for -// matrices and images. -// -// Returns -// ------- -// `~matplotlib.image.AxesImage` or `.Line2D` -// -// The return type depends on the plotting style (see above). -// -// Other Parameters -// ---------------- -// **kwargs -// -// The supported additional parameters depend on the plotting style. -// -// For the image style, you can pass the following additional -// parameters of `~.Axes.imshow`: -// -// - *cmap* -// - *alpha* -// - *url* -// - any `.Artist` properties (passed on to the `.AxesImage`) -// -// For the marker style, you can pass any `.Line2D` property except -// for *linestyle*: -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased or aa: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// color or c: color -// dash_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// dash_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// dashes: sequence of floats (on/off ink in points) or (None, None) -// data: (2, N) array or two 1D arrays -// drawstyle or ds: {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default' -// figure: `~matplotlib.figure.Figure` -// fillstyle: {'full', 'left', 'right', 'bottom', 'top', 'none'} -// gapcolor: color or None -// gid: str -// in_layout: bool -// label: object -// linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} -// linewidth or lw: float -// marker: marker style string, `~.path.Path` or `~.markers.MarkerStyle` -// markeredgecolor or mec: color -// markeredgewidth or mew: float -// markerfacecolor or mfc: color -// markerfacecoloralt or mfcalt: color -// markersize or ms: float -// markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: float or callable[[Artist, Event], tuple[bool, dict]] -// pickradius: float -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// solid_capstyle: `.CapStyle` or {'butt', 'projecting', 'round'} -// solid_joinstyle: `.JoinStyle` or {'miter', 'round', 'bevel'} -// transform: unknown -// url: str -// visible: bool -// xdata: 1D array -// ydata: 1D array -// zorder: float -// -//go:linkname Spy py.spy -func Spy(Z *py.Object, precision *py.Object, marker *py.Object, markersize *py.Object, aspect *py.Object, origin *py.Object) *py.Object - -// Draw a stacked area plot. -// -// Parameters -// ---------- -// x : (N,) array-like -// -// y : (M, N) array-like -// -// The data is assumed to be unstacked. Each of the following -// calls is legal:: -// -// stackplot(x, y) # where y has shape (M, N) -// stackplot(x, y1, y2, y3) # where y1, y2, y3, y4 have length N -// -// baseline : {'zero', 'sym', 'wiggle', 'weighted_wiggle'} -// -// Method used to calculate the baseline: -// -// - ``'zero'``: Constant zero baseline, i.e. a simple stacked plot. -// - ``'sym'``: Symmetric around zero and is sometimes called -// 'ThemeRiver'. -// - ``'wiggle'``: Minimizes the sum of the squared slopes. -// - ``'weighted_wiggle'``: Does the same but weights to account for -// size of each layer. It is also called 'Streamgraph'-layout. More -// details can be found at http://leebyron.com/streamgraph/. -// -// labels : list of str, optional -// -// A sequence of labels to assign to each data series. If unspecified, -// then no labels will be applied to artists. -// -// colors : list of color, optional -// -// A sequence of colors to be cycled through and used to color the stacked -// areas. The sequence need not be exactly the same length as the number -// of provided *y*, in which case the colors will repeat from the -// beginning. -// -// If not specified, the colors from the Axes property cycle will be used. -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// **kwargs -// -// All other keyword arguments are passed to `.Axes.fill_between`. -// -// Returns -// ------- -// list of `.PolyCollection` -// -// A list of `.PolyCollection` instances, one for each element in the -// stacked area plot. -// -//go:linkname Stackplot py.stackplot -func Stackplot(x *py.Object, __llgo_va_list ...interface{}) *py.Object - -// Create a stem plot. -// -// A stem plot draws lines perpendicular to a baseline at each location -// *locs* from the baseline to *heads*, and places a marker there. For -// vertical stem plots (the default), the *locs* are *x* positions, and -// the *heads* are *y* values. For horizontal stem plots, the *locs* are -// *y* positions, and the *heads* are *x* values. -// -// Call signature:: -// -// stem([locs,] heads, linefmt=None, markerfmt=None, basefmt=None) -// -// The *locs*-positions are optional. *linefmt* may be provided as -// positional, but all other formats must be provided as keyword -// arguments. -// -// Parameters -// ---------- -// locs : array-like, default: (0, 1, ..., len(heads) - 1) -// -// For vertical stem plots, the x-positions of the stems. -// For horizontal stem plots, the y-positions of the stems. -// -// heads : array-like -// -// For vertical stem plots, the y-values of the stem heads. -// For horizontal stem plots, the x-values of the stem heads. -// -// linefmt : str, optional -// -// A string defining the color and/or linestyle of the vertical lines: -// -// ========= ============= -// Character Line Style -// ========= ============= -// ``'-'`` solid line -// ``'--'`` dashed line -// ``'-.'`` dash-dot line -// ``':'`` dotted line -// ========= ============= -// -// Default: 'C0-', i.e. solid line with the first color of the color -// cycle. -// -// Note: Markers specified through this parameter (e.g. 'x') will be -// silently ignored. Instead, markers should be specified using -// *markerfmt*. -// -// markerfmt : str, optional -// -// A string defining the color and/or shape of the markers at the stem -// heads. If the marker is not given, use the marker 'o', i.e. filled -// circles. If the color is not given, use the color from *linefmt*. -// -// basefmt : str, default: 'C3-' ('C2-' in classic mode) -// -// A format string defining the properties of the baseline. -// -// orientation : {'vertical', 'horizontal'}, default: 'vertical' -// -// If 'vertical', will produce a plot with stems oriented vertically, -// If 'horizontal', the stems will be oriented horizontally. -// -// bottom : float, default: 0 -// -// The y/x-position of the baseline (depending on orientation). -// -// label : str, default: None -// -// The label to use for the stems in legends. -// -// data : indexable object, optional -// -// If given, all parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception). -// -// Returns -// ------- -// `.StemContainer` -// -// The container may be treated like a tuple -// (*markerline*, *stemlines*, *baseline*) -// -// Notes -// ----- -// .. seealso:: -// -// The MATLAB function -// `stem `_ -// which inspired this method. -// -//go:linkname Stem py.stem -func Stem(__llgo_va_list ...interface{}) *py.Object - -// Make a step plot. -// -// Call signatures:: -// -// step(x, y, [fmt], *, data=None, where='pre', **kwargs) -// step(x, y, [fmt], x2, y2, [fmt2], ..., *, where='pre', **kwargs) -// -// This is just a thin wrapper around `.plot` which changes some -// formatting options. Most of the concepts and parameters of plot can be -// used here as well. -// -// .. note:: -// -// This method uses a standard plot with a step drawstyle: The *x* -// values are the reference positions and steps extend left/right/both -// directions depending on *where*. -// -// For the common case where you know the values and edges of the -// steps, use `~.Axes.stairs` instead. -// -// Parameters -// ---------- -// x : array-like -// -// 1D sequence of x positions. It is assumed, but not checked, that -// it is uniformly increasing. -// -// y : array-like -// -// 1D sequence of y levels. -// -// fmt : str, optional -// -// A format string, e.g. 'g' for a green line. See `.plot` for a more -// detailed description. -// -// Note: While full format strings are accepted, it is recommended to -// only specify the color. Line styles are currently ignored (use -// the keyword argument *linestyle* instead). Markers are accepted -// and plotted on the given positions, however, this is a rarely -// needed feature for step plots. -// -// where : {'pre', 'post', 'mid'}, default: 'pre' -// -// Define where the steps should be placed: -// -// - 'pre': The y value is continued constantly to the left from -// every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the -// value ``y[i]``. -// - 'post': The y value is continued constantly to the right from -// every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the -// value ``y[i]``. -// - 'mid': Steps occur half-way between the *x* positions. -// -// data : indexable object, optional -// -// An object with labelled data. If given, provide the label names to -// plot in *x* and *y*. -// -// **kwargs -// -// Additional parameters are the same as those for `.plot`. -// -// Returns -// ------- -// list of `.Line2D` -// -// Objects representing the plotted data. -// -//go:linkname Step py.step -func Step(x *py.Object, y *py.Object, __llgo_va_list ...interface{}) *py.Object - -// Draw streamlines of a vector flow. -// -// Parameters -// ---------- -// x, y : 1D/2D arrays -// -// Evenly spaced strictly increasing arrays to make a grid. If 2D, all -// rows of *x* must be equal and all columns of *y* must be equal; i.e., -// they must be as if generated by ``np.meshgrid(x_1d, y_1d)``. -// -// u, v : 2D arrays -// -// *x* and *y*-velocities. The number of rows and columns must match -// the length of *y* and *x*, respectively. -// -// density : float or (float, float) -// -// Controls the closeness of streamlines. When ``density = 1``, the domain -// is divided into a 30x30 grid. *density* linearly scales this grid. -// Each cell in the grid can have, at most, one traversing streamline. -// For different densities in each direction, use a tuple -// (density_x, density_y). -// -// linewidth : float or 2D array -// -// The width of the streamlines. With a 2D array the line width can be -// varied across the grid. The array must have the same shape as *u* -// and *v*. -// -// color : color or 2D array -// -// The streamline color. If given an array, its values are converted to -// colors using *cmap* and *norm*. The array must have the same shape -// as *u* and *v*. -// -// cmap, norm -// -// Data normalization and colormapping parameters for *color*; only used -// if *color* is an array of floats. See `~.Axes.imshow` for a detailed -// description. -// -// arrowsize : float -// -// Scaling factor for the arrow size. -// -// arrowstyle : str -// -// Arrow style specification. -// See `~matplotlib.patches.FancyArrowPatch`. -// -// minlength : float -// -// Minimum length of streamline in axes coordinates. -// -// start_points : (N, 2) array -// -// Coordinates of starting points for the streamlines in data coordinates -// (the same coordinates as the *x* and *y* arrays). -// -// zorder : float -// -// The zorder of the streamlines and arrows. -// Artists with lower zorder values are drawn first. -// -// maxlength : float -// -// Maximum length of streamline in axes coordinates. -// -// integration_direction : {'forward', 'backward', 'both'}, default: 'both' -// -// Integrate the streamline in forward, backward or both directions. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y*, *u*, *v*, *start_points* -// -// broken_streamlines : boolean, default: True -// -// If False, forces streamlines to continue until they -// leave the plot domain. If True, they may be terminated if they -// come too close to another streamline. -// -// Returns -// ------- -// StreamplotSet -// -// Container object with attributes -// -// - ``lines``: `.LineCollection` of streamlines -// -// - ``arrows``: `.PatchCollection` containing `.FancyArrowPatch` -// objects representing the arrows half-way along streamlines. -// -// This container will probably change in the future to allow changes -// to the colormap, alpha, etc. for both lines and arrows, but these -// changes should be backward compatible. -// -//go:linkname Streamplot py.streamplot -func Streamplot(x *py.Object, y *py.Object, u *py.Object, v *py.Object, density *py.Object, linewidth *py.Object, color *py.Object, cmap *py.Object, norm *py.Object, arrowsize *py.Object, arrowstyle *py.Object, minlength *py.Object, transform *py.Object, zorder *py.Object, startPoints *py.Object, maxlength *py.Object, integrationDirection *py.Object, brokenStreamlines *py.Object) *py.Object - -// Add a table to an `~.axes.Axes`. -// -// At least one of *cellText* or *cellColours* must be specified. These -// parameters must be 2D lists, in which the outer lists define the rows and -// the inner list define the column values per row. Each row must have the -// same number of elements. -// -// The table can optionally have row and column headers, which are configured -// using *rowLabels*, *rowColours*, *rowLoc* and *colLabels*, *colColours*, -// *colLoc* respectively. -// -// For finer grained control over tables, use the `.Table` class and add it to -// the axes with `.Axes.add_table`. -// -// Parameters -// ---------- -// cellText : 2D list of str, optional -// -// The texts to place into the table cells. -// -// *Note*: Line breaks in the strings are currently not accounted for and -// will result in the text exceeding the cell boundaries. -// -// cellColours : 2D list of colors, optional -// -// The background colors of the cells. -// -// cellLoc : {'left', 'center', 'right'}, default: 'right' -// -// The alignment of the text within the cells. -// -// colWidths : list of float, optional -// -// The column widths in units of the axes. If not given, all columns will -// have a width of *1 / ncols*. -// -// rowLabels : list of str, optional -// -// The text of the row header cells. -// -// rowColours : list of colors, optional -// -// The colors of the row header cells. -// -// rowLoc : {'left', 'center', 'right'}, default: 'left' -// -// The text alignment of the row header cells. -// -// colLabels : list of str, optional -// -// The text of the column header cells. -// -// colColours : list of colors, optional -// -// The colors of the column header cells. -// -// colLoc : {'left', 'center', 'right'}, default: 'left' -// -// The text alignment of the column header cells. -// -// loc : str, optional -// -// The position of the cell with respect to *ax*. This must be one of -// the `~.Table.codes`. -// -// bbox : `.Bbox` or [xmin, ymin, width, height], optional -// -// A bounding box to draw the table into. If this is not *None*, this -// overrides *loc*. -// -// edges : substring of 'BRTL' or {'open', 'closed', 'horizontal', 'vertical'} -// -// The cell edges to be drawn with a line. See also -// `~.Cell.visible_edges`. -// -// Returns -// ------- -// `~matplotlib.table.Table` -// -// The created table. -// -// Other Parameters -// ---------------- -// **kwargs -// -// `.Table` properties. -// -// Properties: -// -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// clip_box: `~matplotlib.transforms.BboxBase` or None -// clip_on: bool -// clip_path: Patch or (Path, Transform) or None -// figure: `~matplotlib.figure.Figure` -// fontsize: float -// gid: str -// in_layout: bool -// label: object -// mouseover: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// rasterized: bool -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// transform: `~matplotlib.transforms.Transform` -// url: str -// visible: bool -// zorder: float -// -//go:linkname Table py.table -func Table(cellText *py.Object, cellColours *py.Object, cellLoc *py.Object, colWidths *py.Object, rowLabels *py.Object, rowColours *py.Object, rowLoc *py.Object, colLabels *py.Object, colColours *py.Object, colLoc *py.Object, loc *py.Object, bbox *py.Object, edges *py.Object) *py.Object - -// Add text to the Axes. -// -// Add the text *s* to the Axes at location *x*, *y* in data coordinates, -// with a default “horizontalalignment“ on the “left“ and -// “verticalalignment“ at the “baseline“. See -// :doc:`/gallery/text_labels_and_annotations/text_alignment`. -// -// Parameters -// ---------- -// x, y : float -// -// The position to place the text. By default, this is in data -// coordinates. The coordinate system can be changed using the -// *transform* parameter. -// -// s : str -// -// The text. -// -// fontdict : dict, default: None -// -// .. admonition:: Discouraged -// -// The use of *fontdict* is discouraged. Parameters should be passed as -// individual keyword arguments or using dictionary-unpacking -// ``text(..., **fontdict)``. -// -// A dictionary to override the default text properties. If fontdict -// is None, the defaults are determined by `.rcParams`. -// -// Returns -// ------- -// `.Text` -// -// The created `.Text` instance. -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.text.Text` properties. -// -// Other miscellaneous text parameters. -// -// Properties: -// agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image -// alpha: scalar or None -// animated: bool -// antialiased: bool -// backgroundcolor: color -// bbox: dict with properties for `.patches.FancyBboxPatch` -// clip_box: unknown -// clip_on: unknown -// clip_path: unknown -// color or c: color -// figure: `~matplotlib.figure.Figure` -// fontfamily or family or fontname: {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'} -// fontproperties or font or font_properties: `.font_manager.FontProperties` or `str` or `pathlib.Path` -// fontsize or size: float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'} -// fontstretch or stretch: {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'} -// fontstyle or style: {'normal', 'italic', 'oblique'} -// fontvariant or variant: {'normal', 'small-caps'} -// fontweight or weight: {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'} -// gid: str -// horizontalalignment or ha: {'left', 'center', 'right'} -// in_layout: bool -// label: object -// linespacing: float (multiple of font size) -// math_fontfamily: str -// mouseover: bool -// multialignment or ma: {'left', 'right', 'center'} -// parse_math: bool -// path_effects: list of `.AbstractPathEffect` -// picker: None or bool or float or callable -// position: (float, float) -// rasterized: bool -// rotation: float or {'vertical', 'horizontal'} -// rotation_mode: {None, 'default', 'anchor'} -// sketch_params: (scale: float, length: float, randomness: float) -// snap: bool or None -// text: object -// transform: `~matplotlib.transforms.Transform` -// transform_rotates_text: bool -// url: str -// usetex: bool or None -// verticalalignment or va: {'baseline', 'bottom', 'center', 'center_baseline', 'top'} -// visible: bool -// wrap: bool -// x: float -// y: float -// zorder: float -// -// Examples -// -------- -// Individual keyword arguments can be used to override any given -// parameter:: -// -// >>> text(x, y, s, fontsize=12) -// -// The default transform specifies that text is in data coords, -// alternatively, you can specify text in axis coords ((0, 0) is -// lower-left and (1, 1) is upper-right). The example below places -// text in the center of the Axes:: -// -// >>> text(0.5, 0.5, 'matplotlib', horizontalalignment='center', -// ... verticalalignment='center', transform=ax.transAxes) -// -// You can put a rectangular box around the text instance (e.g., to -// set a background color) by using the keyword *bbox*. *bbox* is -// a dictionary of `~matplotlib.patches.Rectangle` -// properties. For example:: -// -// >>> text(x, y, s, bbox=dict(facecolor='red', alpha=0.5)) -// -//go:linkname Text py.text -func Text(x *py.Object, y *py.Object, s *py.Object, fontdict *py.Object) *py.Object - -// Change the appearance of ticks, tick labels, and gridlines. -// -// Tick properties that are not explicitly set using the keyword -// arguments remain unchanged unless *reset* is True. For the current -// style settings, see `.Axis.get_tick_params`. -// -// Parameters -// ---------- -// axis : {'x', 'y', 'both'}, default: 'both' -// -// The axis to which the parameters are applied. -// -// which : {'major', 'minor', 'both'}, default: 'major' -// -// The group of ticks to which the parameters are applied. -// -// reset : bool, default: False -// -// Whether to reset the ticks to defaults before updating them. -// -// Other Parameters -// ---------------- -// direction : {'in', 'out', 'inout'} -// -// Puts ticks inside the Axes, outside the Axes, or both. -// -// length : float -// -// Tick length in points. -// -// width : float -// -// Tick width in points. -// -// color : color -// -// Tick color. -// -// pad : float -// -// Distance in points between tick and label. -// -// labelsize : float or str -// -// Tick label font size in points or as a string (e.g., 'large'). -// -// labelcolor : color -// -// Tick label color. -// -// labelfontfamily : str -// -// Tick label font. -// -// colors : color -// -// Tick color and label color. -// -// zorder : float -// -// Tick and label zorder. -// -// bottom, top, left, right : bool -// -// Whether to draw the respective ticks. -// -// labelbottom, labeltop, labelleft, labelright : bool -// -// Whether to draw the respective tick labels. -// -// labelrotation : float -// -// Tick label rotation -// -// grid_color : color -// -// Gridline color. -// -// grid_alpha : float -// -// Transparency of gridlines: 0 (transparent) to 1 (opaque). -// -// grid_linewidth : float -// -// Width of gridlines in points. -// -// grid_linestyle : str -// -// Any valid `.Line2D` line style spec. -// -// Examples -// -------- -// :: -// -// ax.tick_params(direction='out', length=6, width=2, colors='r', -// grid_color='r', grid_alpha=0.5) -// -// This will make all major ticks be red, pointing out of the box, -// and with dimensions 6 points by 2 points. Tick labels will -// also be red. Gridlines will be red and translucent. -// -//go:linkname TickParams py.tick_params -func TickParams(axis *py.Object) *py.Object - -// Configure the `.ScalarFormatter` used by default for linear Axes. -// -// If a parameter is not set, the corresponding property of the formatter -// is left unchanged. -// -// Parameters -// ---------- -// axis : {'x', 'y', 'both'}, default: 'both' -// -// The axis to configure. Only major ticks are affected. -// -// style : {'sci', 'scientific', 'plain'} -// -// Whether to use scientific notation. -// The formatter default is to use scientific notation. -// -// scilimits : pair of ints (m, n) -// -// Scientific notation is used only for numbers outside the range -// 10\ :sup:`m` to 10\ :sup:`n` (and only if the formatter is -// configured to use scientific notation at all). Use (0, 0) to -// include all numbers. Use (m, m) where m != 0 to fix the order of -// magnitude to 10\ :sup:`m`. -// The formatter default is :rc:`axes.formatter.limits`. -// -// useOffset : bool or float -// -// If True, the offset is calculated as needed. -// If False, no offset is used. -// If a numeric value, it sets the offset. -// The formatter default is :rc:`axes.formatter.useoffset`. -// -// useLocale : bool -// -// Whether to format the number using the current locale or using the -// C (English) locale. This affects e.g. the decimal separator. The -// formatter default is :rc:`axes.formatter.use_locale`. -// -// useMathText : bool -// -// Render the offset and scientific notation in mathtext. -// The formatter default is :rc:`axes.formatter.use_mathtext`. -// -// Raises -// ------ -// AttributeError -// -// If the current formatter is not a `.ScalarFormatter`. -// -//go:linkname TicklabelFormat py.ticklabel_format -func TicklabelFormat() *py.Object - -// Draw contour lines on an unstructured triangular grid. -// -// Call signatures:: -// -// tricontour(triangulation, z, [levels], ...) -// tricontour(x, y, z, [levels], *, [triangles=triangles], [mask=mask], ...) -// -// The triangular grid can be specified either by passing a `.Triangulation` -// object as the first parameter, or by passing the points *x*, *y* and -// optionally the *triangles* and a *mask*. See `.Triangulation` for an -// explanation of these parameters. If neither of *triangulation* or -// *triangles* are given, the triangulation is calculated on the fly. -// -// It is possible to pass *triangles* positionally, i.e. -// “tricontour(x, y, triangles, z, ...)“. However, this is discouraged. For more -// clarity, pass *triangles* via keyword argument. -// -// Parameters -// ---------- -// triangulation : `.Triangulation`, optional -// -// An already created triangular grid. -// -// x, y, triangles, mask -// -// Parameters defining the triangular grid. See `.Triangulation`. -// This is mutually exclusive with specifying *triangulation*. -// -// z : array-like -// -// The height values over which the contour is drawn. Color-mapping is -// controlled by *cmap*, *norm*, *vmin*, and *vmax*. -// -// .. note:: -// All values in *z* must be finite. Hence, nan and inf values must -// either be removed or `~.Triangulation.set_mask` be used. -// -// levels : int or array-like, optional -// -// Determines the number and positions of the contour lines / regions. -// -// If an int *n*, use `~matplotlib.ticker.MaxNLocator`, which tries to -// automatically choose no more than *n+1* "nice" contour levels between -// between minimum and maximum numeric values of *Z*. -// -// If array-like, draw contour lines at the specified levels. The values must -// be in increasing order. -// -// Returns -// ------- -// `~matplotlib.tri.TriContourSet` -// -// Other Parameters -// ---------------- -// colors : color string or sequence of colors, optional -// -// The colors of the levels, i.e., the contour lines. -// -// The sequence is cycled for the levels in ascending order. If the sequence -// is shorter than the number of levels, it is repeated. -// -// As a shortcut, single color strings may be used in place of one-element -// lists, i.e. ``'red'`` instead of ``['red']`` to color all levels with the -// same color. This shortcut does only work for color strings, not for other -// ways of specifying colors. -// -// By default (value *None*), the colormap specified by *cmap* will be used. -// -// alpha : float, default: 1 -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *colors* is set. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *colors* is set. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// If *vmin* or *vmax* are not given, the default color scaling is based on -// *levels*. -// -// This parameter is ignored if *colors* is set. -// -// origin : {*None*, 'upper', 'lower', 'image'}, default: None -// -// Determines the orientation and exact position of *z* by specifying the -// position of ``z[0, 0]``. This is only relevant, if *X*, *Y* are not given. -// -// - *None*: ``z[0, 0]`` is at X=0, Y=0 in the lower left corner. -// - 'lower': ``z[0, 0]`` is at X=0.5, Y=0.5 in the lower left corner. -// - 'upper': ``z[0, 0]`` is at X=N+0.5, Y=0.5 in the upper left corner. -// - 'image': Use the value from :rc:`image.origin`. -// -// extent : (x0, x1, y0, y1), optional -// -// If *origin* is not *None*, then *extent* is interpreted as in `.imshow`: it -// gives the outer pixel boundaries. In this case, the position of z[0, 0] is -// the center of the pixel, not a corner. If *origin* is *None*, then -// (*x0*, *y0*) is the position of z[0, 0], and (*x1*, *y1*) is the position -// of z[-1, -1]. -// -// This argument is ignored if *X* and *Y* are specified in the call to -// contour. -// -// locator : ticker.Locator subclass, optional -// -// The locator is used to determine the contour levels if they are not given -// explicitly via *levels*. -// Defaults to `~.ticker.MaxNLocator`. -// -// extend : {'neither', 'both', 'min', 'max'}, default: 'neither' -// -// Determines the ``tricontour``-coloring of values that are outside the -// *levels* range. -// -// If 'neither', values outside the *levels* range are not colored. If 'min', -// 'max' or 'both', color the values below, above or below and above the -// *levels* range. -// -// Values below ``min(levels)`` and above ``max(levels)`` are mapped to the -// under/over values of the `.Colormap`. Note that most colormaps do not have -// dedicated colors for these by default, so that the over and under values -// are the edge values of the colormap. You may want to set these values -// explicitly using `.Colormap.set_under` and `.Colormap.set_over`. -// -// .. note:: -// -// An existing `.TriContourSet` does not get notified if properties of its -// colormap are changed. Therefore, an explicit call to -// `.ContourSet.changed()` is needed after modifying the colormap. The -// explicit call can be left out, if a colorbar is assigned to the -// `.TriContourSet` because it internally calls `.ContourSet.changed()`. -// -// xunits, yunits : registered units, optional -// -// Override axis units by specifying an instance of a -// :class:`matplotlib.units.ConversionInterface`. -// -// antialiased : bool, optional -// -// Enable antialiasing, overriding the defaults. For -// filled contours, the default is *True*. For line contours, -// it is taken from :rc:`lines.antialiased`. -// -// linewidths : float or array-like, default: :rc:`contour.linewidth` -// -// The line width of the contour lines. -// -// If a number, all levels will be plotted with this linewidth. -// -// If a sequence, the levels in ascending order will be plotted with -// the linewidths in the order specified. -// -// If None, this falls back to :rc:`lines.linewidth`. -// -// linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional -// -// If *linestyles* is *None*, the default is 'solid' unless the lines are -// monochrome. In that case, negative contours will take their linestyle -// from :rc:`contour.negative_linestyle` setting. -// -// *linestyles* can also be an iterable of the above strings specifying a -// set of linestyles to be used. If this iterable is shorter than the -// number of contour levels it will be repeated as necessary. -// -//go:linkname Tricontour py.tricontour -func Tricontour(__llgo_va_list ...interface{}) *py.Object - -// Draw contour regions on an unstructured triangular grid. -// -// Call signatures:: -// -// tricontourf(triangulation, z, [levels], ...) -// tricontourf(x, y, z, [levels], *, [triangles=triangles], [mask=mask], ...) -// -// The triangular grid can be specified either by passing a `.Triangulation` -// object as the first parameter, or by passing the points *x*, *y* and -// optionally the *triangles* and a *mask*. See `.Triangulation` for an -// explanation of these parameters. If neither of *triangulation* or -// *triangles* are given, the triangulation is calculated on the fly. -// -// It is possible to pass *triangles* positionally, i.e. -// “tricontourf(x, y, triangles, z, ...)“. However, this is discouraged. For more -// clarity, pass *triangles* via keyword argument. -// -// Parameters -// ---------- -// triangulation : `.Triangulation`, optional -// -// An already created triangular grid. -// -// x, y, triangles, mask -// -// Parameters defining the triangular grid. See `.Triangulation`. -// This is mutually exclusive with specifying *triangulation*. -// -// z : array-like -// -// The height values over which the contour is drawn. Color-mapping is -// controlled by *cmap*, *norm*, *vmin*, and *vmax*. -// -// .. note:: -// All values in *z* must be finite. Hence, nan and inf values must -// either be removed or `~.Triangulation.set_mask` be used. -// -// levels : int or array-like, optional -// -// Determines the number and positions of the contour lines / regions. -// -// If an int *n*, use `~matplotlib.ticker.MaxNLocator`, which tries to -// automatically choose no more than *n+1* "nice" contour levels between -// between minimum and maximum numeric values of *Z*. -// -// If array-like, draw contour lines at the specified levels. The values must -// be in increasing order. -// -// Returns -// ------- -// `~matplotlib.tri.TriContourSet` -// -// Other Parameters -// ---------------- -// colors : color string or sequence of colors, optional -// -// The colors of the levels, i.e., the contour regions. -// -// The sequence is cycled for the levels in ascending order. If the sequence -// is shorter than the number of levels, it is repeated. -// -// As a shortcut, single color strings may be used in place of one-element -// lists, i.e. ``'red'`` instead of ``['red']`` to color all levels with the -// same color. This shortcut does only work for color strings, not for other -// ways of specifying colors. -// -// By default (value *None*), the colormap specified by *cmap* will be used. -// -// alpha : float, default: 1 -// -// The alpha blending value, between 0 (transparent) and 1 (opaque). -// -// cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap` -// -// The Colormap instance or registered colormap name used to map scalar data -// to colors. -// -// This parameter is ignored if *colors* is set. -// -// norm : str or `~matplotlib.colors.Normalize`, optional -// -// The normalization method used to scale scalar data to the [0, 1] range -// before mapping to colors using *cmap*. By default, a linear scaling is -// used, mapping the lowest value to 0 and the highest to 1. -// -// If given, this can be one of the following: -// -// - An instance of `.Normalize` or one of its subclasses -// (see :ref:`colormapnorms`). -// - A scale name, i.e. one of "linear", "log", "symlog", "logit", etc. For a -// list of available scales, call `matplotlib.scale.get_scale_names()`. -// In that case, a suitable `.Normalize` subclass is dynamically generated -// and instantiated. -// -// This parameter is ignored if *colors* is set. -// -// vmin, vmax : float, optional -// -// When using scalar data and no explicit *norm*, *vmin* and *vmax* define -// the data range that the colormap covers. By default, the colormap covers -// the complete value range of the supplied data. It is an error to use -// *vmin*/*vmax* when a *norm* instance is given (but using a `str` *norm* -// name together with *vmin*/*vmax* is acceptable). -// -// If *vmin* or *vmax* are not given, the default color scaling is based on -// *levels*. -// -// This parameter is ignored if *colors* is set. -// -// origin : {*None*, 'upper', 'lower', 'image'}, default: None -// -// Determines the orientation and exact position of *z* by specifying the -// position of ``z[0, 0]``. This is only relevant, if *X*, *Y* are not given. -// -// - *None*: ``z[0, 0]`` is at X=0, Y=0 in the lower left corner. -// - 'lower': ``z[0, 0]`` is at X=0.5, Y=0.5 in the lower left corner. -// - 'upper': ``z[0, 0]`` is at X=N+0.5, Y=0.5 in the upper left corner. -// - 'image': Use the value from :rc:`image.origin`. -// -// extent : (x0, x1, y0, y1), optional -// -// If *origin* is not *None*, then *extent* is interpreted as in `.imshow`: it -// gives the outer pixel boundaries. In this case, the position of z[0, 0] is -// the center of the pixel, not a corner. If *origin* is *None*, then -// (*x0*, *y0*) is the position of z[0, 0], and (*x1*, *y1*) is the position -// of z[-1, -1]. -// -// This argument is ignored if *X* and *Y* are specified in the call to -// contour. -// -// locator : ticker.Locator subclass, optional -// -// The locator is used to determine the contour levels if they are not given -// explicitly via *levels*. -// Defaults to `~.ticker.MaxNLocator`. -// -// extend : {'neither', 'both', 'min', 'max'}, default: 'neither' -// -// Determines the ``tricontourf``-coloring of values that are outside the -// *levels* range. -// -// If 'neither', values outside the *levels* range are not colored. If 'min', -// 'max' or 'both', color the values below, above or below and above the -// *levels* range. -// -// Values below ``min(levels)`` and above ``max(levels)`` are mapped to the -// under/over values of the `.Colormap`. Note that most colormaps do not have -// dedicated colors for these by default, so that the over and under values -// are the edge values of the colormap. You may want to set these values -// explicitly using `.Colormap.set_under` and `.Colormap.set_over`. -// -// .. note:: -// -// An existing `.TriContourSet` does not get notified if properties of its -// colormap are changed. Therefore, an explicit call to -// `.ContourSet.changed()` is needed after modifying the colormap. The -// explicit call can be left out, if a colorbar is assigned to the -// `.TriContourSet` because it internally calls `.ContourSet.changed()`. -// -// xunits, yunits : registered units, optional -// -// Override axis units by specifying an instance of a -// :class:`matplotlib.units.ConversionInterface`. -// -// antialiased : bool, optional -// -// Enable antialiasing, overriding the defaults. For -// filled contours, the default is *True*. For line contours, -// it is taken from :rc:`lines.antialiased`. -// -// hatches : list[str], optional -// -// A list of crosshatch patterns to use on the filled areas. -// If None, no hatching will be added to the contour. -// Hatching is supported in the PostScript, PDF, SVG and Agg -// backends only. -// -// Notes -// ----- -// `.tricontourf` fills intervals that are closed at the top; that is, for -// boundaries *z1* and *z2*, the filled region is:: -// -// z1 < Z <= z2 -// -// except for the lowest interval, which is closed on both sides (i.e. it -// includes the lowest value). -// -//go:linkname Tricontourf py.tricontourf -func Tricontourf(__llgo_va_list ...interface{}) *py.Object - -// Create a pseudocolor plot of an unstructured triangular grid. -// -// Call signatures:: -// -// tripcolor(triangulation, c, *, ...) -// tripcolor(x, y, c, *, [triangles=triangles], [mask=mask], ...) -// -// The triangular grid can be specified either by passing a `.Triangulation` -// object as the first parameter, or by passing the points *x*, *y* and -// optionally the *triangles* and a *mask*. See `.Triangulation` for an -// explanation of these parameters. -// -// It is possible to pass the triangles positionally, i.e. -// “tripcolor(x, y, triangles, c, ...)“. However, this is discouraged. -// For more clarity, pass *triangles* via keyword argument. -// -// If neither of *triangulation* or *triangles* are given, the triangulation -// is calculated on the fly. In this case, it does not make sense to provide -// colors at the triangle faces via *c* or *facecolors* because there are -// multiple possible triangulations for a group of points and you don't know -// which triangles will be constructed. -// -// Parameters -// ---------- -// triangulation : `.Triangulation` -// -// An already created triangular grid. -// -// x, y, triangles, mask -// -// Parameters defining the triangular grid. See `.Triangulation`. -// This is mutually exclusive with specifying *triangulation*. -// -// c : array-like -// -// The color values, either for the points or for the triangles. Which one -// is automatically inferred from the length of *c*, i.e. does it match -// the number of points or the number of triangles. If there are the same -// number of points and triangles in the triangulation it is assumed that -// color values are defined at points; to force the use of color values at -// triangles use the keyword argument ``facecolors=c`` instead of just -// ``c``. -// This parameter is position-only. -// -// facecolors : array-like, optional -// -// Can be used alternatively to *c* to specify colors at the triangle -// faces. This parameter takes precedence over *c*. -// -// shading : {'flat', 'gouraud'}, default: 'flat' -// -// If 'flat' and the color values *c* are defined at points, the color -// values used for each triangle are from the mean c of the triangle's -// three points. If *shading* is 'gouraud' then color values must be -// defined at points. -// -// other_parameters -// -// All other parameters are the same as for `~.Axes.pcolor`. -// -//go:linkname Tripcolor py.tripcolor -func Tripcolor(__llgo_va_list ...interface{}) *py.Object - -// Draw an unstructured triangular grid as lines and/or markers. -// -// Call signatures:: -// -// triplot(triangulation, ...) -// triplot(x, y, [triangles], *, [mask=mask], ...) -// -// The triangular grid can be specified either by passing a `.Triangulation` -// object as the first parameter, or by passing the points *x*, *y* and -// optionally the *triangles* and a *mask*. If neither of *triangulation* or -// *triangles* are given, the triangulation is calculated on the fly. -// -// Parameters -// ---------- -// triangulation : `.Triangulation` -// -// An already created triangular grid. -// -// x, y, triangles, mask -// -// Parameters defining the triangular grid. See `.Triangulation`. -// This is mutually exclusive with specifying *triangulation*. -// -// other_parameters -// -// All other args and kwargs are forwarded to `~.Axes.plot`. -// -// Returns -// ------- -// lines : `~matplotlib.lines.Line2D` -// -// The drawn triangles edges. -// -// markers : `~matplotlib.lines.Line2D` -// -// The drawn marker nodes. -// -//go:linkname Triplot py.triplot -func Triplot(__llgo_va_list ...interface{}) *py.Object - -// Make a violin plot. -// -// Make a violin plot for each column of *dataset* or each vector in -// sequence *dataset*. Each filled area extends to represent the -// entire data range, with optional lines at the mean, the median, -// the minimum, the maximum, and user-specified quantiles. -// -// Parameters -// ---------- -// dataset : Array or a sequence of vectors. -// -// The input data. -// -// positions : array-like, default: [1, 2, ..., n] -// -// The positions of the violins. The ticks and limits are -// automatically set to match the positions. -// -// vert : bool, default: True. -// -// If true, creates a vertical violin plot. -// Otherwise, creates a horizontal violin plot. -// -// widths : array-like, default: 0.5 -// -// Either a scalar or a vector that sets the maximal width of -// each violin. The default is 0.5, which uses about half of the -// available horizontal space. -// -// showmeans : bool, default: False -// -// If `True`, will toggle rendering of the means. -// -// showextrema : bool, default: True -// -// If `True`, will toggle rendering of the extrema. -// -// showmedians : bool, default: False -// -// If `True`, will toggle rendering of the medians. -// -// quantiles : array-like, default: None -// -// If not None, set a list of floats in interval [0, 1] for each violin, -// which stands for the quantiles that will be rendered for that -// violin. -// -// points : int, default: 100 -// -// Defines the number of points to evaluate each of the -// gaussian kernel density estimations at. -// -// bw_method : str, scalar or callable, optional -// -// The method used to calculate the estimator bandwidth. This can be -// 'scott', 'silverman', a scalar constant or a callable. If a -// scalar, this will be used directly as `kde.factor`. If a -// callable, it should take a `matplotlib.mlab.GaussianKDE` instance as -// its only parameter and return a scalar. If None (default), 'scott' -// is used. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *dataset* -// -// Returns -// ------- -// dict -// -// A dictionary mapping each component of the violinplot to a -// list of the corresponding collection instances created. The -// dictionary has the following keys: -// -// - ``bodies``: A list of the `~.collections.PolyCollection` -// instances containing the filled area of each violin. -// -// - ``cmeans``: A `~.collections.LineCollection` instance that marks -// the mean values of each of the violin's distribution. -// -// - ``cmins``: A `~.collections.LineCollection` instance that marks -// the bottom of each violin's distribution. -// -// - ``cmaxes``: A `~.collections.LineCollection` instance that marks -// the top of each violin's distribution. -// -// - ``cbars``: A `~.collections.LineCollection` instance that marks -// the centers of each violin's distribution. -// -// - ``cmedians``: A `~.collections.LineCollection` instance that -// marks the median values of each of the violin's distribution. -// -// - ``cquantiles``: A `~.collections.LineCollection` instance created -// to identify the quantile values of each of the violin's -// distribution. -// -//go:linkname Violinplot py.violinplot -func Violinplot(dataset *py.Object, positions *py.Object, vert *py.Object, widths *py.Object, showmeans *py.Object, showextrema *py.Object, showmedians *py.Object, quantiles *py.Object, points *py.Object, bwMethod *py.Object) *py.Object - -// Plot vertical lines at each *x* from *ymin* to *ymax*. -// -// Parameters -// ---------- -// x : float or array-like -// -// x-indexes where to plot the lines. -// -// ymin, ymax : float or array-like -// -// Respective beginning and end of each line. If scalars are -// provided, all lines will have the same length. -// -// colors : color or list of colors, default: :rc:`lines.color` -// -// linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid' -// -// label : str, default: ” -// -// Returns -// ------- -// `~matplotlib.collections.LineCollection` -// -// Other Parameters -// ---------------- -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *ymin*, *ymax*, *colors* -// -// **kwargs : `~matplotlib.collections.LineCollection` properties. -// -// See Also -// -------- -// hlines : horizontal lines -// axvline : vertical line across the Axes -// -//go:linkname Vlines py.vlines -func Vlines(x *py.Object, ymin *py.Object, ymax *py.Object, colors *py.Object, linestyles *py.Object, label *py.Object) *py.Object - -// Plot the cross correlation between *x* and *y*. -// -// The correlation with lag k is defined as -// :math:`\sum_n x[n+k] \cdot y^*[n]`, where :math:`y^*` is the complex -// conjugate of :math:`y`. -// -// Parameters -// ---------- -// x, y : array-like of length n -// -// detrend : callable, default: `.mlab.detrend_none` (no detrending) -// -// A detrending function applied to *x* and *y*. It must have the -// signature :: -// -// detrend(x: np.ndarray) -> np.ndarray -// -// normed : bool, default: True -// -// If ``True``, input vectors are normalised to unit length. -// -// usevlines : bool, default: True -// -// Determines the plot style. -// -// If ``True``, vertical lines are plotted from 0 to the xcorr value -// using `.Axes.vlines`. Additionally, a horizontal line is plotted -// at y=0 using `.Axes.axhline`. -// -// If ``False``, markers are plotted at the xcorr values using -// `.Axes.plot`. -// -// maxlags : int, default: 10 -// -// Number of lags to show. If None, will return all ``2 * len(x) - 1`` -// lags. -// -// Returns -// ------- -// lags : array (length “2*maxlags+1“) -// -// The lag vector. -// -// c : array (length “2*maxlags+1“) -// -// The auto correlation vector. -// -// line : `.LineCollection` or `.Line2D` -// -// `.Artist` added to the Axes of the correlation: -// -// - `.LineCollection` if *usevlines* is True. -// - `.Line2D` if *usevlines* is False. -// -// b : `~matplotlib.lines.Line2D` or None -// -// Horizontal line at 0 if *usevlines* is True -// None *usevlines* is False. -// -// Other Parameters -// ---------------- -// linestyle : `~matplotlib.lines.Line2D` property, optional -// -// The linestyle for plotting the data points. -// Only used if *usevlines* is ``False``. -// -// marker : str, default: 'o' -// -// The marker for plotting the data points. -// Only used if *usevlines* is ``False``. -// -// data : indexable object, optional -// -// If given, the following parameters also accept a string ``s``, which is -// interpreted as ``data[s]`` (unless this raises an exception): -// -// *x*, *y* -// -// **kwargs -// -// Additional parameters are passed to `.Axes.vlines` and -// `.Axes.axhline` if *usevlines* is ``True``; otherwise they are -// passed to `.Axes.plot`. -// -// Notes -// ----- -// The cross correlation is performed with `numpy.correlate` with -// “mode = "full"“. -// -//go:linkname Xcorr py.xcorr -func Xcorr(x *py.Object, y *py.Object, normed *py.Object, detrend *py.Object, usevlines *py.Object, maxlags *py.Object) *py.Object - -// Set the current image. -// -// This image will be the target of colormap functions like -// “pyplot.viridis“, and other functions such as `~.pyplot.clim`. The -// current image is an attribute of the current Axes. -// -//go:linkname Sci py.sci -func Sci(im *py.Object) *py.Object - -// Set a title for the Axes. -// -// Set one of the three available Axes titles. The available titles -// are positioned above the Axes in the center, flush with the left -// edge, and flush with the right edge. -// -// Parameters -// ---------- -// label : str -// -// Text to use for the title -// -// fontdict : dict -// -// .. admonition:: Discouraged -// -// The use of *fontdict* is discouraged. Parameters should be passed as -// individual keyword arguments or using dictionary-unpacking -// ``set_title(..., **fontdict)``. -// -// A dictionary controlling the appearance of the title text, -// the default *fontdict* is:: -// -// {'fontsize': rcParams['axes.titlesize'], -// 'fontweight': rcParams['axes.titleweight'], -// 'color': rcParams['axes.titlecolor'], -// 'verticalalignment': 'baseline', -// 'horizontalalignment': loc} -// -// loc : {'center', 'left', 'right'}, default: :rc:`axes.titlelocation` -// -// Which title to set. -// -// y : float, default: :rc:`axes.titley` -// -// Vertical Axes location for the title (1.0 is the top). If -// None (the default) and :rc:`axes.titley` is also None, y is -// determined automatically to avoid decorators on the Axes. -// -// pad : float, default: :rc:`axes.titlepad` -// -// The offset of the title from the top of the Axes, in points. -// -// Returns -// ------- -// `.Text` -// -// The matplotlib text instance representing the title -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.text.Text` properties -// -// Other keyword arguments are text properties, see `.Text` for a list -// of valid text properties. -// -//go:linkname Title py.title -func Title(label *py.Object, fontdict *py.Object, loc *py.Object, pad *py.Object) *py.Object - -// Set the label for the x-axis. -// -// Parameters -// ---------- -// xlabel : str -// -// The label text. -// -// labelpad : float, default: :rc:`axes.labelpad` -// -// Spacing in points from the Axes bounding box including ticks -// and tick labels. If None, the previous value is left as is. -// -// loc : {'left', 'center', 'right'}, default: :rc:`xaxis.labellocation` -// -// The label position. This is a high-level alternative for passing -// parameters *x* and *horizontalalignment*. -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.text.Text` properties -// -// `.Text` properties control the appearance of the label. -// -// See Also -// -------- -// text : Documents the properties supported by `.Text`. -// -//go:linkname Xlabel py.xlabel -func Xlabel(xlabel *py.Object, fontdict *py.Object, labelpad *py.Object) *py.Object - -// Set the label for the y-axis. -// -// Parameters -// ---------- -// ylabel : str -// -// The label text. -// -// labelpad : float, default: :rc:`axes.labelpad` -// -// Spacing in points from the Axes bounding box including ticks -// and tick labels. If None, the previous value is left as is. -// -// loc : {'bottom', 'center', 'top'}, default: :rc:`yaxis.labellocation` -// -// The label position. This is a high-level alternative for passing -// parameters *y* and *horizontalalignment*. -// -// Other Parameters -// ---------------- -// **kwargs : `~matplotlib.text.Text` properties -// -// `.Text` properties control the appearance of the label. -// -// See Also -// -------- -// text : Documents the properties supported by `.Text`. -// -//go:linkname Ylabel py.ylabel -func Ylabel(ylabel *py.Object, fontdict *py.Object, labelpad *py.Object) *py.Object - -// Set the xaxis' scale. -// -// Parameters -// ---------- -// value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase` -// -// The axis scale type to apply. -// -// **kwargs -// -// Different keyword arguments are accepted, depending on the scale. -// See the respective class keyword arguments: -// -// - `matplotlib.scale.LinearScale` -// - `matplotlib.scale.LogScale` -// - `matplotlib.scale.SymmetricalLogScale` -// - `matplotlib.scale.LogitScale` -// - `matplotlib.scale.FuncScale` -// -// Notes -// ----- -// By default, Matplotlib supports the above-mentioned scales. -// Additionally, custom scales may be registered using -// `matplotlib.scale.register_scale`. These scales can then also -// be used here. -// -//go:linkname Xscale py.xscale -func Xscale(value *py.Object) *py.Object - -// Set the yaxis' scale. -// -// Parameters -// ---------- -// value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase` -// -// The axis scale type to apply. -// -// **kwargs -// -// Different keyword arguments are accepted, depending on the scale. -// See the respective class keyword arguments: -// -// - `matplotlib.scale.LinearScale` -// - `matplotlib.scale.LogScale` -// - `matplotlib.scale.SymmetricalLogScale` -// - `matplotlib.scale.LogitScale` -// - `matplotlib.scale.FuncScale` -// -// Notes -// ----- -// By default, Matplotlib supports the above-mentioned scales. -// Additionally, custom scales may be registered using -// `matplotlib.scale.register_scale`. These scales can then also -// be used here. -// -//go:linkname Yscale py.yscale -func Yscale(value *py.Object) *py.Object - -// Set the colormap to 'autumn'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Autumn py.autumn -func Autumn() *py.Object - -// Set the colormap to 'bone'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Bone py.bone -func Bone() *py.Object - -// Set the colormap to 'cool'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Cool py.cool -func Cool() *py.Object - -// Set the colormap to 'copper'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Copper py.copper -func Copper() *py.Object - -// Set the colormap to 'flag'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Flag py.flag -func Flag() *py.Object - -// Set the colormap to 'gray'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Gray py.gray -func Gray() *py.Object - -// Set the colormap to 'hot'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Hot py.hot -func Hot() *py.Object - -// Set the colormap to 'hsv'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Hsv py.hsv -func Hsv() *py.Object - -// Set the colormap to 'jet'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Jet py.jet -func Jet() *py.Object - -// Set the colormap to 'pink'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Pink py.pink -func Pink() *py.Object - -// Set the colormap to 'prism'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Prism py.prism -func Prism() *py.Object - -// Set the colormap to 'spring'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Spring py.spring -func Spring() *py.Object - -// Set the colormap to 'summer'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Summer py.summer -func Summer() *py.Object - -// Set the colormap to 'winter'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Winter py.winter -func Winter() *py.Object - -// Set the colormap to 'magma'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Magma py.magma -func Magma() *py.Object - -// Set the colormap to 'inferno'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Inferno py.inferno -func Inferno() *py.Object - -// Set the colormap to 'plasma'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Plasma py.plasma -func Plasma() *py.Object - -// Set the colormap to 'viridis'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname Viridis py.viridis -func Viridis() *py.Object - -// Set the colormap to 'nipy_spectral'. -// -// This changes the default colormap as well as the colormap of the current -// image if there is one. See “help(colormaps)“ for more information. -// -//go:linkname NipySpectral py.nipy_spectral -func NipySpectral() *py.Object diff --git a/py/matplotlib/pyplot/pyplot.go b/py/matplotlib/pyplot/pyplot.go deleted file mode 100644 index cd3afeb2..00000000 --- a/py/matplotlib/pyplot/pyplot.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pyplot - -import "github.com/goplus/llgo/py" - -//llgo:linkname Style py.style -var Style *py.Object diff --git a/py/module.go b/py/module.go deleted file mode 100644 index 7166fd9d..00000000 --- a/py/module.go +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/import.html -// https://docs.python.org/3/c-api/module.html - -/* -// llgo:type C -type ModuleDefBase struct { - Unused [8]byte // TODO(xsw) -} - -// llgo:type C -type ModuleDef struct { - Base ModuleDefBase - // TODO(xsw) -} -*/ - -// Return the module object corresponding to a module name. The name argument -// may be of the form package.module. First check the modules dictionary if -// there’s one there, and if not, create a new one and insert it in the modules -// dictionary. Return nil with an exception set on failure. -// -//go:linkname AddModule C.PyImport_AddModule -func AddModule(name *c.Char) *Object - -// This is a wrapper around py.Import which takes a const char* as an argument -// instead of an Object. -// -//go:linkname ImportModule C.PyImport_ImportModule -func ImportModule(name *c.Char) *Object - -// This is a higher-level interface that calls the current “import hook function” (with -// an explicit level of 0, meaning absolute import). It invokes the __import__() function -// from the __builtins__ of the current globals. This means that the import is done using -// whatever import hooks are installed in the current environment. -// -// This function always uses absolute imports. -// -//go:linkname Import C.PyImport_Import -func Import(name *Object) *Object - -// Return the dictionary object that implements module’s namespace; this object is the same -// as the __dict__ attribute of the module object. If module is not a module object (or a -// subtype of a module object), SystemError is raised and nil is returned. -// -// It is recommended extensions use other Module and Object functions rather than directly -// manipulate a module’s __dict__. -// -// llgo:link (*Object).ModuleGetDict C.PyModule_GetDict -func (m *Object) ModuleGetDict() *Object { return nil } - -// llgo:link (*Object).ModuleLoadSyms C.llgoLoadPyModSyms -func (m *Object) ModuleLoadSyms(__llgo_va_list ...any) {} - -// ----------------------------------------------------------------------------- diff --git a/py/numpy/gen.go b/py/numpy/gen.go deleted file mode 100644 index d1e15f98..00000000 --- a/py/numpy/gen.go +++ /dev/null @@ -1,10993 +0,0 @@ -package numpy - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.numpy" - -// Show libraries and system information on which NumPy was built -// and is being used -// -// Parameters -// ---------- -// mode : {`'stdout'`, `'dicts'`}, optional. -// -// Indicates how to display the config information. -// `'stdout'` prints to console, `'dicts'` returns a dictionary -// of the configuration. -// -// Returns -// ------- -// out : {`dict`, `None`} -// -// If mode is `'dicts'`, a dict is returned, else None -// -// See Also -// -------- -// get_include : Returns the directory containing NumPy C -// -// header files. -// -// Notes -// ----- -// 1. The `'stdout'` mode will give more readable -// output if “pyyaml“ is installed -// -//go:linkname ShowConfig py.show_config -func ShowConfig(mode *py.Object) *py.Object - -// Check if the array is Fortran contiguous but *not* C contiguous. -// -// This function is obsolete and, because of changes due to relaxed stride -// checking, its return value for the same array may differ for versions -// of NumPy >= 1.10.0 and previous versions. If you only want to check if an -// array is Fortran contiguous use “a.flags.f_contiguous“ instead. -// -// Parameters -// ---------- -// a : ndarray -// -// Input array. -// -// Returns -// ------- -// isfortran : bool -// -// Returns True if the array is Fortran contiguous but *not* C contiguous. -// -// Examples -// -------- -// -// np.array allows to specify whether the array is written in C-contiguous -// order (last index varies the fastest), or FORTRAN-contiguous order in -// memory (first index varies the fastest). -// -// >>> a = np.array([[1, 2, 3], [4, 5, 6]], order='C') -// >>> a -// array([[1, 2, 3], -// -// [4, 5, 6]]) -// -// >>> np.isfortran(a) -// False -// -// >>> b = np.array([[1, 2, 3], [4, 5, 6]], order='F') -// >>> b -// array([[1, 2, 3], -// -// [4, 5, 6]]) -// -// >>> np.isfortran(b) -// True -// -// The transpose of a C-ordered array is a FORTRAN-ordered array. -// -// >>> a = np.array([[1, 2, 3], [4, 5, 6]], order='C') -// >>> a -// array([[1, 2, 3], -// -// [4, 5, 6]]) -// -// >>> np.isfortran(a) -// False -// >>> b = a.T -// >>> b -// array([[1, 4], -// -// [2, 5], -// [3, 6]]) -// -// >>> np.isfortran(b) -// True -// -// C-ordered arrays evaluate as False even if they are also FORTRAN-ordered. -// -// >>> np.isfortran(np.array([1, 2], order='F')) -// False -// -//go:linkname Isfortran py.isfortran -func Isfortran(a *py.Object) *py.Object - -// Return an array representing the indices of a grid. -// -// Compute an array where the subarrays contain index values 0, 1, ... -// varying only along the corresponding axis. -// -// Parameters -// ---------- -// dimensions : sequence of ints -// -// The shape of the grid. -// -// dtype : dtype, optional -// -// Data type of the result. -// -// sparse : boolean, optional -// -// Return a sparse representation of the grid instead of a dense -// representation. Default is False. -// -// .. versionadded:: 1.17 -// -// Returns -// ------- -// grid : one ndarray or tuple of ndarrays -// -// If sparse is False: -// Returns one array of grid indices, -// ``grid.shape = (len(dimensions),) + tuple(dimensions)``. -// If sparse is True: -// Returns a tuple of arrays, with -// ``grid[i].shape = (1, ..., 1, dimensions[i], 1, ..., 1)`` with -// dimensions[i] in the ith place -// -// See Also -// -------- -// mgrid, ogrid, meshgrid -// -// Notes -// ----- -// The output shape in the dense case is obtained by prepending the number -// of dimensions in front of the tuple of dimensions, i.e. if `dimensions` -// is a tuple “(r0, ..., rN-1)“ of length “N“, the output shape is -// “(N, r0, ..., rN-1)“. -// -// The subarrays “grid[k]“ contains the N-D array of indices along the -// “k-th“ axis. Explicitly:: -// -// grid[k, i0, i1, ..., iN-1] = ik -// -// Examples -// -------- -// >>> grid = np.indices((2, 3)) -// >>> grid.shape -// (2, 2, 3) -// >>> grid[0] # row indices -// array([[0, 0, 0], -// -// [1, 1, 1]]) -// -// >>> grid[1] # column indices -// array([[0, 1, 2], -// -// [0, 1, 2]]) -// -// The indices can be used as an index into an array. -// -// >>> x = np.arange(20).reshape(5, 4) -// >>> row, col = np.indices((2, 3)) -// >>> x[row, col] -// array([[0, 1, 2], -// -// [4, 5, 6]]) -// -// Note that it would be more straightforward in the above example to -// extract the required elements directly with “x[:2, :3]“. -// -// If sparse is set to true, the grid will be returned in a sparse -// representation. -// -// >>> i, j = np.indices((2, 3), sparse=True) -// >>> i.shape -// (2, 1) -// >>> j.shape -// (1, 3) -// >>> i # row indices -// array([[0], -// -// [1]]) -// -// >>> j # column indices -// array([[0, 1, 2]]) -// -//go:linkname Indices py.indices -func Indices(dimensions *py.Object, dtype *py.Object, sparse *py.Object) *py.Object - -// Construct an array by executing a function over each coordinate. -// -// The resulting array therefore has a value “fn(x, y, z)“ at -// coordinate “(x, y, z)“. -// -// Parameters -// ---------- -// function : callable -// -// The function is called with N parameters, where N is the rank of -// `shape`. Each parameter represents the coordinates of the array -// varying along a specific axis. For example, if `shape` -// were ``(2, 2)``, then the parameters would be -// ``array([[0, 0], [1, 1]])`` and ``array([[0, 1], [0, 1]])`` -// -// shape : (N,) tuple of ints -// -// Shape of the output array, which also determines the shape of -// the coordinate arrays passed to `function`. -// -// dtype : data-type, optional -// -// Data-type of the coordinate arrays passed to `function`. -// By default, `dtype` is float. -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// fromfunction : any -// -// The result of the call to `function` is passed back directly. -// Therefore the shape of `fromfunction` is completely determined by -// `function`. If `function` returns a scalar value, the shape of -// `fromfunction` would not match the `shape` parameter. -// -// See Also -// -------- -// indices, meshgrid -// -// Notes -// ----- -// Keywords other than `dtype` and `like` are passed to `function`. -// -// Examples -// -------- -// >>> np.fromfunction(lambda i, j: i, (2, 2), dtype=float) -// array([[0., 0.], -// -// [1., 1.]]) -// -// >>> np.fromfunction(lambda i, j: j, (2, 2), dtype=float) -// array([[0., 1.], -// -// [0., 1.]]) -// -// >>> np.fromfunction(lambda i, j: i == j, (3, 3), dtype=int) -// array([[ True, False, False], -// -// [False, True, False], -// [False, False, True]]) -// -// >>> np.fromfunction(lambda i, j: i + j, (3, 3), dtype=int) -// array([[0, 1, 2], -// -// [1, 2, 3], -// [2, 3, 4]]) -// -//go:linkname Fromfunction py.fromfunction -func Fromfunction(function *py.Object, shape *py.Object) *py.Object - -// Returns True if the type of `element` is a scalar type. -// -// Parameters -// ---------- -// element : any -// -// Input argument, can be of any type and shape. -// -// Returns -// ------- -// val : bool -// -// True if `element` is a scalar type, False if it is not. -// -// See Also -// -------- -// ndim : Get the number of dimensions of an array -// -// Notes -// ----- -// If you need a stricter way to identify a *numerical* scalar, use -// “isinstance(x, numbers.Number)“, as that returns “False“ for most -// non-numerical elements such as strings. -// -// In most cases “np.ndim(x) == 0“ should be used instead of this function, -// as that will also return true for 0d arrays. This is how numpy overloads -// functions in the style of the “dx“ arguments to `gradient` and the “bins“ -// argument to `histogram`. Some key differences: -// -// +--------------------------------------+---------------+-------------------+ -// | x |“isscalar(x)“|“np.ndim(x) == 0“| -// +======================================+===============+===================+ -// | PEP 3141 numeric objects (including | “True“ | “True“ | -// | builtins) | | | -// +--------------------------------------+---------------+-------------------+ -// | builtin string and buffer objects | “True“ | “True“ | -// +--------------------------------------+---------------+-------------------+ -// | other builtin objects, like | “False“ | “True“ | -// | `pathlib.Path`, `Exception`, | | | -// | the result of `re.compile` | | | -// +--------------------------------------+---------------+-------------------+ -// | third-party objects like | “False“ | “True“ | -// | `matplotlib.figure.Figure` | | | -// +--------------------------------------+---------------+-------------------+ -// | zero-dimensional numpy arrays | “False“ | “True“ | -// +--------------------------------------+---------------+-------------------+ -// | other numpy arrays | “False“ | “False“ | -// +--------------------------------------+---------------+-------------------+ -// | `list`, `tuple`, and other sequence | “False“ | “False“ | -// | objects | | | -// +--------------------------------------+---------------+-------------------+ -// -// Examples -// -------- -// >>> np.isscalar(3.1) -// True -// >>> np.isscalar(np.array(3.1)) -// False -// >>> np.isscalar([3.1]) -// False -// >>> np.isscalar(False) -// True -// >>> np.isscalar('numpy') -// True -// -// NumPy supports PEP 3141 numbers: -// -// >>> from fractions import Fraction -// >>> np.isscalar(Fraction(5, 17)) -// True -// >>> from numbers import Number -// >>> np.isscalar(Number()) -// True -// -//go:linkname Isscalar py.isscalar -func Isscalar(element *py.Object) *py.Object - -// Return the binary representation of the input number as a string. -// -// For negative numbers, if width is not given, a minus sign is added to the -// front. If width is given, the two's complement of the number is -// returned, with respect to that width. -// -// In a two's-complement system negative numbers are represented by the two's -// complement of the absolute value. This is the most common method of -// representing signed integers on computers [1]_. A N-bit two's-complement -// system can represent every integer in the range -// :math:`-2^{N-1}` to :math:`+2^{N-1}-1`. -// -// Parameters -// ---------- -// num : int -// -// Only an integer decimal number can be used. -// -// width : int, optional -// -// The length of the returned string if `num` is positive, or the length -// of the two's complement if `num` is negative, provided that `width` is -// at least a sufficient number of bits for `num` to be represented in the -// designated form. -// -// If the `width` value is insufficient, it will be ignored, and `num` will -// be returned in binary (`num` > 0) or two's complement (`num` < 0) form -// with its width equal to the minimum number of bits needed to represent -// the number in the designated form. This behavior is deprecated and will -// later raise an error. -// -// .. deprecated:: 1.12.0 -// -// Returns -// ------- -// bin : str -// -// Binary representation of `num` or two's complement of `num`. -// -// See Also -// -------- -// base_repr: Return a string representation of a number in the given base -// -// system. -// -// bin: Python's built-in binary representation generator of an integer. -// -// Notes -// ----- -// `binary_repr` is equivalent to using `base_repr` with base 2, but about 25x -// faster. -// -// References -// ---------- -// .. [1] Wikipedia, "Two's complement", -// -// https://en.wikipedia.org/wiki/Two's_complement -// -// Examples -// -------- -// >>> np.binary_repr(3) -// '11' -// >>> np.binary_repr(-3) -// '-11' -// >>> np.binary_repr(3, width=4) -// '0011' -// -// The two's complement is returned when the input number is negative and -// width is specified: -// -// >>> np.binary_repr(-3, width=3) -// '101' -// >>> np.binary_repr(-3, width=5) -// '11101' -// -//go:linkname BinaryRepr py.binary_repr -func BinaryRepr(num *py.Object, width *py.Object) *py.Object - -// Return a string representation of a number in the given base system. -// -// Parameters -// ---------- -// number : int -// -// The value to convert. Positive and negative values are handled. -// -// base : int, optional -// -// Convert `number` to the `base` number system. The valid range is 2-36, -// the default value is 2. -// -// padding : int, optional -// -// Number of zeros padded on the left. Default is 0 (no padding). -// -// Returns -// ------- -// out : str -// -// String representation of `number` in `base` system. -// -// See Also -// -------- -// binary_repr : Faster version of `base_repr` for base 2. -// -// Examples -// -------- -// >>> np.base_repr(5) -// '101' -// >>> np.base_repr(6, 5) -// '11' -// >>> np.base_repr(7, base=5, padding=3) -// '00012' -// -// >>> np.base_repr(10, base=16) -// 'A' -// >>> np.base_repr(32, base=16) -// '20' -// -//go:linkname BaseRepr py.base_repr -func BaseRepr(number *py.Object, base *py.Object, padding *py.Object) *py.Object - -// Return a new array of given shape and type, filled with ones. -// -// Parameters -// ---------- -// shape : int or sequence of ints -// -// Shape of the new array, e.g., ``(2, 3)`` or ``2``. -// -// dtype : data-type, optional -// -// The desired data-type for the array, e.g., `numpy.int8`. Default is -// `numpy.float64`. -// -// order : {'C', 'F'}, optional, default: C -// -// Whether to store multi-dimensional data in row-major -// (C-style) or column-major (Fortran-style) order in -// memory. -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// out : ndarray -// -// Array of ones with the given shape, dtype, and order. -// -// See Also -// -------- -// ones_like : Return an array of ones with shape and type of input. -// empty : Return a new uninitialized array. -// zeros : Return a new array setting values to zero. -// full : Return a new array of given shape filled with value. -// -// Examples -// -------- -// >>> np.ones(5) -// array([1., 1., 1., 1., 1.]) -// -// >>> np.ones((5,), dtype=int) -// array([1, 1, 1, 1, 1]) -// -// >>> np.ones((2, 1)) -// array([[1.], -// -// [1.]]) -// -// >>> s = (2,2) -// >>> np.ones(s) -// array([[1., 1.], -// -// [1., 1.]]) -// -//go:linkname Ones py.ones -func Ones(shape *py.Object, dtype *py.Object, order *py.Object) *py.Object - -// Return the identity array. -// -// The identity array is a square array with ones on -// the main diagonal. -// -// Parameters -// ---------- -// n : int -// -// Number of rows (and columns) in `n` x `n` output. -// -// dtype : data-type, optional -// -// Data-type of the output. Defaults to ``float``. -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// out : ndarray -// -// `n` x `n` array with its main diagonal set to one, -// and all other elements 0. -// -// Examples -// -------- -// >>> np.identity(3) -// array([[1., 0., 0.], -// -// [0., 1., 0.], -// [0., 0., 1.]]) -// -//go:linkname Identity py.identity -func Identity(n *py.Object, dtype *py.Object) *py.Object - -// invert(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute bit-wise inversion, or bit-wise NOT, element-wise. -// -// Computes the bit-wise NOT of the underlying binary representation of -// the integers in the input arrays. This ufunc implements the C/Python -// operator “~“. -// -// For signed integer inputs, the two's complement is returned. In a -// two's-complement system negative numbers are represented by the two's -// complement of the absolute value. This is the most common method of -// representing signed integers on computers [1]_. A N-bit -// two's-complement system can represent every integer in the range -// :math:`-2^{N-1}` to :math:`+2^{N-1}-1`. -// -// Parameters -// ---------- -// x : array_like -// -// Only integer and boolean types are handled. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Result. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// bitwise_and, bitwise_or, bitwise_xor -// logical_not -// binary_repr : -// -// Return the binary representation of the input number as a string. -// -// Notes -// ----- -// `bitwise_not` is an alias for `invert`: -// -// >>> np.bitwise_not is np.invert -// True -// -// References -// ---------- -// .. [1] Wikipedia, "Two's complement", -// -// https://en.wikipedia.org/wiki/Two's_complement -// -// Examples -// -------- -// We've seen that 13 is represented by “00001101“. -// The invert or bit-wise NOT of 13 is then: -// -// >>> x = np.invert(np.array(13, dtype=np.uint8)) -// >>> x -// 242 -// >>> np.binary_repr(x, width=8) -// '11110010' -// -// The result depends on the bit-width: -// -// >>> x = np.invert(np.array(13, dtype=np.uint16)) -// >>> x -// 65522 -// >>> np.binary_repr(x, width=16) -// '1111111111110010' -// -// When using signed integer types the result is the two's complement of -// the result for the unsigned type: -// -// >>> np.invert(np.array([13], dtype=np.int8)) -// array([-14], dtype=int8) -// >>> np.binary_repr(-14, width=8) -// '11110010' -// -// Booleans are accepted as well: -// -// >>> np.invert(np.array([True, False])) -// array([False, True]) -// -// The “~“ operator can be used as a shorthand for “np.invert“ on -// ndarrays. -// -// >>> x1 = np.array([True, False]) -// >>> ~x1 -// array([False, True]) -// -//go:linkname BitwiseNot py.bitwise_not -func BitwiseNot(__llgo_va_list ...interface{}) *py.Object - -// Return a new array of given shape and type, filled with `fill_value`. -// -// Parameters -// ---------- -// shape : int or sequence of ints -// -// Shape of the new array, e.g., ``(2, 3)`` or ``2``. -// -// fill_value : scalar or array_like -// -// Fill value. -// -// dtype : data-type, optional -// -// The desired data-type for the array The default, None, means -// ``np.array(fill_value).dtype``. -// -// order : {'C', 'F'}, optional -// -// Whether to store multidimensional data in C- or Fortran-contiguous -// (row- or column-wise) order in memory. -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// out : ndarray -// -// Array of `fill_value` with the given shape, dtype, and order. -// -// See Also -// -------- -// full_like : Return a new array with shape of input filled with value. -// empty : Return a new uninitialized array. -// ones : Return a new array setting values to one. -// zeros : Return a new array setting values to zero. -// -// Examples -// -------- -// >>> np.full((2, 2), np.inf) -// array([[inf, inf], -// -// [inf, inf]]) -// -// >>> np.full((2, 2), 10) -// array([[10, 10], -// -// [10, 10]]) -// -// >>> np.full((2, 2), [1, 2]) -// array([[1, 2], -// -// [1, 2]]) -// -//go:linkname Full py.full -func Full(shape *py.Object, fillValue *py.Object, dtype *py.Object, order *py.Object) *py.Object - -// matmul(x1, x2, /, out=None, *, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj, axes, axis]) -// -// Matrix product of two arrays. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays, scalars not allowed. -// -// out : ndarray, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that matches the signature `(n,k),(k,m)->(n,m)`. If not -// provided or None, a freshly-allocated array is returned. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// .. versionadded:: 1.16 -// Now handles ufunc kwargs -// -// Returns -// ------- -// y : ndarray -// -// The matrix product of the inputs. -// This is a scalar only when both x1, x2 are 1-d vectors. -// -// Raises -// ------ -// ValueError -// -// If the last dimension of `x1` is not the same size as -// the second-to-last dimension of `x2`. -// -// If a scalar value is passed in. -// -// See Also -// -------- -// vdot : Complex-conjugating dot product. -// tensordot : Sum products over arbitrary axes. -// einsum : Einstein summation convention. -// dot : alternative matrix product with different broadcasting rules. -// -// Notes -// ----- -// -// The behavior depends on the arguments in the following way. -// -// - If both arguments are 2-D they are multiplied like conventional -// matrices. -// - If either argument is N-D, N > 2, it is treated as a stack of -// matrices residing in the last two indexes and broadcast accordingly. -// - If the first argument is 1-D, it is promoted to a matrix by -// prepending a 1 to its dimensions. After matrix multiplication -// the prepended 1 is removed. -// - If the second argument is 1-D, it is promoted to a matrix by -// appending a 1 to its dimensions. After matrix multiplication -// the appended 1 is removed. -// -// “matmul“ differs from “dot“ in two important ways: -// -// - Multiplication by scalars is not allowed, use “*“ instead. -// -// - Stacks of matrices are broadcast together as if the matrices -// were elements, respecting the signature “(n,k),(k,m)->(n,m)“: -// -// >>> a = np.ones([9, 5, 7, 4]) -// >>> c = np.ones([9, 5, 4, 3]) -// >>> np.dot(a, c).shape -// (9, 5, 7, 9, 5, 3) -// >>> np.matmul(a, c).shape -// (9, 5, 7, 3) -// >>> # n is 7, k is 4, m is 3 -// -// The matmul function implements the semantics of the “@“ operator -// introduced in Python 3.5 following :pep:`465`. -// -// It uses an optimized BLAS library when possible (see `numpy.linalg`). -// -// Examples -// -------- -// For 2-D arrays it is the matrix product: -// -// >>> a = np.array([[1, 0], -// ... [0, 1]]) -// >>> b = np.array([[4, 1], -// ... [2, 2]]) -// >>> np.matmul(a, b) -// array([[4, 1], -// -// [2, 2]]) -// -// For 2-D mixed with 1-D, the result is the usual. -// -// >>> a = np.array([[1, 0], -// ... [0, 1]]) -// >>> b = np.array([1, 2]) -// >>> np.matmul(a, b) -// array([1, 2]) -// >>> np.matmul(b, a) -// array([1, 2]) -// -// # Broadcasting is conventional for stacks of arrays -// -// >>> a = np.arange(2 * 2 * 4).reshape((2, 2, 4)) -// >>> b = np.arange(2 * 2 * 4).reshape((2, 4, 2)) -// >>> np.matmul(a,b).shape -// (2, 2, 2) -// >>> np.matmul(a, b)[0, 1, 1] -// 98 -// >>> sum(a[0, 1, :] * b[0 , :, 1]) -// 98 -// -// Vector, vector returns the scalar inner product, but neither argument -// is complex-conjugated: -// -// >>> np.matmul([2j, 3j], [2j, 3j]) -// (-13+0j) -// -// Scalar multiplication raises an error. -// -// >>> np.matmul([1,2], 3) -// Traceback (most recent call last): -// ... -// ValueError: matmul: Input operand 1 does not have enough dimensions ... -// -// The “@“ operator can be used as a shorthand for “np.matmul“ on -// ndarrays. -// -// >>> x1 = np.array([2j, 3j]) -// >>> x2 = np.array([2j, 3j]) -// >>> x1 @ x2 -// (-13+0j) -// -// .. versionadded:: 1.10.0 -// -//go:linkname Matmul py.matmul -func Matmul(__llgo_va_list ...interface{}) *py.Object - -// absolute(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Calculate the absolute value element-wise. -// -// “np.abs“ is a shorthand for this function. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// absolute : ndarray -// -// An ndarray containing the absolute value of -// each element in `x`. For complex input, ``a + ib``, the -// absolute value is :math:`\sqrt{ a^2 + b^2 }`. -// This is a scalar if `x` is a scalar. -// -// Examples -// -------- -// >>> x = np.array([-1.2, 1.2]) -// >>> np.absolute(x) -// array([ 1.2, 1.2]) -// >>> np.absolute(1.2 + 1j) -// 1.5620499351813308 -// -// Plot the function over “[-10, 10]“: -// -// >>> import matplotlib.pyplot as plt -// -// >>> x = np.linspace(start=-10, stop=10, num=101) -// >>> plt.plot(x, np.absolute(x)) -// >>> plt.show() -// -// Plot the function over the complex plane: -// -// >>> xx = x + 1j * x[:, np.newaxis] -// >>> plt.imshow(np.abs(xx), extent=[-10, 10, -10, 10], cmap='gray') -// >>> plt.show() -// -// The `abs` function can be used as a shorthand for “np.absolute“ on -// ndarrays. -// -// >>> x = np.array([-1.2, 1.2]) -// >>> abs(x) -// array([1.2, 1.2]) -// -//go:linkname Absolute py.absolute -func Absolute(__llgo_va_list ...interface{}) *py.Object - -// add(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Add arguments element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// The arrays to be added. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// add : ndarray or scalar -// -// The sum of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// Notes -// ----- -// Equivalent to `x1` + `x2` in terms of array broadcasting. -// -// Examples -// -------- -// >>> np.add(1.0, 4.0) -// 5.0 -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> np.add(x1, x2) -// array([[ 0., 2., 4.], -// -// [ 3., 5., 7.], -// [ 6., 8., 10.]]) -// -// The “+“ operator can be used as a shorthand for “np.add“ on ndarrays. -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> x1 + x2 -// array([[ 0., 2., 4.], -// -// [ 3., 5., 7.], -// [ 6., 8., 10.]]) -// -//go:linkname Add py.add -func Add(__llgo_va_list ...interface{}) *py.Object - -// arccos(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Trigonometric inverse cosine, element-wise. -// -// The inverse of `cos` so that, if “y = cos(x)“, then “x = arccos(y)“. -// -// Parameters -// ---------- -// x : array_like -// -// `x`-coordinate on the unit circle. -// For real arguments, the domain is [-1, 1]. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// angle : ndarray -// -// The angle of the ray intersecting the unit circle at the given -// `x`-coordinate in radians [0, pi]. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// cos, arctan, arcsin, emath.arccos -// -// Notes -// ----- -// `arccos` is a multivalued function: for each `x` there are infinitely -// many numbers `z` such that “cos(z) = x“. The convention is to return -// the angle `z` whose real part lies in `[0, pi]`. -// -// For real-valued input data types, `arccos` always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `arccos` is a complex analytic function that -// has branch cuts “[-inf, -1]“ and `[1, inf]` and is continuous from -// above on the former and from below on the latter. -// -// The inverse `cos` is also known as `acos` or cos^-1. -// -// References -// ---------- -// M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// 10th printing, 1964, pp. 79. -// https://personal.math.ubc.ca/~cbm/aands/page_79.htm -// -// Examples -// -------- -// We expect the arccos of 1 to be 0, and of -1 to be pi: -// -// >>> np.arccos([1, -1]) -// array([ 0. , 3.14159265]) -// -// Plot arccos: -// -// >>> import matplotlib.pyplot as plt -// >>> x = np.linspace(-1, 1, num=100) -// >>> plt.plot(x, np.arccos(x)) -// >>> plt.axis('tight') -// >>> plt.show() -// -//go:linkname Arccos py.arccos -func Arccos(__llgo_va_list ...interface{}) *py.Object - -// arccosh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Inverse hyperbolic cosine, element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// arccosh : ndarray -// -// Array of the same shape as `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// -// cosh, arcsinh, sinh, arctanh, tanh -// -// Notes -// ----- -// `arccosh` is a multivalued function: for each `x` there are infinitely -// many numbers `z` such that `cosh(z) = x`. The convention is to return the -// `z` whose imaginary part lies in “[-pi, pi]“ and the real part in -// “[0, inf]“. -// -// For real-valued input data types, `arccosh` always returns real output. -// For each value that cannot be expressed as a real number or infinity, it -// yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `arccosh` is a complex analytical function that -// has a branch cut `[-inf, 1]` and is continuous from above on it. -// -// References -// ---------- -// .. [1] M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// -// 10th printing, 1964, pp. 86. -// https://personal.math.ubc.ca/~cbm/aands/page_86.htm -// -// .. [2] Wikipedia, "Inverse hyperbolic function", -// -// https://en.wikipedia.org/wiki/Arccosh -// -// Examples -// -------- -// >>> np.arccosh([np.e, 10.0]) -// array([ 1.65745445, 2.99322285]) -// >>> np.arccosh(1) -// 0.0 -// -//go:linkname Arccosh py.arccosh -func Arccosh(__llgo_va_list ...interface{}) *py.Object - -// arcsin(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Inverse sine, element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// `y`-coordinate on the unit circle. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// angle : ndarray -// -// The inverse sine of each element in `x`, in radians and in the -// closed interval ``[-pi/2, pi/2]``. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// sin, cos, arccos, tan, arctan, arctan2, emath.arcsin -// -// Notes -// ----- -// `arcsin` is a multivalued function: for each `x` there are infinitely -// many numbers `z` such that :math:`sin(z) = x`. The convention is to -// return the angle `z` whose real part lies in [-pi/2, pi/2]. -// -// For real-valued input data types, *arcsin* always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `arcsin` is a complex analytic function that -// has, by convention, the branch cuts [-inf, -1] and [1, inf] and is -// continuous from above on the former and from below on the latter. -// -// The inverse sine is also known as `asin` or sin^{-1}. -// -// References -// ---------- -// Abramowitz, M. and Stegun, I. A., *Handbook of Mathematical Functions*, -// 10th printing, New York: Dover, 1964, pp. 79ff. -// https://personal.math.ubc.ca/~cbm/aands/page_79.htm -// -// Examples -// -------- -// >>> np.arcsin(1) # pi/2 -// 1.5707963267948966 -// >>> np.arcsin(-1) # -pi/2 -// -1.5707963267948966 -// >>> np.arcsin(0) -// 0.0 -// -//go:linkname Arcsin py.arcsin -func Arcsin(__llgo_va_list ...interface{}) *py.Object - -// arcsinh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Inverse hyperbolic sine element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Array of the same shape as `x`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// `arcsinh` is a multivalued function: for each `x` there are infinitely -// many numbers `z` such that `sinh(z) = x`. The convention is to return the -// `z` whose imaginary part lies in `[-pi/2, pi/2]`. -// -// For real-valued input data types, `arcsinh` always returns real output. -// For each value that cannot be expressed as a real number or infinity, it -// returns “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `arccos` is a complex analytical function that -// has branch cuts `[1j, infj]` and `[-1j, -infj]` and is continuous from -// the right on the former and from the left on the latter. -// -// The inverse hyperbolic sine is also known as `asinh` or “sinh^-1“. -// -// References -// ---------- -// .. [1] M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// -// 10th printing, 1964, pp. 86. -// https://personal.math.ubc.ca/~cbm/aands/page_86.htm -// -// .. [2] Wikipedia, "Inverse hyperbolic function", -// -// https://en.wikipedia.org/wiki/Arcsinh -// -// Examples -// -------- -// >>> np.arcsinh(np.array([np.e, 10.0])) -// array([ 1.72538256, 2.99822295]) -// -//go:linkname Arcsinh py.arcsinh -func Arcsinh(__llgo_va_list ...interface{}) *py.Object - -// arctan(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Trigonometric inverse tangent, element-wise. -// -// The inverse of tan, so that if “y = tan(x)“ then “x = arctan(y)“. -// -// Parameters -// ---------- -// x : array_like -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Out has the same shape as `x`. Its real part is in -// ``[-pi/2, pi/2]`` (``arctan(+/-inf)`` returns ``+/-pi/2``). -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// arctan2 : The "four quadrant" arctan of the angle formed by (`x`, `y`) -// -// and the positive `x`-axis. -// -// angle : Argument of complex values. -// -// Notes -// ----- -// `arctan` is a multi-valued function: for each `x` there are infinitely -// many numbers `z` such that tan(`z`) = `x`. The convention is to return -// the angle `z` whose real part lies in [-pi/2, pi/2]. -// -// For real-valued input data types, `arctan` always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `arctan` is a complex analytic function that -// has [“1j, infj“] and [“-1j, -infj“] as branch cuts, and is continuous -// from the left on the former and from the right on the latter. -// -// The inverse tangent is also known as `atan` or tan^{-1}. -// -// References -// ---------- -// Abramowitz, M. and Stegun, I. A., *Handbook of Mathematical Functions*, -// 10th printing, New York: Dover, 1964, pp. 79. -// https://personal.math.ubc.ca/~cbm/aands/page_79.htm -// -// Examples -// -------- -// We expect the arctan of 0 to be 0, and of 1 to be pi/4: -// -// >>> np.arctan([0, 1]) -// array([ 0. , 0.78539816]) -// -// >>> np.pi/4 -// 0.78539816339744828 -// -// Plot arctan: -// -// >>> import matplotlib.pyplot as plt -// >>> x = np.linspace(-10, 10) -// >>> plt.plot(x, np.arctan(x)) -// >>> plt.axis('tight') -// >>> plt.show() -// -//go:linkname Arctan py.arctan -func Arctan(__llgo_va_list ...interface{}) *py.Object - -// arctan2(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Element-wise arc tangent of “x1/x2“ choosing the quadrant correctly. -// -// The quadrant (i.e., branch) is chosen so that “arctan2(x1, x2)“ is -// the signed angle in radians between the ray ending at the origin and -// passing through the point (1,0), and the ray ending at the origin and -// passing through the point (`x2`, `x1`). (Note the role reversal: the -// "`y`-coordinate" is the first function parameter, the "`x`-coordinate" -// is the second.) By IEEE convention, this function is defined for -// `x2` = +/-0 and for either or both of `x1` and `x2` = +/-inf (see -// Notes for specific values). -// -// This function is not defined for complex-valued arguments; for the -// so-called argument of complex values, use `angle`. -// -// Parameters -// ---------- -// x1 : array_like, real-valued -// -// `y`-coordinates. -// -// x2 : array_like, real-valued -// -// `x`-coordinates. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// angle : ndarray -// -// Array of angles in radians, in the range ``[-pi, pi]``. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// arctan, tan, angle -// -// Notes -// ----- -// *arctan2* is identical to the `atan2` function of the underlying -// C library. The following special values are defined in the C -// standard: [1]_ -// -// ====== ====== ================ -// `x1` `x2` `arctan2(x1,x2)` -// ====== ====== ================ -// +/- 0 +0 +/- 0 -// +/- 0 -0 +/- pi -// -// > 0 +/-inf +0 / +pi -// < 0 +/-inf -0 / -pi -// -// +/-inf +inf +/- (pi/4) -// +/-inf -inf +/- (3*pi/4) -// ====== ====== ================ -// -// Note that +0 and -0 are distinct floating point numbers, as are +inf -// and -inf. -// -// References -// ---------- -// .. [1] ISO/IEC standard 9899:1999, "Programming language C." -// -// Examples -// -------- -// Consider four points in different quadrants: -// -// >>> x = np.array([-1, +1, +1, -1]) -// >>> y = np.array([-1, -1, +1, +1]) -// >>> np.arctan2(y, x) * 180 / np.pi -// array([-135., -45., 45., 135.]) -// -// Note the order of the parameters. `arctan2` is defined also when `x2` = 0 -// and at several other special points, obtaining values in -// the range “[-pi, pi]“: -// -// >>> np.arctan2([1., -1.], [0., 0.]) -// array([ 1.57079633, -1.57079633]) -// >>> np.arctan2([0., 0., np.inf], [+0., -0., np.inf]) -// array([0. , 3.14159265, 0.78539816]) -// -//go:linkname Arctan2 py.arctan2 -func Arctan2(__llgo_va_list ...interface{}) *py.Object - -// arctanh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Inverse hyperbolic tangent element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Array of the same shape as `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// emath.arctanh -// -// Notes -// ----- -// `arctanh` is a multivalued function: for each `x` there are infinitely -// many numbers `z` such that “tanh(z) = x“. The convention is to return -// the `z` whose imaginary part lies in `[-pi/2, pi/2]`. -// -// For real-valued input data types, `arctanh` always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `arctanh` is a complex analytical function -// that has branch cuts `[-1, -inf]` and `[1, inf]` and is continuous from -// above on the former and from below on the latter. -// -// The inverse hyperbolic tangent is also known as `atanh` or “tanh^-1“. -// -// References -// ---------- -// .. [1] M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// -// 10th printing, 1964, pp. 86. -// https://personal.math.ubc.ca/~cbm/aands/page_86.htm -// -// .. [2] Wikipedia, "Inverse hyperbolic function", -// -// https://en.wikipedia.org/wiki/Arctanh -// -// Examples -// -------- -// >>> np.arctanh([0, -0.5]) -// array([ 0. , -0.54930614]) -// -//go:linkname Arctanh py.arctanh -func Arctanh(__llgo_va_list ...interface{}) *py.Object - -// bitwise_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the bit-wise AND of two arrays element-wise. -// -// Computes the bit-wise AND of the underlying binary representation of -// the integers in the input arrays. This ufunc implements the C/Python -// operator “&“. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Only integer and boolean types are handled. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Result. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logical_and -// bitwise_or -// bitwise_xor -// binary_repr : -// -// Return the binary representation of the input number as a string. -// -// Examples -// -------- -// The number 13 is represented by “00001101“. Likewise, 17 is -// represented by “00010001“. The bit-wise AND of 13 and 17 is -// therefore “000000001“, or 1: -// -// >>> np.bitwise_and(13, 17) -// 1 -// -// >>> np.bitwise_and(14, 13) -// 12 -// >>> np.binary_repr(12) -// '1100' -// >>> np.bitwise_and([14,3], 13) -// array([12, 1]) -// -// >>> np.bitwise_and([11,7], [4,25]) -// array([0, 1]) -// >>> np.bitwise_and(np.array([2,5,255]), np.array([3,14,16])) -// array([ 2, 4, 16]) -// >>> np.bitwise_and([True, True], [False, True]) -// array([False, True]) -// -// The “&“ operator can be used as a shorthand for “np.bitwise_and“ on -// ndarrays. -// -// >>> x1 = np.array([2, 5, 255]) -// >>> x2 = np.array([3, 14, 16]) -// >>> x1 & x2 -// array([ 2, 4, 16]) -// -//go:linkname BitwiseAnd py.bitwise_and -func BitwiseAnd(__llgo_va_list ...interface{}) *py.Object - -// bitwise_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the bit-wise OR of two arrays element-wise. -// -// Computes the bit-wise OR of the underlying binary representation of -// the integers in the input arrays. This ufunc implements the C/Python -// operator “|“. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Only integer and boolean types are handled. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Result. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logical_or -// bitwise_and -// bitwise_xor -// binary_repr : -// -// Return the binary representation of the input number as a string. -// -// Examples -// -------- -// The number 13 has the binary representation “00001101“. Likewise, -// 16 is represented by “00010000“. The bit-wise OR of 13 and 16 is -// then “00011101“, or 29: -// -// >>> np.bitwise_or(13, 16) -// 29 -// >>> np.binary_repr(29) -// '11101' -// -// >>> np.bitwise_or(32, 2) -// 34 -// >>> np.bitwise_or([33, 4], 1) -// array([33, 5]) -// >>> np.bitwise_or([33, 4], [1, 2]) -// array([33, 6]) -// -// >>> np.bitwise_or(np.array([2, 5, 255]), np.array([4, 4, 4])) -// array([ 6, 5, 255]) -// >>> np.array([2, 5, 255]) | np.array([4, 4, 4]) -// array([ 6, 5, 255]) -// >>> np.bitwise_or(np.array([2, 5, 255, 2147483647], dtype=np.int32), -// ... np.array([4, 4, 4, 2147483647], dtype=np.int32)) -// array([ 6, 5, 255, 2147483647]) -// >>> np.bitwise_or([True, True], [False, True]) -// array([ True, True]) -// -// The “|“ operator can be used as a shorthand for “np.bitwise_or“ on -// ndarrays. -// -// >>> x1 = np.array([2, 5, 255]) -// >>> x2 = np.array([4, 4, 4]) -// >>> x1 | x2 -// array([ 6, 5, 255]) -// -//go:linkname BitwiseOr py.bitwise_or -func BitwiseOr(__llgo_va_list ...interface{}) *py.Object - -// bitwise_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the bit-wise XOR of two arrays element-wise. -// -// Computes the bit-wise XOR of the underlying binary representation of -// the integers in the input arrays. This ufunc implements the C/Python -// operator “^“. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Only integer and boolean types are handled. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Result. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logical_xor -// bitwise_and -// bitwise_or -// binary_repr : -// -// Return the binary representation of the input number as a string. -// -// Examples -// -------- -// The number 13 is represented by “00001101“. Likewise, 17 is -// represented by “00010001“. The bit-wise XOR of 13 and 17 is -// therefore “00011100“, or 28: -// -// >>> np.bitwise_xor(13, 17) -// 28 -// >>> np.binary_repr(28) -// '11100' -// -// >>> np.bitwise_xor(31, 5) -// 26 -// >>> np.bitwise_xor([31,3], 5) -// array([26, 6]) -// -// >>> np.bitwise_xor([31,3], [5,6]) -// array([26, 5]) -// >>> np.bitwise_xor([True, True], [False, True]) -// array([ True, False]) -// -// The “^“ operator can be used as a shorthand for “np.bitwise_xor“ on -// ndarrays. -// -// >>> x1 = np.array([True, True]) -// >>> x2 = np.array([False, True]) -// >>> x1 ^ x2 -// array([ True, False]) -// -//go:linkname BitwiseXor py.bitwise_xor -func BitwiseXor(__llgo_va_list ...interface{}) *py.Object - -// cbrt(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the cube-root of an array, element-wise. -// -// .. versionadded:: 1.10.0 -// -// Parameters -// ---------- -// x : array_like -// -// The values whose cube-roots are required. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// An array of the same shape as `x`, containing the cube -// cube-root of each element in `x`. -// If `out` was provided, `y` is a reference to it. -// This is a scalar if `x` is a scalar. -// -// Examples -// -------- -// >>> np.cbrt([1,8,27]) -// array([ 1., 2., 3.]) -// -//go:linkname Cbrt py.cbrt -func Cbrt(__llgo_va_list ...interface{}) *py.Object - -// ceil(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the ceiling of the input, element-wise. -// -// The ceil of the scalar `x` is the smallest integer `i`, such that -// “i >= x“. It is often denoted as :math:`\lceil x \rceil`. -// -// Parameters -// ---------- -// x : array_like -// -// Input data. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The ceiling of each element in `x`, with `float` dtype. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// floor, trunc, rint, fix -// -// Examples -// -------- -// >>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]) -// >>> np.ceil(a) -// array([-1., -1., -0., 1., 2., 2., 2.]) -// -//go:linkname Ceil py.ceil -func Ceil(__llgo_va_list ...interface{}) *py.Object - -// conjugate(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the complex conjugate, element-wise. -// -// The complex conjugate of a complex number is obtained by changing the -// sign of its imaginary part. -// -// Parameters -// ---------- -// x : array_like -// -// Input value. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The complex conjugate of `x`, with same dtype as `y`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// `conj` is an alias for `conjugate`: -// -// >>> np.conj is np.conjugate -// True -// -// Examples -// -------- -// >>> np.conjugate(1+2j) -// (1-2j) -// -// >>> x = np.eye(2) + 1j * np.eye(2) -// >>> np.conjugate(x) -// array([[ 1.-1.j, 0.-0.j], -// -// [ 0.-0.j, 1.-1.j]]) -// -//go:linkname Conj py.conj -func Conj(__llgo_va_list ...interface{}) *py.Object - -// conjugate(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the complex conjugate, element-wise. -// -// The complex conjugate of a complex number is obtained by changing the -// sign of its imaginary part. -// -// Parameters -// ---------- -// x : array_like -// -// Input value. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The complex conjugate of `x`, with same dtype as `y`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// `conj` is an alias for `conjugate`: -// -// >>> np.conj is np.conjugate -// True -// -// Examples -// -------- -// >>> np.conjugate(1+2j) -// (1-2j) -// -// >>> x = np.eye(2) + 1j * np.eye(2) -// >>> np.conjugate(x) -// array([[ 1.-1.j, 0.-0.j], -// -// [ 0.-0.j, 1.-1.j]]) -// -//go:linkname Conjugate py.conjugate -func Conjugate(__llgo_va_list ...interface{}) *py.Object - -// copysign(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Change the sign of x1 to that of x2, element-wise. -// -// If `x2` is a scalar, its sign will be copied to all elements of `x1`. -// -// Parameters -// ---------- -// x1 : array_like -// -// Values to change the sign of. -// -// x2 : array_like -// -// The sign of `x2` is copied to `x1`. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// The values of `x1` with the sign of `x2`. -// This is a scalar if both `x1` and `x2` are scalars. -// -// Examples -// -------- -// >>> np.copysign(1.3, -1) -// -1.3 -// >>> 1/np.copysign(0, 1) -// inf -// >>> 1/np.copysign(0, -1) -// -inf -// -// >>> np.copysign([-1, 0, 1], -1.1) -// array([-1., -0., -1.]) -// >>> np.copysign([-1, 0, 1], np.arange(3)-1) -// array([-1., 0., 1.]) -// -//go:linkname Copysign py.copysign -func Copysign(__llgo_va_list ...interface{}) *py.Object - -// cos(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Cosine element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Input array in radians. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding cosine values. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// If `out` is provided, the function writes the result into it, -// and returns a reference to `out`. (See Examples) -// -// References -// ---------- -// M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions. -// New York, NY: Dover, 1972. -// -// Examples -// -------- -// >>> np.cos(np.array([0, np.pi/2, np.pi])) -// array([ 1.00000000e+00, 6.12303177e-17, -1.00000000e+00]) -// >>> -// >>> # Example of providing the optional output parameter -// >>> out1 = np.array([0], dtype='d') -// >>> out2 = np.cos([0.1], out1) -// >>> out2 is out1 -// True -// >>> -// >>> # Example of ValueError due to provision of shape mis-matched `out` -// >>> np.cos(np.zeros((3,3)),np.zeros((2,2))) -// Traceback (most recent call last): -// -// File "", line 1, in -// -// ValueError: operands could not be broadcast together with shapes (3,3) (2,2) -// -//go:linkname Cos py.cos -func Cos(__llgo_va_list ...interface{}) *py.Object - -// cosh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Hyperbolic cosine, element-wise. -// -// Equivalent to “1/2 * (np.exp(x) + np.exp(-x))“ and “np.cos(1j*x)“. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array of same shape as `x`. -// This is a scalar if `x` is a scalar. -// -// Examples -// -------- -// >>> np.cosh(0) -// 1.0 -// -// The hyperbolic cosine describes the shape of a hanging cable: -// -// >>> import matplotlib.pyplot as plt -// >>> x = np.linspace(-4, 4, 1000) -// >>> plt.plot(x, np.cosh(x)) -// >>> plt.show() -// -//go:linkname Cosh py.cosh -func Cosh(__llgo_va_list ...interface{}) *py.Object - -// deg2rad(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Convert angles from degrees to radians. -// -// Parameters -// ---------- -// x : array_like -// -// Angles in degrees. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding angle in radians. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// rad2deg : Convert angles from radians to degrees. -// unwrap : Remove large jumps in angle by wrapping. -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// “deg2rad(x)“ is “x * pi / 180“. -// -// Examples -// -------- -// >>> np.deg2rad(180) -// 3.1415926535897931 -// -//go:linkname Deg2rad py.deg2rad -func Deg2rad(__llgo_va_list ...interface{}) *py.Object - -// degrees(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Convert angles from radians to degrees. -// -// Parameters -// ---------- -// x : array_like -// -// Input array in radians. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray of floats -// -// The corresponding degree values; if `out` was supplied this is a -// reference to it. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// rad2deg : equivalent function -// -// Examples -// -------- -// Convert a radian array to degrees -// -// >>> rad = np.arange(12.)*np.pi/6 -// >>> np.degrees(rad) -// array([ 0., 30., 60., 90., 120., 150., 180., 210., 240., -// -// 270., 300., 330.]) -// -// >>> out = np.zeros((rad.shape)) -// >>> r = np.degrees(rad, out) -// >>> np.all(r == out) -// True -// -//go:linkname Degrees py.degrees -func Degrees(__llgo_va_list ...interface{}) *py.Object - -// divide(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Divide arguments element-wise. -// -// Parameters -// ---------- -// x1 : array_like -// -// Dividend array. -// -// x2 : array_like -// -// Divisor array. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The quotient ``x1/x2``, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// seterr : Set whether to raise or warn on overflow, underflow and -// -// division by zero. -// -// Notes -// ----- -// Equivalent to “x1“ / “x2“ in terms of array-broadcasting. -// -// The “true_divide(x1, x2)“ function is an alias for -// “divide(x1, x2)“. -// -// Examples -// -------- -// >>> np.divide(2.0, 4.0) -// 0.5 -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> np.divide(x1, x2) -// array([[nan, 1. , 1. ], -// -// [inf, 4. , 2.5], -// [inf, 7. , 4. ]]) -// -// The “/“ operator can be used as a shorthand for “np.divide“ on -// ndarrays. -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = 2 * np.ones(3) -// >>> x1 / x2 -// array([[0. , 0.5, 1. ], -// -// [1.5, 2. , 2.5], -// [3. , 3.5, 4. ]]) -// -//go:linkname Divide py.divide -func Divide(__llgo_va_list ...interface{}) *py.Object - -// divmod(x1, x2[, out1, out2], / [, out=(None, None)], *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return element-wise quotient and remainder simultaneously. -// -// .. versionadded:: 1.13.0 -// -// “np.divmod(x, y)“ is equivalent to “(x // y, x % y)“, but faster -// because it avoids redundant work. It is used to implement the Python -// built-in function “divmod“ on NumPy arrays. -// -// Parameters -// ---------- -// x1 : array_like -// -// Dividend array. -// -// x2 : array_like -// -// Divisor array. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out1 : ndarray -// -// Element-wise quotient resulting from floor division. -// This is a scalar if both `x1` and `x2` are scalars. -// -// out2 : ndarray -// -// Element-wise remainder from floor division. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// floor_divide : Equivalent to Python's “//“ operator. -// remainder : Equivalent to Python's “%“ operator. -// modf : Equivalent to “divmod(x, 1)“ for positive “x“ with the return -// -// values switched. -// -// Examples -// -------- -// >>> np.divmod(np.arange(5), 3) -// (array([0, 0, 0, 1, 1]), array([0, 1, 2, 0, 1])) -// -// The `divmod` function can be used as a shorthand for “np.divmod“ on -// ndarrays. -// -// >>> x = np.arange(5) -// >>> divmod(x, 3) -// (array([0, 0, 0, 1, 1]), array([0, 1, 2, 0, 1])) -// -//go:linkname Divmod py.divmod -func Divmod(__llgo_va_list ...interface{}) *py.Object - -// equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return (x1 == x2) element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array, element-wise comparison of `x1` and `x2`. -// Typically of type bool, unless ``dtype=object`` is passed. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// not_equal, greater_equal, less_equal, greater, less -// -// Examples -// -------- -// >>> np.equal([0, 1, 3], np.arange(3)) -// array([ True, True, False]) -// -// What is compared are values, not types. So an int (1) and an array of -// length one can evaluate as True: -// -// >>> np.equal(1, np.ones(1)) -// array([ True]) -// -// The “==“ operator can be used as a shorthand for “np.equal“ on -// ndarrays. -// -// >>> a = np.array([2, 4, 6]) -// >>> b = np.array([2, 4, 2]) -// >>> a == b -// array([ True, True, False]) -// -//go:linkname Equal py.equal -func Equal(__llgo_va_list ...interface{}) *py.Object - -// exp(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Calculate the exponential of all elements in the input array. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array, element-wise exponential of `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// expm1 : Calculate “exp(x) - 1“ for all elements in the array. -// exp2 : Calculate “2**x“ for all elements in the array. -// -// Notes -// ----- -// The irrational number “e“ is also known as Euler's number. It is -// approximately 2.718281, and is the base of the natural logarithm, -// “ln“ (this means that, if :math:`x = \ln y = \log_e y`, -// then :math:`e^x = y`. For real input, “exp(x)“ is always positive. -// -// For complex arguments, “x = a + ib“, we can write -// :math:`e^x = e^a e^{ib}`. The first term, :math:`e^a`, is already -// known (it is the real argument, described above). The second term, -// :math:`e^{ib}`, is :math:`\cos b + i \sin b`, a function with -// magnitude 1 and a periodic phase. -// -// References -// ---------- -// .. [1] Wikipedia, "Exponential function", -// -// https://en.wikipedia.org/wiki/Exponential_function -// -// .. [2] M. Abramovitz and I. A. Stegun, "Handbook of Mathematical Functions -// -// with Formulas, Graphs, and Mathematical Tables," Dover, 1964, p. 69, -// https://personal.math.ubc.ca/~cbm/aands/page_69.htm -// -// Examples -// -------- -// Plot the magnitude and phase of “exp(x)“ in the complex plane: -// -// >>> import matplotlib.pyplot as plt -// -// >>> x = np.linspace(-2*np.pi, 2*np.pi, 100) -// >>> xx = x + 1j * x[:, np.newaxis] # a + ib over complex plane -// >>> out = np.exp(xx) -// -// >>> plt.subplot(121) -// >>> plt.imshow(np.abs(out), -// ... extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi], cmap='gray') -// >>> plt.title('Magnitude of exp(x)') -// -// >>> plt.subplot(122) -// >>> plt.imshow(np.angle(out), -// ... extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi], cmap='hsv') -// >>> plt.title('Phase (angle) of exp(x)') -// >>> plt.show() -// -//go:linkname Exp py.exp -func Exp(__llgo_va_list ...interface{}) *py.Object - -// exp2(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Calculate `2**p` for all `p` in the input array. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Element-wise 2 to the power `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// power -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// Examples -// -------- -// >>> np.exp2([2, 3]) -// array([ 4., 8.]) -// -//go:linkname Exp2 py.exp2 -func Exp2(__llgo_va_list ...interface{}) *py.Object - -// expm1(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Calculate “exp(x) - 1“ for all elements in the array. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Element-wise exponential minus one: ``out = exp(x) - 1``. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// log1p : “log(1 + x)“, the inverse of expm1. -// -// Notes -// ----- -// This function provides greater precision than “exp(x) - 1“ -// for small values of “x“. -// -// Examples -// -------- -// The true value of “exp(1e-10) - 1“ is “1.00000000005e-10“ to -// about 32 significant digits. This example shows the superiority of -// expm1 in this case. -// -// >>> np.expm1(1e-10) -// 1.00000000005e-10 -// >>> np.exp(1e-10) - 1 -// 1.000000082740371e-10 -// -//go:linkname Expm1 py.expm1 -func Expm1(__llgo_va_list ...interface{}) *py.Object - -// fabs(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the absolute values element-wise. -// -// This function returns the absolute values (positive magnitude) of the -// data in `x`. Complex values are not handled, use `absolute` to find the -// absolute values of complex data. -// -// Parameters -// ---------- -// x : array_like -// -// The array of numbers for which the absolute values are required. If -// `x` is a scalar, the result `y` will also be a scalar. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The absolute values of `x`, the returned values are always floats. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// absolute : Absolute values including `complex` types. -// -// Examples -// -------- -// >>> np.fabs(-1) -// 1.0 -// >>> np.fabs([-1.2, 1.2]) -// array([ 1.2, 1.2]) -// -//go:linkname Fabs py.fabs -func Fabs(__llgo_va_list ...interface{}) *py.Object - -// floor(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the floor of the input, element-wise. -// -// The floor of the scalar `x` is the largest integer `i`, such that -// `i <= x`. It is often denoted as :math:`\lfloor x \rfloor`. -// -// Parameters -// ---------- -// x : array_like -// -// Input data. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The floor of each element in `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// ceil, trunc, rint, fix -// -// Notes -// ----- -// Some spreadsheet programs calculate the "floor-towards-zero", where -// “floor(-2.5) == -2“. NumPy instead uses the definition of -// `floor` where `floor(-2.5) == -3`. The "floor-towards-zero" -// function is called “fix“ in NumPy. -// -// Examples -// -------- -// >>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]) -// >>> np.floor(a) -// array([-2., -2., -1., 0., 1., 1., 2.]) -// -//go:linkname Floor py.floor -func Floor(__llgo_va_list ...interface{}) *py.Object - -// floor_divide(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the largest integer smaller or equal to the division of the inputs. -// It is equivalent to the Python “//“ operator and pairs with the -// Python “%“ (`remainder`), function so that “a = a % b + b * (a // b)“ -// up to roundoff. -// -// Parameters -// ---------- -// x1 : array_like -// -// Numerator. -// -// x2 : array_like -// -// Denominator. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// y = floor(`x1`/`x2`) -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// remainder : Remainder complementary to floor_divide. -// divmod : Simultaneous floor division and remainder. -// divide : Standard division. -// floor : Round a number to the nearest integer toward minus infinity. -// ceil : Round a number to the nearest integer toward infinity. -// -// Examples -// -------- -// >>> np.floor_divide(7,3) -// 2 -// >>> np.floor_divide([1., 2., 3., 4.], 2.5) -// array([ 0., 0., 1., 1.]) -// -// The “//“ operator can be used as a shorthand for “np.floor_divide“ -// on ndarrays. -// -// >>> x1 = np.array([1., 2., 3., 4.]) -// >>> x1 // 2.5 -// array([0., 0., 1., 1.]) -// -//go:linkname FloorDivide py.floor_divide -func FloorDivide(__llgo_va_list ...interface{}) *py.Object - -// float_power(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// First array elements raised to powers from second array, element-wise. -// -// Raise each base in `x1` to the positionally-corresponding power in `x2`. -// `x1` and `x2` must be broadcastable to the same shape. This differs from -// the power function in that integers, float16, and float32 are promoted to -// floats with a minimum precision of float64 so that the result is always -// inexact. The intent is that the function will return a usable result for -// negative powers and seldom overflow for positive powers. -// -// Negative values raised to a non-integral value will return “nan“. -// To get complex results, cast the input to complex, or specify the -// “dtype“ to be “complex“ (see the example below). -// -// .. versionadded:: 1.12.0 -// -// Parameters -// ---------- -// x1 : array_like -// -// The bases. -// -// x2 : array_like -// -// The exponents. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The bases in `x1` raised to the exponents in `x2`. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// power : power function that preserves type -// -// Examples -// -------- -// Cube each element in a list. -// -// >>> x1 = range(6) -// >>> x1 -// [0, 1, 2, 3, 4, 5] -// >>> np.float_power(x1, 3) -// array([ 0., 1., 8., 27., 64., 125.]) -// -// Raise the bases to different exponents. -// -// >>> x2 = [1.0, 2.0, 3.0, 3.0, 2.0, 1.0] -// >>> np.float_power(x1, x2) -// array([ 0., 1., 8., 27., 16., 5.]) -// -// The effect of broadcasting. -// -// >>> x2 = np.array([[1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1]]) -// >>> x2 -// array([[1, 2, 3, 3, 2, 1], -// -// [1, 2, 3, 3, 2, 1]]) -// -// >>> np.float_power(x1, x2) -// array([[ 0., 1., 8., 27., 16., 5.], -// -// [ 0., 1., 8., 27., 16., 5.]]) -// -// Negative values raised to a non-integral value will result in “nan“ -// (and a warning will be generated). -// -// >>> x3 = np.array([-1, -4]) -// >>> with np.errstate(invalid='ignore'): -// ... p = np.float_power(x3, 1.5) -// ... -// >>> p -// array([nan, nan]) -// -// To get complex results, give the argument “dtype=complex“. -// -// >>> np.float_power(x3, 1.5, dtype=complex) -// array([-1.83697020e-16-1.j, -1.46957616e-15-8.j]) -// -//go:linkname FloatPower py.float_power -func FloatPower(__llgo_va_list ...interface{}) *py.Object - -// fmax(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Element-wise maximum of array elements. -// -// Compare two arrays and return a new array containing the element-wise -// maxima. If one of the elements being compared is a NaN, then the -// non-nan element is returned. If both elements are NaNs then the first -// is returned. The latter distinction is important for complex NaNs, -// which are defined as at least one of the real or imaginary parts being -// a NaN. The net effect is that NaNs are ignored when possible. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// The arrays holding the elements to be compared. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The maximum of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// fmin : -// -// Element-wise minimum of two arrays, ignores NaNs. -// -// maximum : -// -// Element-wise maximum of two arrays, propagates NaNs. -// -// amax : -// -// The maximum value of an array along a given axis, propagates NaNs. -// -// nanmax : -// -// The maximum value of an array along a given axis, ignores NaNs. -// -// minimum, amin, nanmin -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// The fmax is equivalent to “np.where(x1 >= x2, x1, x2)“ when neither -// x1 nor x2 are NaNs, but it is faster and does proper broadcasting. -// -// Examples -// -------- -// >>> np.fmax([2, 3, 4], [1, 5, 2]) -// array([ 2., 5., 4.]) -// -// >>> np.fmax(np.eye(2), [0.5, 2]) -// array([[ 1. , 2. ], -// -// [ 0.5, 2. ]]) -// -// >>> np.fmax([np.nan, 0, np.nan],[0, np.nan, np.nan]) -// array([ 0., 0., nan]) -// -//go:linkname Fmax py.fmax -func Fmax(__llgo_va_list ...interface{}) *py.Object - -// fmin(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Element-wise minimum of array elements. -// -// Compare two arrays and return a new array containing the element-wise -// minima. If one of the elements being compared is a NaN, then the -// non-nan element is returned. If both elements are NaNs then the first -// is returned. The latter distinction is important for complex NaNs, -// which are defined as at least one of the real or imaginary parts being -// a NaN. The net effect is that NaNs are ignored when possible. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// The arrays holding the elements to be compared. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The minimum of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// fmax : -// -// Element-wise maximum of two arrays, ignores NaNs. -// -// minimum : -// -// Element-wise minimum of two arrays, propagates NaNs. -// -// amin : -// -// The minimum value of an array along a given axis, propagates NaNs. -// -// nanmin : -// -// The minimum value of an array along a given axis, ignores NaNs. -// -// maximum, amax, nanmax -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// The fmin is equivalent to “np.where(x1 <= x2, x1, x2)“ when neither -// x1 nor x2 are NaNs, but it is faster and does proper broadcasting. -// -// Examples -// -------- -// >>> np.fmin([2, 3, 4], [1, 5, 2]) -// array([1, 3, 2]) -// -// >>> np.fmin(np.eye(2), [0.5, 2]) -// array([[ 0.5, 0. ], -// -// [ 0. , 1. ]]) -// -// >>> np.fmin([np.nan, 0, np.nan],[0, np.nan, np.nan]) -// array([ 0., 0., nan]) -// -//go:linkname Fmin py.fmin -func Fmin(__llgo_va_list ...interface{}) *py.Object - -// fmod(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns the element-wise remainder of division. -// -// This is the NumPy implementation of the C library function fmod, the -// remainder has the same sign as the dividend `x1`. It is equivalent to -// the Matlab(TM) “rem“ function and should not be confused with the -// Python modulus operator “x1 % x2“. -// -// Parameters -// ---------- -// x1 : array_like -// -// Dividend. -// -// x2 : array_like -// -// Divisor. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : array_like -// -// The remainder of the division of `x1` by `x2`. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// remainder : Equivalent to the Python “%“ operator. -// divide -// -// Notes -// ----- -// The result of the modulo operation for negative dividend and divisors -// is bound by conventions. For `fmod`, the sign of result is the sign of -// the dividend, while for `remainder` the sign of the result is the sign -// of the divisor. The `fmod` function is equivalent to the Matlab(TM) -// “rem“ function. -// -// Examples -// -------- -// >>> np.fmod([-3, -2, -1, 1, 2, 3], 2) -// array([-1, 0, -1, 1, 0, 1]) -// >>> np.remainder([-3, -2, -1, 1, 2, 3], 2) -// array([1, 0, 1, 1, 0, 1]) -// -// >>> np.fmod([5, 3], [2, 2.]) -// array([ 1., 1.]) -// >>> a = np.arange(-3, 3).reshape(3, 2) -// >>> a -// array([[-3, -2], -// -// [-1, 0], -// [ 1, 2]]) -// -// >>> np.fmod(a, [2,2]) -// array([[-1, 0], -// -// [-1, 0], -// [ 1, 0]]) -// -//go:linkname Fmod py.fmod -func Fmod(__llgo_va_list ...interface{}) *py.Object - -// frexp(x[, out1, out2], / [, out=(None, None)], *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Decompose the elements of x into mantissa and twos exponent. -// -// Returns (`mantissa`, `exponent`), where “x = mantissa * 2**exponent“. -// The mantissa lies in the open interval(-1, 1), while the twos -// exponent is a signed integer. -// -// Parameters -// ---------- -// x : array_like -// -// Array of numbers to be decomposed. -// -// out1 : ndarray, optional -// -// Output array for the mantissa. Must have the same shape as `x`. -// -// out2 : ndarray, optional -// -// Output array for the exponent. Must have the same shape as `x`. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// mantissa : ndarray -// -// Floating values between -1 and 1. -// This is a scalar if `x` is a scalar. -// -// exponent : ndarray -// -// Integer exponents of 2. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// ldexp : Compute “y = x1 * 2**x2“, the inverse of `frexp`. -// -// Notes -// ----- -// Complex dtypes are not supported, they will raise a TypeError. -// -// Examples -// -------- -// >>> x = np.arange(9) -// >>> y1, y2 = np.frexp(x) -// >>> y1 -// array([ 0. , 0.5 , 0.5 , 0.75 , 0.5 , 0.625, 0.75 , 0.875, -// -// 0.5 ]) -// -// >>> y2 -// array([0, 1, 2, 2, 3, 3, 3, 3, 4]) -// >>> y1 * 2**y2 -// array([ 0., 1., 2., 3., 4., 5., 6., 7., 8.]) -// -//go:linkname Frexp py.frexp -func Frexp(__llgo_va_list ...interface{}) *py.Object - -// gcd(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns the greatest common divisor of “|x1|“ and “|x2|“ -// -// Parameters -// ---------- -// x1, x2 : array_like, int -// -// Arrays of values. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// Returns -// ------- -// y : ndarray or scalar -// -// The greatest common divisor of the absolute value of the inputs -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// lcm : The lowest common multiple -// -// Examples -// -------- -// >>> np.gcd(12, 20) -// 4 -// >>> np.gcd.reduce([15, 25, 35]) -// 5 -// >>> np.gcd(np.arange(6), 20) -// array([20, 1, 2, 1, 4, 5]) -// -//go:linkname Gcd py.gcd -func Gcd(__llgo_va_list ...interface{}) *py.Object - -// heaviside(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the Heaviside step function. -// -// The Heaviside step function is defined as:: -// -// 0 if x1 < 0 -// heaviside(x1, x2) = x2 if x1 == 0 -// 1 if x1 > 0 -// -// where `x2` is often taken to be 0.5, but 0 and 1 are also sometimes used. -// -// Parameters -// ---------- -// x1 : array_like -// -// Input values. -// -// x2 : array_like -// -// The value of the function when x1 is 0. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// The output array, element-wise Heaviside step function of `x1`. -// This is a scalar if both `x1` and `x2` are scalars. -// -// Notes -// ----- -// .. versionadded:: 1.13.0 -// -// References -// ---------- -// .. Wikipedia, "Heaviside step function", -// -// https://en.wikipedia.org/wiki/Heaviside_step_function -// -// Examples -// -------- -// >>> np.heaviside([-1.5, 0, 2.0], 0.5) -// array([ 0. , 0.5, 1. ]) -// >>> np.heaviside([-1.5, 0, 2.0], 1) -// array([ 0., 1., 1.]) -// -//go:linkname Heaviside py.heaviside -func Heaviside(__llgo_va_list ...interface{}) *py.Object - -// hypot(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Given the "legs" of a right triangle, return its hypotenuse. -// -// Equivalent to “sqrt(x1**2 + x2**2)“, element-wise. If `x1` or -// `x2` is scalar_like (i.e., unambiguously cast-able to a scalar type), -// it is broadcast for use with each element of the other argument. -// (See Examples) -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Leg of the triangle(s). -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// z : ndarray -// -// The hypotenuse of the triangle(s). -// This is a scalar if both `x1` and `x2` are scalars. -// -// Examples -// -------- -// >>> np.hypot(3*np.ones((3, 3)), 4*np.ones((3, 3))) -// array([[ 5., 5., 5.], -// -// [ 5., 5., 5.], -// [ 5., 5., 5.]]) -// -// Example showing broadcast of scalar_like argument: -// -// >>> np.hypot(3*np.ones((3, 3)), [4]) -// array([[ 5., 5., 5.], -// -// [ 5., 5., 5.], -// [ 5., 5., 5.]]) -// -//go:linkname Hypot py.hypot -func Hypot(__llgo_va_list ...interface{}) *py.Object - -// invert(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute bit-wise inversion, or bit-wise NOT, element-wise. -// -// Computes the bit-wise NOT of the underlying binary representation of -// the integers in the input arrays. This ufunc implements the C/Python -// operator “~“. -// -// For signed integer inputs, the two's complement is returned. In a -// two's-complement system negative numbers are represented by the two's -// complement of the absolute value. This is the most common method of -// representing signed integers on computers [1]_. A N-bit -// two's-complement system can represent every integer in the range -// :math:`-2^{N-1}` to :math:`+2^{N-1}-1`. -// -// Parameters -// ---------- -// x : array_like -// -// Only integer and boolean types are handled. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Result. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// bitwise_and, bitwise_or, bitwise_xor -// logical_not -// binary_repr : -// -// Return the binary representation of the input number as a string. -// -// Notes -// ----- -// `bitwise_not` is an alias for `invert`: -// -// >>> np.bitwise_not is np.invert -// True -// -// References -// ---------- -// .. [1] Wikipedia, "Two's complement", -// -// https://en.wikipedia.org/wiki/Two's_complement -// -// Examples -// -------- -// We've seen that 13 is represented by “00001101“. -// The invert or bit-wise NOT of 13 is then: -// -// >>> x = np.invert(np.array(13, dtype=np.uint8)) -// >>> x -// 242 -// >>> np.binary_repr(x, width=8) -// '11110010' -// -// The result depends on the bit-width: -// -// >>> x = np.invert(np.array(13, dtype=np.uint16)) -// >>> x -// 65522 -// >>> np.binary_repr(x, width=16) -// '1111111111110010' -// -// When using signed integer types the result is the two's complement of -// the result for the unsigned type: -// -// >>> np.invert(np.array([13], dtype=np.int8)) -// array([-14], dtype=int8) -// >>> np.binary_repr(-14, width=8) -// '11110010' -// -// Booleans are accepted as well: -// -// >>> np.invert(np.array([True, False])) -// array([False, True]) -// -// The “~“ operator can be used as a shorthand for “np.invert“ on -// ndarrays. -// -// >>> x1 = np.array([True, False]) -// >>> ~x1 -// array([False, True]) -// -//go:linkname Invert py.invert -func Invert(__llgo_va_list ...interface{}) *py.Object - -// isfinite(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Test element-wise for finiteness (not infinity and not Not a Number). -// -// The result is returned as a boolean array. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray, bool -// -// True where ``x`` is not positive infinity, negative infinity, -// or NaN; false otherwise. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// isinf, isneginf, isposinf, isnan -// -// Notes -// ----- -// Not a Number, positive infinity and negative infinity are considered -// to be non-finite. -// -// NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic -// (IEEE 754). This means that Not a Number is not equivalent to infinity. -// Also that positive infinity is not equivalent to negative infinity. But -// infinity is equivalent to positive infinity. Errors result if the -// second argument is also supplied when `x` is a scalar input, or if -// first and second arguments have different shapes. -// -// Examples -// -------- -// >>> np.isfinite(1) -// True -// >>> np.isfinite(0) -// True -// >>> np.isfinite(np.nan) -// False -// >>> np.isfinite(np.inf) -// False -// >>> np.isfinite(np.NINF) -// False -// >>> np.isfinite([np.log(-1.),1.,np.log(0)]) -// array([False, True, False]) -// -// >>> x = np.array([-np.inf, 0., np.inf]) -// >>> y = np.array([2, 2, 2]) -// >>> np.isfinite(x, y) -// array([0, 1, 0]) -// >>> y -// array([0, 1, 0]) -// -//go:linkname Isfinite py.isfinite -func Isfinite(__llgo_va_list ...interface{}) *py.Object - -// isinf(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Test element-wise for positive or negative infinity. -// -// Returns a boolean array of the same shape as `x`, True where “x == -// +/-inf“, otherwise False. -// -// Parameters -// ---------- -// x : array_like -// -// Input values -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : bool (scalar) or boolean ndarray -// -// True where ``x`` is positive or negative infinity, false otherwise. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// isneginf, isposinf, isnan, isfinite -// -// Notes -// ----- -// NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic -// (IEEE 754). -// -// Errors result if the second argument is supplied when the first -// argument is a scalar, or if the first and second arguments have -// different shapes. -// -// Examples -// -------- -// >>> np.isinf(np.inf) -// True -// >>> np.isinf(np.nan) -// False -// >>> np.isinf(np.NINF) -// True -// >>> np.isinf([np.inf, -np.inf, 1.0, np.nan]) -// array([ True, True, False, False]) -// -// >>> x = np.array([-np.inf, 0., np.inf]) -// >>> y = np.array([2, 2, 2]) -// >>> np.isinf(x, y) -// array([1, 0, 1]) -// >>> y -// array([1, 0, 1]) -// -//go:linkname Isinf py.isinf -func Isinf(__llgo_va_list ...interface{}) *py.Object - -// isnan(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Test element-wise for NaN and return result as a boolean array. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or bool -// -// True where ``x`` is NaN, false otherwise. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// isinf, isneginf, isposinf, isfinite, isnat -// -// Notes -// ----- -// NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic -// (IEEE 754). This means that Not a Number is not equivalent to infinity. -// -// Examples -// -------- -// >>> np.isnan(np.nan) -// True -// >>> np.isnan(np.inf) -// False -// >>> np.isnan([np.log(-1.),1.,np.log(0)]) -// array([ True, False, False]) -// -//go:linkname Isnan py.isnan -func Isnan(__llgo_va_list ...interface{}) *py.Object - -// isnat(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Test element-wise for NaT (not a time) and return result as a boolean array. -// -// .. versionadded:: 1.13.0 -// -// Parameters -// ---------- -// x : array_like -// -// Input array with datetime or timedelta data type. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or bool -// -// True where ``x`` is NaT, false otherwise. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// isnan, isinf, isneginf, isposinf, isfinite -// -// Examples -// -------- -// >>> np.isnat(np.datetime64("NaT")) -// True -// >>> np.isnat(np.datetime64("2016-01-01")) -// False -// >>> np.isnat(np.array(["NaT", "2016-01-01"], dtype="datetime64[ns]")) -// array([ True, False]) -// -//go:linkname Isnat py.isnat -func Isnat(__llgo_va_list ...interface{}) *py.Object - -// lcm(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns the lowest common multiple of “|x1|“ and “|x2|“ -// -// Parameters -// ---------- -// x1, x2 : array_like, int -// -// Arrays of values. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// Returns -// ------- -// y : ndarray or scalar -// -// The lowest common multiple of the absolute value of the inputs -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// gcd : The greatest common divisor -// -// Examples -// -------- -// >>> np.lcm(12, 20) -// 60 -// >>> np.lcm.reduce([3, 12, 20]) -// 60 -// >>> np.lcm.reduce([40, 12, 20]) -// 120 -// >>> np.lcm(np.arange(6), 20) -// array([ 0, 20, 20, 60, 20, 20]) -// -//go:linkname Lcm py.lcm -func Lcm(__llgo_va_list ...interface{}) *py.Object - -// ldexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns x1 * 2**x2, element-wise. -// -// The mantissas `x1` and twos exponents `x2` are used to construct -// floating point numbers “x1 * 2**x2“. -// -// Parameters -// ---------- -// x1 : array_like -// -// Array of multipliers. -// -// x2 : array_like, int -// -// Array of twos exponents. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The result of ``x1 * 2**x2``. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// frexp : Return (y1, y2) from “x = y1 * 2**y2“, inverse to `ldexp`. -// -// Notes -// ----- -// Complex dtypes are not supported, they will raise a TypeError. -// -// `ldexp` is useful as the inverse of `frexp`, if used by itself it is -// more clear to simply use the expression “x1 * 2**x2“. -// -// Examples -// -------- -// >>> np.ldexp(5, np.arange(4)) -// array([ 5., 10., 20., 40.], dtype=float16) -// -// >>> x = np.arange(6) -// >>> np.ldexp(*np.frexp(x)) -// array([ 0., 1., 2., 3., 4., 5.]) -// -//go:linkname Ldexp py.ldexp -func Ldexp(__llgo_va_list ...interface{}) *py.Object - -// left_shift(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Shift the bits of an integer to the left. -// -// Bits are shifted to the left by appending `x2` 0s at the right of `x1`. -// Since the internal representation of numbers is in binary format, this -// operation is equivalent to multiplying `x1` by “2**x2“. -// -// Parameters -// ---------- -// x1 : array_like of integer type -// -// Input values. -// -// x2 : array_like of integer type -// -// Number of zeros to append to `x1`. Has to be non-negative. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : array of integer type -// -// Return `x1` with bits shifted `x2` times to the left. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// right_shift : Shift the bits of an integer to the right. -// binary_repr : Return the binary representation of the input number -// -// as a string. -// -// Examples -// -------- -// >>> np.binary_repr(5) -// '101' -// >>> np.left_shift(5, 2) -// 20 -// >>> np.binary_repr(20) -// '10100' -// -// >>> np.left_shift(5, [1,2,3]) -// array([10, 20, 40]) -// -// Note that the dtype of the second argument may change the dtype of the -// result and can lead to unexpected results in some cases (see -// :ref:`Casting Rules `): -// -// >>> a = np.left_shift(np.uint8(255), 1) # Expect 254 -// >>> print(a, type(a)) # Unexpected result due to upcasting -// 510 -// >>> b = np.left_shift(np.uint8(255), np.uint8(1)) -// >>> print(b, type(b)) -// 254 -// -// The “<<“ operator can be used as a shorthand for “np.left_shift“ on -// ndarrays. -// -// >>> x1 = 5 -// >>> x2 = np.array([1, 2, 3]) -// >>> x1 << x2 -// array([10, 20, 40]) -// -//go:linkname LeftShift py.left_shift -func LeftShift(__llgo_va_list ...interface{}) *py.Object - -// less(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the truth value of (x1 < x2) element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array, element-wise comparison of `x1` and `x2`. -// Typically of type bool, unless ``dtype=object`` is passed. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// greater, less_equal, greater_equal, equal, not_equal -// -// Examples -// -------- -// >>> np.less([1, 2], [2, 2]) -// array([ True, False]) -// -// The “<“ operator can be used as a shorthand for “np.less“ on ndarrays. -// -// >>> a = np.array([1, 2]) -// >>> b = np.array([2, 2]) -// >>> a < b -// array([ True, False]) -// -//go:linkname Less py.less -func Less(__llgo_va_list ...interface{}) *py.Object - -// less_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the truth value of (x1 <= x2) element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array, element-wise comparison of `x1` and `x2`. -// Typically of type bool, unless ``dtype=object`` is passed. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// greater, less, greater_equal, equal, not_equal -// -// Examples -// -------- -// >>> np.less_equal([4, 2, 1], [2, 2, 2]) -// array([False, True, True]) -// -// The “<=“ operator can be used as a shorthand for “np.less_equal“ on -// ndarrays. -// -// >>> a = np.array([4, 2, 1]) -// >>> b = np.array([2, 2, 2]) -// >>> a <= b -// array([False, True, True]) -// -//go:linkname LessEqual py.less_equal -func LessEqual(__llgo_va_list ...interface{}) *py.Object - -// log(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Natural logarithm, element-wise. -// -// The natural logarithm `log` is the inverse of the exponential function, -// so that `log(exp(x)) = x`. The natural logarithm is logarithm in base -// `e`. -// -// Parameters -// ---------- -// x : array_like -// -// Input value. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The natural logarithm of `x`, element-wise. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// log10, log2, log1p, emath.log -// -// Notes -// ----- -// Logarithm is a multivalued function: for each `x` there is an infinite -// number of `z` such that `exp(z) = x`. The convention is to return the -// `z` whose imaginary part lies in `(-pi, pi]`. -// -// For real-valued input data types, `log` always returns real output. For -// each value that cannot be expressed as a real number or infinity, it -// yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `log` is a complex analytical function that -// has a branch cut `[-inf, 0]` and is continuous from above on it. `log` -// handles the floating-point negative zero as an infinitesimal negative -// number, conforming to the C99 standard. -// -// In the cases where the input has a negative real part and a very small -// negative complex part (approaching 0), the result is so close to `-pi` -// that it evaluates to exactly `-pi`. -// -// References -// ---------- -// .. [1] M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// -// 10th printing, 1964, pp. 67. -// https://personal.math.ubc.ca/~cbm/aands/page_67.htm -// -// .. [2] Wikipedia, "Logarithm". https://en.wikipedia.org/wiki/Logarithm -// -// Examples -// -------- -// >>> np.log([1, np.e, np.e**2, 0]) -// array([ 0., 1., 2., -Inf]) -// -//go:linkname Log py.log -func Log(__llgo_va_list ...interface{}) *py.Object - -// log10(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the base 10 logarithm of the input array, element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The logarithm to the base 10 of `x`, element-wise. NaNs are -// returned where x is negative. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// emath.log10 -// -// Notes -// ----- -// Logarithm is a multivalued function: for each `x` there is an infinite -// number of `z` such that `10**z = x`. The convention is to return the -// `z` whose imaginary part lies in `(-pi, pi]`. -// -// For real-valued input data types, `log10` always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `log10` is a complex analytical function that -// has a branch cut `[-inf, 0]` and is continuous from above on it. -// `log10` handles the floating-point negative zero as an infinitesimal -// negative number, conforming to the C99 standard. -// -// In the cases where the input has a negative real part and a very small -// negative complex part (approaching 0), the result is so close to `-pi` -// that it evaluates to exactly `-pi`. -// -// References -// ---------- -// .. [1] M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// -// 10th printing, 1964, pp. 67. -// https://personal.math.ubc.ca/~cbm/aands/page_67.htm -// -// .. [2] Wikipedia, "Logarithm". https://en.wikipedia.org/wiki/Logarithm -// -// Examples -// -------- -// >>> np.log10([1e-15, -3.]) -// array([-15., nan]) -// -//go:linkname Log10 py.log10 -func Log10(__llgo_va_list ...interface{}) *py.Object - -// log1p(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the natural logarithm of one plus the input array, element-wise. -// -// Calculates “log(1 + x)“. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// Natural logarithm of `1 + x`, element-wise. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// expm1 : “exp(x) - 1“, the inverse of `log1p`. -// -// Notes -// ----- -// For real-valued input, `log1p` is accurate also for `x` so small -// that `1 + x == 1` in floating-point accuracy. -// -// Logarithm is a multivalued function: for each `x` there is an infinite -// number of `z` such that `exp(z) = 1 + x`. The convention is to return -// the `z` whose imaginary part lies in `[-pi, pi]`. -// -// For real-valued input data types, `log1p` always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `log1p` is a complex analytical function that -// has a branch cut `[-inf, -1]` and is continuous from above on it. -// `log1p` handles the floating-point negative zero as an infinitesimal -// negative number, conforming to the C99 standard. -// -// References -// ---------- -// .. [1] M. Abramowitz and I.A. Stegun, "Handbook of Mathematical Functions", -// -// 10th printing, 1964, pp. 67. -// https://personal.math.ubc.ca/~cbm/aands/page_67.htm -// -// .. [2] Wikipedia, "Logarithm". https://en.wikipedia.org/wiki/Logarithm -// -// Examples -// -------- -// >>> np.log1p(1e-99) -// 1e-99 -// >>> np.log(1 + 1e-99) -// 0.0 -// -//go:linkname Log1p py.log1p -func Log1p(__llgo_va_list ...interface{}) *py.Object - -// log2(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Base-2 logarithm of `x`. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// Base-2 logarithm of `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// log, log10, log1p, emath.log2 -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// Logarithm is a multivalued function: for each `x` there is an infinite -// number of `z` such that `2**z = x`. The convention is to return the `z` -// whose imaginary part lies in `(-pi, pi]`. -// -// For real-valued input data types, `log2` always returns real output. -// For each value that cannot be expressed as a real number or infinity, -// it yields “nan“ and sets the `invalid` floating point error flag. -// -// For complex-valued input, `log2` is a complex analytical function that -// has a branch cut `[-inf, 0]` and is continuous from above on it. `log2` -// handles the floating-point negative zero as an infinitesimal negative -// number, conforming to the C99 standard. -// -// In the cases where the input has a negative real part and a very small -// negative complex part (approaching 0), the result is so close to `-pi` -// that it evaluates to exactly `-pi`. -// -// Examples -// -------- -// >>> x = np.array([0, 1, 2, 2**4]) -// >>> np.log2(x) -// array([-Inf, 0., 1., 4.]) -// -// >>> xi = np.array([0+1.j, 1, 2+0.j, 4.j]) -// >>> np.log2(xi) -// array([ 0.+2.26618007j, 0.+0.j , 1.+0.j , 2.+2.26618007j]) -// -//go:linkname Log2 py.log2 -func Log2(__llgo_va_list ...interface{}) *py.Object - -// logaddexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Logarithm of the sum of exponentiations of the inputs. -// -// Calculates “log(exp(x1) + exp(x2))“. This function is useful in -// statistics where the calculated probabilities of events may be so small -// as to exceed the range of normal floating point numbers. In such cases -// the logarithm of the calculated probability is stored. This function -// allows adding probabilities stored in such a fashion. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input values. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// result : ndarray -// -// Logarithm of ``exp(x1) + exp(x2)``. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logaddexp2: Logarithm of the sum of exponentiations of inputs in base 2. -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// Examples -// -------- -// >>> prob1 = np.log(1e-50) -// >>> prob2 = np.log(2.5e-50) -// >>> prob12 = np.logaddexp(prob1, prob2) -// >>> prob12 -// -113.87649168120691 -// >>> np.exp(prob12) -// 3.5000000000000057e-50 -// -//go:linkname Logaddexp py.logaddexp -func Logaddexp(__llgo_va_list ...interface{}) *py.Object - -// logaddexp2(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Logarithm of the sum of exponentiations of the inputs in base-2. -// -// Calculates “log2(2**x1 + 2**x2)“. This function is useful in machine -// learning when the calculated probabilities of events may be so small as -// to exceed the range of normal floating point numbers. In such cases -// the base-2 logarithm of the calculated probability can be used instead. -// This function allows adding probabilities stored in such a fashion. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input values. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// result : ndarray -// -// Base-2 logarithm of ``2**x1 + 2**x2``. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logaddexp: Logarithm of the sum of exponentiations of the inputs. -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// Examples -// -------- -// >>> prob1 = np.log2(1e-50) -// >>> prob2 = np.log2(2.5e-50) -// >>> prob12 = np.logaddexp2(prob1, prob2) -// >>> prob1, prob2, prob12 -// (-166.09640474436813, -164.77447664948076, -164.28904982231052) -// >>> 2**prob12 -// 3.4999999999999914e-50 -// -//go:linkname Logaddexp2 py.logaddexp2 -func Logaddexp2(__llgo_va_list ...interface{}) *py.Object - -// logical_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the truth value of x1 AND x2 element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or bool -// -// Boolean result of the logical AND operation applied to the elements -// of `x1` and `x2`; the shape is determined by broadcasting. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logical_or, logical_not, logical_xor -// bitwise_and -// -// Examples -// -------- -// >>> np.logical_and(True, False) -// False -// >>> np.logical_and([True, False], [False, False]) -// array([False, False]) -// -// >>> x = np.arange(5) -// >>> np.logical_and(x>1, x<4) -// array([False, False, True, True, False]) -// -// The “&“ operator can be used as a shorthand for “np.logical_and“ on -// boolean ndarrays. -// -// >>> a = np.array([True, False]) -// >>> b = np.array([False, False]) -// >>> a & b -// array([False, False]) -// -//go:linkname LogicalAnd py.logical_and -func LogicalAnd(__llgo_va_list ...interface{}) *py.Object - -// logical_not(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the truth value of NOT x element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Logical NOT is applied to the elements of `x`. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : bool or ndarray of bool -// -// Boolean result with the same shape as `x` of the NOT operation -// on elements of `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// logical_and, logical_or, logical_xor -// -// Examples -// -------- -// >>> np.logical_not(3) -// False -// >>> np.logical_not([True, False, 0, 1]) -// array([False, True, True, False]) -// -// >>> x = np.arange(5) -// >>> np.logical_not(x<3) -// array([False, False, False, True, True]) -// -//go:linkname LogicalNot py.logical_not -func LogicalNot(__llgo_va_list ...interface{}) *py.Object - -// logical_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the truth value of x1 OR x2 element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Logical OR is applied to the elements of `x1` and `x2`. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or bool -// -// Boolean result of the logical OR operation applied to the elements -// of `x1` and `x2`; the shape is determined by broadcasting. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logical_and, logical_not, logical_xor -// bitwise_or -// -// Examples -// -------- -// >>> np.logical_or(True, False) -// True -// >>> np.logical_or([True, False], [False, False]) -// array([ True, False]) -// -// >>> x = np.arange(5) -// >>> np.logical_or(x < 1, x > 3) -// array([ True, False, False, False, True]) -// -// The “|“ operator can be used as a shorthand for “np.logical_or“ on -// boolean ndarrays. -// -// >>> a = np.array([True, False]) -// >>> b = np.array([False, False]) -// >>> a | b -// array([ True, False]) -// -//go:linkname LogicalOr py.logical_or -func LogicalOr(__llgo_va_list ...interface{}) *py.Object - -// logical_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute the truth value of x1 XOR x2, element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Logical XOR is applied to the elements of `x1` and `x2`. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : bool or ndarray of bool -// -// Boolean result of the logical XOR operation applied to the elements -// of `x1` and `x2`; the shape is determined by broadcasting. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// logical_and, logical_or, logical_not, bitwise_xor -// -// Examples -// -------- -// >>> np.logical_xor(True, False) -// True -// >>> np.logical_xor([True, True, False, False], [True, False, True, False]) -// array([False, True, True, False]) -// -// >>> x = np.arange(5) -// >>> np.logical_xor(x < 1, x > 3) -// array([ True, False, False, False, True]) -// -// # Simple example showing support of broadcasting -// -// >>> np.logical_xor(0, np.eye(2)) -// array([[ True, False], -// -// [False, True]]) -// -//go:linkname LogicalXor py.logical_xor -func LogicalXor(__llgo_va_list ...interface{}) *py.Object - -// maximum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Element-wise maximum of array elements. -// -// Compare two arrays and return a new array containing the element-wise -// maxima. If one of the elements being compared is a NaN, then that -// element is returned. If both elements are NaNs then the first is -// returned. The latter distinction is important for complex NaNs, which -// are defined as at least one of the real or imaginary parts being a NaN. -// The net effect is that NaNs are propagated. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// The arrays holding the elements to be compared. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The maximum of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// minimum : -// -// Element-wise minimum of two arrays, propagates NaNs. -// -// fmax : -// -// Element-wise maximum of two arrays, ignores NaNs. -// -// amax : -// -// The maximum value of an array along a given axis, propagates NaNs. -// -// nanmax : -// -// The maximum value of an array along a given axis, ignores NaNs. -// -// fmin, amin, nanmin -// -// Notes -// ----- -// The maximum is equivalent to “np.where(x1 >= x2, x1, x2)“ when -// neither x1 nor x2 are nans, but it is faster and does proper -// broadcasting. -// -// Examples -// -------- -// >>> np.maximum([2, 3, 4], [1, 5, 2]) -// array([2, 5, 4]) -// -// >>> np.maximum(np.eye(2), [0.5, 2]) # broadcasting -// array([[ 1. , 2. ], -// -// [ 0.5, 2. ]]) -// -// >>> np.maximum([np.nan, 0, np.nan], [0, np.nan, np.nan]) -// array([nan, nan, nan]) -// >>> np.maximum(np.Inf, 1) -// inf -// -//go:linkname Maximum py.maximum -func Maximum(__llgo_va_list ...interface{}) *py.Object - -// minimum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Element-wise minimum of array elements. -// -// Compare two arrays and return a new array containing the element-wise -// minima. If one of the elements being compared is a NaN, then that -// element is returned. If both elements are NaNs then the first is -// returned. The latter distinction is important for complex NaNs, which -// are defined as at least one of the real or imaginary parts being a NaN. -// The net effect is that NaNs are propagated. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// The arrays holding the elements to be compared. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The minimum of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// maximum : -// -// Element-wise maximum of two arrays, propagates NaNs. -// -// fmin : -// -// Element-wise minimum of two arrays, ignores NaNs. -// -// amin : -// -// The minimum value of an array along a given axis, propagates NaNs. -// -// nanmin : -// -// The minimum value of an array along a given axis, ignores NaNs. -// -// fmax, amax, nanmax -// -// Notes -// ----- -// The minimum is equivalent to “np.where(x1 <= x2, x1, x2)“ when -// neither x1 nor x2 are NaNs, but it is faster and does proper -// broadcasting. -// -// Examples -// -------- -// >>> np.minimum([2, 3, 4], [1, 5, 2]) -// array([1, 3, 2]) -// -// >>> np.minimum(np.eye(2), [0.5, 2]) # broadcasting -// array([[ 0.5, 0. ], -// -// [ 0. , 1. ]]) -// -// >>> np.minimum([np.nan, 0, np.nan],[0, np.nan, np.nan]) -// array([nan, nan, nan]) -// >>> np.minimum(-np.Inf, 1) -// -inf -// -//go:linkname Minimum py.minimum -func Minimum(__llgo_va_list ...interface{}) *py.Object - -// remainder(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns the element-wise remainder of division. -// -// Computes the remainder complementary to the `floor_divide` function. It is -// equivalent to the Python modulus operator“x1 % x2“ and has the same sign -// as the divisor `x2`. The MATLAB function equivalent to “np.remainder“ -// is “mod“. -// -// .. warning:: -// -// This should not be confused with: -// -// * Python 3.7's `math.remainder` and C's ``remainder``, which -// computes the IEEE remainder, which are the complement to -// ``round(x1 / x2)``. -// * The MATLAB ``rem`` function and or the C ``%`` operator which is the -// complement to ``int(x1 / x2)``. -// -// Parameters -// ---------- -// x1 : array_like -// -// Dividend array. -// -// x2 : array_like -// -// Divisor array. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The element-wise remainder of the quotient ``floor_divide(x1, x2)``. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// floor_divide : Equivalent of Python “//“ operator. -// divmod : Simultaneous floor division and remainder. -// fmod : Equivalent of the MATLAB “rem“ function. -// divide, floor -// -// Notes -// ----- -// Returns 0 when `x2` is 0 and both `x1` and `x2` are (arrays of) -// integers. -// “mod“ is an alias of “remainder“. -// -// Examples -// -------- -// >>> np.remainder([4, 7], [2, 3]) -// array([0, 1]) -// >>> np.remainder(np.arange(7), 5) -// array([0, 1, 2, 3, 4, 0, 1]) -// -// The “%“ operator can be used as a shorthand for “np.remainder“ on -// ndarrays. -// -// >>> x1 = np.arange(7) -// >>> x1 % 5 -// array([0, 1, 2, 3, 4, 0, 1]) -// -//go:linkname Mod py.mod -func Mod(__llgo_va_list ...interface{}) *py.Object - -// modf(x[, out1, out2], / [, out=(None, None)], *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the fractional and integral parts of an array, element-wise. -// -// The fractional and integral parts are negative if the given number is -// negative. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y1 : ndarray -// -// Fractional part of `x`. -// This is a scalar if `x` is a scalar. -// -// y2 : ndarray -// -// Integral part of `x`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// For integer input the return values are floats. -// -// See Also -// -------- -// divmod : “divmod(x, 1)“ is equivalent to “modf“ with the return values -// -// switched, except it always has a positive remainder. -// -// Examples -// -------- -// >>> np.modf([0, 3.5]) -// (array([ 0. , 0.5]), array([ 0., 3.])) -// >>> np.modf(-0.5) -// (-0.5, -0) -// -//go:linkname Modf py.modf -func Modf(__llgo_va_list ...interface{}) *py.Object - -// multiply(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Multiply arguments element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays to be multiplied. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The product of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// Notes -// ----- -// Equivalent to `x1` * `x2` in terms of array broadcasting. -// -// Examples -// -------- -// >>> np.multiply(2.0, 4.0) -// 8.0 -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> np.multiply(x1, x2) -// array([[ 0., 1., 4.], -// -// [ 0., 4., 10.], -// [ 0., 7., 16.]]) -// -// The “*“ operator can be used as a shorthand for “np.multiply“ on -// ndarrays. -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> x1 * x2 -// array([[ 0., 1., 4.], -// -// [ 0., 4., 10.], -// [ 0., 7., 16.]]) -// -//go:linkname Multiply py.multiply -func Multiply(__llgo_va_list ...interface{}) *py.Object - -// negative(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Numerical negative, element-wise. -// -// Parameters -// ---------- -// x : array_like or scalar -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// Returned array or scalar: `y = -x`. -// This is a scalar if `x` is a scalar. -// -// Examples -// -------- -// >>> np.negative([1.,-1.]) -// array([-1., 1.]) -// -// The unary “-“ operator can be used as a shorthand for “np.negative“ on -// ndarrays. -// -// >>> x1 = np.array(([1., -1.])) -// >>> -x1 -// array([-1., 1.]) -// -//go:linkname Negative py.negative -func Negative(__llgo_va_list ...interface{}) *py.Object - -// nextafter(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the next floating-point value after x1 towards x2, element-wise. -// -// Parameters -// ---------- -// x1 : array_like -// -// Values to find the next representable value of. -// -// x2 : array_like -// -// The direction where to look for the next representable value of `x1`. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// The next representable values of `x1` in the direction of `x2`. -// This is a scalar if both `x1` and `x2` are scalars. -// -// Examples -// -------- -// >>> eps = np.finfo(np.float64).eps -// >>> np.nextafter(1, 2) == eps + 1 -// True -// >>> np.nextafter([1, 2], [2, 1]) == [eps + 1, 2 - eps] -// array([ True, True]) -// -//go:linkname Nextafter py.nextafter -func Nextafter(__llgo_va_list ...interface{}) *py.Object - -// not_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return (x1 != x2) element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// Input arrays. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array, element-wise comparison of `x1` and `x2`. -// Typically of type bool, unless ``dtype=object`` is passed. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// equal, greater, greater_equal, less, less_equal -// -// Examples -// -------- -// >>> np.not_equal([1.,2.], [1., 3.]) -// array([False, True]) -// >>> np.not_equal([1, 2], [[1, 3],[1, 4]]) -// array([[False, True], -// -// [False, True]]) -// -// The “!=“ operator can be used as a shorthand for “np.not_equal“ on -// ndarrays. -// -// >>> a = np.array([1., 2.]) -// >>> b = np.array([1., 3.]) -// >>> a != b -// array([False, True]) -// -//go:linkname NotEqual py.not_equal -func NotEqual(__llgo_va_list ...interface{}) *py.Object - -// positive(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Numerical positive, element-wise. -// -// .. versionadded:: 1.13.0 -// -// Parameters -// ---------- -// x : array_like or scalar -// -// Input array. -// -// Returns -// ------- -// y : ndarray or scalar -// -// Returned array or scalar: `y = +x`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// Equivalent to `x.copy()`, but only defined for types that support -// arithmetic. -// -// Examples -// -------- -// -// >>> x1 = np.array(([1., -1.])) -// >>> np.positive(x1) -// array([ 1., -1.]) -// -// The unary “+“ operator can be used as a shorthand for “np.positive“ on -// ndarrays. -// -// >>> x1 = np.array(([1., -1.])) -// >>> +x1 -// array([ 1., -1.]) -// -//go:linkname Positive py.positive -func Positive(__llgo_va_list ...interface{}) *py.Object - -// power(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// First array elements raised to powers from second array, element-wise. -// -// Raise each base in `x1` to the positionally-corresponding power in -// `x2`. `x1` and `x2` must be broadcastable to the same shape. -// -// An integer type raised to a negative integer power will raise a -// “ValueError“. -// -// Negative values raised to a non-integral value will return “nan“. -// To get complex results, cast the input to complex, or specify the -// “dtype“ to be “complex“ (see the example below). -// -// Parameters -// ---------- -// x1 : array_like -// -// The bases. -// -// x2 : array_like -// -// The exponents. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The bases in `x1` raised to the exponents in `x2`. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// float_power : power function that promotes integers to float -// -// Examples -// -------- -// Cube each element in an array. -// -// >>> x1 = np.arange(6) -// >>> x1 -// [0, 1, 2, 3, 4, 5] -// >>> np.power(x1, 3) -// array([ 0, 1, 8, 27, 64, 125]) -// -// Raise the bases to different exponents. -// -// >>> x2 = [1.0, 2.0, 3.0, 3.0, 2.0, 1.0] -// >>> np.power(x1, x2) -// array([ 0., 1., 8., 27., 16., 5.]) -// -// The effect of broadcasting. -// -// >>> x2 = np.array([[1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1]]) -// >>> x2 -// array([[1, 2, 3, 3, 2, 1], -// -// [1, 2, 3, 3, 2, 1]]) -// -// >>> np.power(x1, x2) -// array([[ 0, 1, 8, 27, 16, 5], -// -// [ 0, 1, 8, 27, 16, 5]]) -// -// The “**“ operator can be used as a shorthand for “np.power“ on -// ndarrays. -// -// >>> x2 = np.array([1, 2, 3, 3, 2, 1]) -// >>> x1 = np.arange(6) -// >>> x1 ** x2 -// array([ 0, 1, 8, 27, 16, 5]) -// -// Negative values raised to a non-integral value will result in “nan“ -// (and a warning will be generated). -// -// >>> x3 = np.array([-1.0, -4.0]) -// >>> with np.errstate(invalid='ignore'): -// ... p = np.power(x3, 1.5) -// ... -// >>> p -// array([nan, nan]) -// -// To get complex results, give the argument “dtype=complex“. -// -// >>> np.power(x3, 1.5, dtype=complex) -// array([-1.83697020e-16-1.j, -1.46957616e-15-8.j]) -// -//go:linkname Power py.power -func Power(__llgo_va_list ...interface{}) *py.Object - -// rad2deg(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Convert angles from radians to degrees. -// -// Parameters -// ---------- -// x : array_like -// -// Angle in radians. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding angle in degrees. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// deg2rad : Convert angles from degrees to radians. -// unwrap : Remove large jumps in angle by wrapping. -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// rad2deg(x) is “180 * x / pi“. -// -// Examples -// -------- -// >>> np.rad2deg(np.pi/2) -// 90.0 -// -//go:linkname Rad2deg py.rad2deg -func Rad2deg(__llgo_va_list ...interface{}) *py.Object - -// radians(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Convert angles from degrees to radians. -// -// Parameters -// ---------- -// x : array_like -// -// Input array in degrees. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding radian values. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// deg2rad : equivalent function -// -// Examples -// -------- -// Convert a degree array to radians -// -// >>> deg = np.arange(12.) * 30. -// >>> np.radians(deg) -// array([ 0. , 0.52359878, 1.04719755, 1.57079633, 2.0943951 , -// -// 2.61799388, 3.14159265, 3.66519143, 4.1887902 , 4.71238898, -// 5.23598776, 5.75958653]) -// -// >>> out = np.zeros((deg.shape)) -// >>> ret = np.radians(deg, out) -// >>> ret is out -// True -// -//go:linkname Radians py.radians -func Radians(__llgo_va_list ...interface{}) *py.Object - -// reciprocal(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the reciprocal of the argument, element-wise. -// -// Calculates “1/x“. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// Return array. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// .. note:: -// -// This function is not designed to work with integers. -// -// For integer arguments with absolute value larger than 1 the result is -// always zero because of the way Python handles integer division. For -// integer zero the result is an overflow. -// -// Examples -// -------- -// >>> np.reciprocal(2.) -// 0.5 -// >>> np.reciprocal([1, 2., 3.33]) -// array([ 1. , 0.5 , 0.3003003]) -// -//go:linkname Reciprocal py.reciprocal -func Reciprocal(__llgo_va_list ...interface{}) *py.Object - -// remainder(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns the element-wise remainder of division. -// -// Computes the remainder complementary to the `floor_divide` function. It is -// equivalent to the Python modulus operator“x1 % x2“ and has the same sign -// as the divisor `x2`. The MATLAB function equivalent to “np.remainder“ -// is “mod“. -// -// .. warning:: -// -// This should not be confused with: -// -// * Python 3.7's `math.remainder` and C's ``remainder``, which -// computes the IEEE remainder, which are the complement to -// ``round(x1 / x2)``. -// * The MATLAB ``rem`` function and or the C ``%`` operator which is the -// complement to ``int(x1 / x2)``. -// -// Parameters -// ---------- -// x1 : array_like -// -// Dividend array. -// -// x2 : array_like -// -// Divisor array. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The element-wise remainder of the quotient ``floor_divide(x1, x2)``. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// floor_divide : Equivalent of Python “//“ operator. -// divmod : Simultaneous floor division and remainder. -// fmod : Equivalent of the MATLAB “rem“ function. -// divide, floor -// -// Notes -// ----- -// Returns 0 when `x2` is 0 and both `x1` and `x2` are (arrays of) -// integers. -// “mod“ is an alias of “remainder“. -// -// Examples -// -------- -// >>> np.remainder([4, 7], [2, 3]) -// array([0, 1]) -// >>> np.remainder(np.arange(7), 5) -// array([0, 1, 2, 3, 4, 0, 1]) -// -// The “%“ operator can be used as a shorthand for “np.remainder“ on -// ndarrays. -// -// >>> x1 = np.arange(7) -// >>> x1 % 5 -// array([0, 1, 2, 3, 4, 0, 1]) -// -//go:linkname Remainder py.remainder -func Remainder(__llgo_va_list ...interface{}) *py.Object - -// right_shift(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Shift the bits of an integer to the right. -// -// Bits are shifted to the right `x2`. Because the internal -// representation of numbers is in binary format, this operation is -// equivalent to dividing `x1` by “2**x2“. -// -// Parameters -// ---------- -// x1 : array_like, int -// -// Input values. -// -// x2 : array_like, int -// -// Number of bits to remove at the right of `x1`. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray, int -// -// Return `x1` with bits shifted `x2` times to the right. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// left_shift : Shift the bits of an integer to the left. -// binary_repr : Return the binary representation of the input number -// -// as a string. -// -// Examples -// -------- -// >>> np.binary_repr(10) -// '1010' -// >>> np.right_shift(10, 1) -// 5 -// >>> np.binary_repr(5) -// '101' -// -// >>> np.right_shift(10, [1,2,3]) -// array([5, 2, 1]) -// -// The “>>“ operator can be used as a shorthand for “np.right_shift“ on -// ndarrays. -// -// >>> x1 = 10 -// >>> x2 = np.array([1,2,3]) -// >>> x1 >> x2 -// array([5, 2, 1]) -// -//go:linkname RightShift py.right_shift -func RightShift(__llgo_va_list ...interface{}) *py.Object - -// rint(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Round elements of the array to the nearest integer. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Output array is same shape and type as `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// fix, ceil, floor, trunc -// -// Notes -// ----- -// For values exactly halfway between rounded decimal values, NumPy -// rounds to the nearest even value. Thus 1.5 and 2.5 round to 2.0, -// -0.5 and 0.5 round to 0.0, etc. -// -// Examples -// -------- -// >>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]) -// >>> np.rint(a) -// array([-2., -2., -0., 0., 2., 2., 2.]) -// -//go:linkname Rint py.rint -func Rint(__llgo_va_list ...interface{}) *py.Object - -// sign(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns an element-wise indication of the sign of a number. -// -// The `sign` function returns “-1 if x < 0, 0 if x==0, 1 if x > 0“. nan -// is returned for nan inputs. -// -// For complex inputs, the `sign` function returns -// “sign(x.real) + 0j if x.real != 0 else sign(x.imag) + 0j“. -// -// complex(nan, 0) is returned for complex nan inputs. -// -// Parameters -// ---------- -// x : array_like -// -// Input values. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The sign of `x`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// There is more than one definition of sign in common use for complex -// numbers. The definition used here is equivalent to :math:`x/\sqrt{x*x}` -// which is different from a common alternative, :math:`x/|x|`. -// -// Examples -// -------- -// >>> np.sign([-5., 4.5]) -// array([-1., 1.]) -// >>> np.sign(0) -// 0 -// >>> np.sign(5-2j) -// (1+0j) -// -//go:linkname Sign py.sign -func Sign(__llgo_va_list ...interface{}) *py.Object - -// signbit(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Returns element-wise True where signbit is set (less than zero). -// -// Parameters -// ---------- -// x : array_like -// -// The input value(s). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// result : ndarray of bool -// -// Output array, or reference to `out` if that was supplied. -// This is a scalar if `x` is a scalar. -// -// Examples -// -------- -// >>> np.signbit(-1.2) -// True -// >>> np.signbit(np.array([1, -2.3, 2.1])) -// array([False, True, False]) -// -//go:linkname Signbit py.signbit -func Signbit(__llgo_va_list ...interface{}) *py.Object - -// sin(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Trigonometric sine, element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Angle, in radians (:math:`2 \pi` rad equals 360 degrees). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : array_like -// -// The sine of each element of x. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// arcsin, sinh, cos -// -// Notes -// ----- -// The sine is one of the fundamental functions of trigonometry (the -// mathematical study of triangles). Consider a circle of radius 1 -// centered on the origin. A ray comes in from the :math:`+x` axis, makes -// an angle at the origin (measured counter-clockwise from that axis), and -// departs from the origin. The :math:`y` coordinate of the outgoing -// ray's intersection with the unit circle is the sine of that angle. It -// ranges from -1 for :math:`x=3\pi / 2` to +1 for :math:`\pi / 2.` The -// function has zeroes where the angle is a multiple of :math:`\pi`. -// Sines of angles between :math:`\pi` and :math:`2\pi` are negative. -// The numerous properties of the sine and related functions are included -// in any standard trigonometry text. -// -// Examples -// -------- -// Print sine of one angle: -// -// >>> np.sin(np.pi/2.) -// 1.0 -// -// Print sines of an array of angles given in degrees: -// -// >>> np.sin(np.array((0., 30., 45., 60., 90.)) * np.pi / 180. ) -// array([ 0. , 0.5 , 0.70710678, 0.8660254 , 1. ]) -// -// Plot the sine function: -// -// >>> import matplotlib.pylab as plt -// >>> x = np.linspace(-np.pi, np.pi, 201) -// >>> plt.plot(x, np.sin(x)) -// >>> plt.xlabel('Angle [rad]') -// >>> plt.ylabel('sin(x)') -// >>> plt.axis('tight') -// >>> plt.show() -// -//go:linkname Sin py.sin -func Sin(__llgo_va_list ...interface{}) *py.Object - -// sinh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Hyperbolic sine, element-wise. -// -// Equivalent to “1/2 * (np.exp(x) - np.exp(-x))“ or -// “-1j * np.sin(1j*x)“. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding hyperbolic sine values. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// If `out` is provided, the function writes the result into it, -// and returns a reference to `out`. (See Examples) -// -// References -// ---------- -// M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions. -// New York, NY: Dover, 1972, pg. 83. -// -// Examples -// -------- -// >>> np.sinh(0) -// 0.0 -// >>> np.sinh(np.pi*1j/2) -// 1j -// >>> np.sinh(np.pi*1j) # (exact value is 0) -// 1.2246063538223773e-016j -// >>> # Discrepancy due to vagaries of floating point arithmetic. -// -// >>> # Example of providing the optional output parameter -// >>> out1 = np.array([0], dtype='d') -// >>> out2 = np.sinh([0.1], out1) -// >>> out2 is out1 -// True -// -// >>> # Example of ValueError due to provision of shape mis-matched `out` -// >>> np.sinh(np.zeros((3,3)),np.zeros((2,2))) -// Traceback (most recent call last): -// -// File "", line 1, in -// -// ValueError: operands could not be broadcast together with shapes (3,3) (2,2) -// -//go:linkname Sinh py.sinh -func Sinh(__llgo_va_list ...interface{}) *py.Object - -// spacing(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the distance between x and the nearest adjacent number. -// -// Parameters -// ---------- -// x : array_like -// -// Values to find the spacing of. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// The spacing of values of `x`. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// It can be considered as a generalization of EPS: -// “spacing(np.float64(1)) == np.finfo(np.float64).eps“, and there -// should not be any representable number between “x + spacing(x)“ and -// x for any finite x. -// -// Spacing of +- inf and NaN is NaN. -// -// Examples -// -------- -// >>> np.spacing(1) == np.finfo(np.float64).eps -// True -// -//go:linkname Spacing py.spacing -func Spacing(__llgo_va_list ...interface{}) *py.Object - -// sqrt(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the non-negative square-root of an array, element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// The values whose square-roots are required. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// An array of the same shape as `x`, containing the positive -// square-root of each element in `x`. If any element in `x` is -// complex, a complex array is returned (and the square-roots of -// negative reals are calculated). If all of the elements in `x` -// are real, so is `y`, with negative elements returning ``nan``. -// If `out` was provided, `y` is a reference to it. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// emath.sqrt -// -// A version which returns complex numbers when given negative reals. -// Note that 0.0 and -0.0 are handled differently for complex inputs. -// -// Notes -// ----- -// *sqrt* has--consistent with common convention--as its branch cut the -// real "interval" [`-inf`, 0), and is continuous from above on it. -// A branch cut is a curve in the complex plane across which a given -// complex function fails to be continuous. -// -// Examples -// -------- -// >>> np.sqrt([1,4,9]) -// array([ 1., 2., 3.]) -// -// >>> np.sqrt([4, -1, -3+4J]) -// array([ 2.+0.j, 0.+1.j, 1.+2.j]) -// -// >>> np.sqrt([4, -1, np.inf]) -// array([ 2., nan, inf]) -// -//go:linkname Sqrt py.sqrt -func Sqrt(__llgo_va_list ...interface{}) *py.Object - -// square(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the element-wise square of the input. -// -// Parameters -// ---------- -// x : array_like -// -// Input data. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// out : ndarray or scalar -// -// Element-wise `x*x`, of the same shape and dtype as `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// numpy.linalg.matrix_power -// sqrt -// power -// -// Examples -// -------- -// >>> np.square([-1j, 1]) -// array([-1.-0.j, 1.+0.j]) -// -//go:linkname Square py.square -func Square(__llgo_va_list ...interface{}) *py.Object - -// subtract(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Subtract arguments, element-wise. -// -// Parameters -// ---------- -// x1, x2 : array_like -// -// The arrays to be subtracted from each other. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The difference of `x1` and `x2`, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// Notes -// ----- -// Equivalent to “x1 - x2“ in terms of array broadcasting. -// -// Examples -// -------- -// >>> np.subtract(1.0, 4.0) -// -3.0 -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> np.subtract(x1, x2) -// array([[ 0., 0., 0.], -// -// [ 3., 3., 3.], -// [ 6., 6., 6.]]) -// -// The “-“ operator can be used as a shorthand for “np.subtract“ on -// ndarrays. -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> x1 - x2 -// array([[0., 0., 0.], -// -// [3., 3., 3.], -// [6., 6., 6.]]) -// -//go:linkname Subtract py.subtract -func Subtract(__llgo_va_list ...interface{}) *py.Object - -// tan(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute tangent element-wise. -// -// Equivalent to “np.sin(x)/np.cos(x)“ element-wise. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding tangent values. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// If `out` is provided, the function writes the result into it, -// and returns a reference to `out`. (See Examples) -// -// References -// ---------- -// M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions. -// New York, NY: Dover, 1972. -// -// Examples -// -------- -// >>> from math import pi -// >>> np.tan(np.array([-pi,pi/2,pi])) -// array([ 1.22460635e-16, 1.63317787e+16, -1.22460635e-16]) -// >>> -// >>> # Example of providing the optional output parameter illustrating -// >>> # that what is returned is a reference to said parameter -// >>> out1 = np.array([0], dtype='d') -// >>> out2 = np.cos([0.1], out1) -// >>> out2 is out1 -// True -// >>> -// >>> # Example of ValueError due to provision of shape mis-matched `out` -// >>> np.cos(np.zeros((3,3)),np.zeros((2,2))) -// Traceback (most recent call last): -// -// File "", line 1, in -// -// ValueError: operands could not be broadcast together with shapes (3,3) (2,2) -// -//go:linkname Tan py.tan -func Tan(__llgo_va_list ...interface{}) *py.Object - -// tanh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Compute hyperbolic tangent element-wise. -// -// Equivalent to “np.sinh(x)/np.cosh(x)“ or “-1j * np.tan(1j*x)“. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray -// -// The corresponding hyperbolic tangent values. -// This is a scalar if `x` is a scalar. -// -// Notes -// ----- -// If `out` is provided, the function writes the result into it, -// and returns a reference to `out`. (See Examples) -// -// References -// ---------- -// .. [1] M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions. -// -// New York, NY: Dover, 1972, pg. 83. -// https://personal.math.ubc.ca/~cbm/aands/page_83.htm -// -// .. [2] Wikipedia, "Hyperbolic function", -// -// https://en.wikipedia.org/wiki/Hyperbolic_function -// -// Examples -// -------- -// >>> np.tanh((0, np.pi*1j, np.pi*1j/2)) -// array([ 0. +0.00000000e+00j, 0. -1.22460635e-16j, 0. +1.63317787e+16j]) -// -// >>> # Example of providing the optional output parameter illustrating -// >>> # that what is returned is a reference to said parameter -// >>> out1 = np.array([0], dtype='d') -// >>> out2 = np.tanh([0.1], out1) -// >>> out2 is out1 -// True -// -// >>> # Example of ValueError due to provision of shape mis-matched `out` -// >>> np.tanh(np.zeros((3,3)),np.zeros((2,2))) -// Traceback (most recent call last): -// -// File "", line 1, in -// -// ValueError: operands could not be broadcast together with shapes (3,3) (2,2) -// -//go:linkname Tanh py.tanh -func Tanh(__llgo_va_list ...interface{}) *py.Object - -// divide(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Divide arguments element-wise. -// -// Parameters -// ---------- -// x1 : array_like -// -// Dividend array. -// -// x2 : array_like -// -// Divisor array. -// If ``x1.shape != x2.shape``, they must be broadcastable to a common -// shape (which becomes the shape of the output). -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The quotient ``x1/x2``, element-wise. -// This is a scalar if both `x1` and `x2` are scalars. -// -// See Also -// -------- -// seterr : Set whether to raise or warn on overflow, underflow and -// -// division by zero. -// -// Notes -// ----- -// Equivalent to “x1“ / “x2“ in terms of array-broadcasting. -// -// The “true_divide(x1, x2)“ function is an alias for -// “divide(x1, x2)“. -// -// Examples -// -------- -// >>> np.divide(2.0, 4.0) -// 0.5 -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = np.arange(3.0) -// >>> np.divide(x1, x2) -// array([[nan, 1. , 1. ], -// -// [inf, 4. , 2.5], -// [inf, 7. , 4. ]]) -// -// The “/“ operator can be used as a shorthand for “np.divide“ on -// ndarrays. -// -// >>> x1 = np.arange(9.0).reshape((3, 3)) -// >>> x2 = 2 * np.ones(3) -// >>> x1 / x2 -// array([[0. , 0.5, 1. ], -// -// [1.5, 2. , 2.5], -// [3. , 3.5, 4. ]]) -// -//go:linkname TrueDivide py.true_divide -func TrueDivide(__llgo_va_list ...interface{}) *py.Object - -// trunc(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Return the truncated value of the input, element-wise. -// -// The truncated value of the scalar `x` is the nearest integer `i` which -// is closer to zero than `x` is. In short, the fractional part of the -// signed number `x` is discarded. -// -// Parameters -// ---------- -// x : array_like -// -// Input data. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// y : ndarray or scalar -// -// The truncated value of each element in `x`. -// This is a scalar if `x` is a scalar. -// -// See Also -// -------- -// ceil, floor, rint, fix -// -// Notes -// ----- -// .. versionadded:: 1.3.0 -// -// Examples -// -------- -// >>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]) -// >>> np.trunc(a) -// array([-1., -1., -0., 0., 1., 1., 2.]) -// -//go:linkname Trunc py.trunc -func Trunc(__llgo_va_list ...interface{}) *py.Object - -// Return the scalar dtype or NumPy equivalent of Python type of an object. -// -// Parameters -// ---------- -// rep : any -// -// The object of which the type is returned. -// -// default : any, optional -// -// If given, this is returned for objects whose types can not be -// determined. If not given, None is returned for those objects. -// -// Returns -// ------- -// dtype : dtype or Python type -// -// The data type of `rep`. -// -// See Also -// -------- -// sctype2char, issctype, issubsctype, issubdtype, maximum_sctype -// -// Examples -// -------- -// >>> np.obj2sctype(np.int32) -// -// >>> np.obj2sctype(np.array([1., 2.])) -// -// >>> np.obj2sctype(np.array([1.j])) -// -// -// >>> np.obj2sctype(dict) -// -// >>> np.obj2sctype('string') -// -// >>> np.obj2sctype(1, default=list) -// -// -//go:linkname Obj2sctype py.obj2sctype -func Obj2sctype(rep *py.Object, default_ *py.Object) *py.Object - -// Return the string representation of a scalar dtype. -// -// Parameters -// ---------- -// sctype : scalar dtype or object -// -// If a scalar dtype, the corresponding string character is -// returned. If an object, `sctype2char` tries to infer its scalar type -// and then return the corresponding string character. -// -// Returns -// ------- -// typechar : str -// -// The string character corresponding to the scalar type. -// -// Raises -// ------ -// ValueError -// -// If `sctype` is an object for which the type can not be inferred. -// -// See Also -// -------- -// obj2sctype, issctype, issubsctype, mintypecode -// -// Examples -// -------- -// >>> for sctype in [np.int32, np.double, np.complex_, np.string_, np.ndarray]: -// ... print(np.sctype2char(sctype)) -// l # may vary -// d -// D -// S -// O -// -// >>> x = np.array([1., 2-1.j]) -// >>> np.sctype2char(x) -// 'D' -// >>> np.sctype2char(list) -// 'O' -// -//go:linkname Sctype2char py.sctype2char -func Sctype2char(sctype *py.Object) *py.Object - -// Return the scalar type of highest precision of the same kind as the input. -// -// Parameters -// ---------- -// t : dtype or dtype specifier -// -// The input data type. This can be a `dtype` object or an object that -// is convertible to a `dtype`. -// -// Returns -// ------- -// out : dtype -// -// The highest precision data type of the same kind (`dtype.kind`) as `t`. -// -// See Also -// -------- -// obj2sctype, mintypecode, sctype2char -// dtype -// -// Examples -// -------- -// >>> np.maximum_sctype(int) -// -// >>> np.maximum_sctype(np.uint8) -// -// >>> np.maximum_sctype(complex) -// # may vary -// -// >>> np.maximum_sctype(str) -// -// -// >>> np.maximum_sctype('i2') -// -// >>> np.maximum_sctype('f4') -// # may vary -// -//go:linkname MaximumSctype py.maximum_sctype -func MaximumSctype(t *py.Object) *py.Object - -// Determines whether the given object represents a scalar data-type. -// -// Parameters -// ---------- -// rep : any -// -// If `rep` is an instance of a scalar dtype, True is returned. If not, -// False is returned. -// -// Returns -// ------- -// out : bool -// -// Boolean result of check whether `rep` is a scalar dtype. -// -// See Also -// -------- -// issubsctype, issubdtype, obj2sctype, sctype2char -// -// Examples -// -------- -// >>> np.issctype(np.int32) -// True -// >>> np.issctype(list) -// False -// >>> np.issctype(1.1) -// False -// -// Strings are also a scalar type: -// -// >>> np.issctype(np.dtype('str')) -// True -// -//go:linkname Issctype py.issctype -func Issctype(rep *py.Object) *py.Object - -// Determine common type following standard coercion rules. -// -// .. deprecated:: NumPy 1.25 -// -// This function is deprecated, use `numpy.promote_types` or -// `numpy.result_type` instead. To achieve semantics for the -// `scalar_types` argument, use `numpy.result_type` and pass the Python -// values `0`, `0.0`, or `0j`. -// This will give the same results in almost all cases. -// More information and rare exception can be found in the -// `NumPy 1.25 release notes `_. -// -// Parameters -// ---------- -// array_types : sequence -// -// A list of dtypes or dtype convertible objects representing arrays. -// -// scalar_types : sequence -// -// A list of dtypes or dtype convertible objects representing scalars. -// -// Returns -// ------- -// datatype : dtype -// -// The common data type, which is the maximum of `array_types` ignoring -// `scalar_types`, unless the maximum of `scalar_types` is of a -// different kind (`dtype.kind`). If the kind is not understood, then -// None is returned. -// -// See Also -// -------- -// dtype, common_type, can_cast, mintypecode -// -// Examples -// -------- -// >>> np.find_common_type([], [np.int64, np.float32, complex]) -// dtype('complex128') -// >>> np.find_common_type([np.int64, np.float32], []) -// dtype('float64') -// -// The standard casting rules ensure that a scalar cannot up-cast an -// array unless the scalar is of a fundamentally different kind of data -// (i.e. under a different hierarchy in the data type hierarchy) then -// the array: -// -// >>> np.find_common_type([np.float32], [np.int64, np.float64]) -// dtype('float32') -// -// Complex is of a different type, so it up-casts the float in the -// `array_types` argument: -// -// >>> np.find_common_type([np.float32], [complex]) -// dtype('complex128') -// -// Type specifier strings are convertible to dtypes and can therefore -// be used instead of dtypes: -// -// >>> np.find_common_type(['f4', 'f4', 'i4'], ['c8']) -// dtype('complex128') -// -//go:linkname FindCommonType py.find_common_type -func FindCommonType(arrayTypes *py.Object, scalarTypes *py.Object) *py.Object - -// Returns True if first argument is a typecode lower/equal in type hierarchy. -// -// This is like the builtin :func:`issubclass`, but for `dtype`\ s. -// -// Parameters -// ---------- -// arg1, arg2 : dtype_like -// -// `dtype` or object coercible to one -// -// Returns -// ------- -// out : bool -// -// See Also -// -------- -// :ref:`arrays.scalars` : Overview of the numpy type hierarchy. -// issubsctype, issubclass_ -// -// Examples -// -------- -// `issubdtype` can be used to check the type of arrays: -// -// >>> ints = np.array([1, 2, 3], dtype=np.int32) -// >>> np.issubdtype(ints.dtype, np.integer) -// True -// >>> np.issubdtype(ints.dtype, np.floating) -// False -// -// >>> floats = np.array([1, 2, 3], dtype=np.float32) -// >>> np.issubdtype(floats.dtype, np.integer) -// False -// >>> np.issubdtype(floats.dtype, np.floating) -// True -// -// Similar types of different sizes are not subdtypes of each other: -// -// >>> np.issubdtype(np.float64, np.float32) -// False -// >>> np.issubdtype(np.float32, np.float64) -// False -// -// but both are subtypes of `floating`: -// -// >>> np.issubdtype(np.float64, np.floating) -// True -// >>> np.issubdtype(np.float32, np.floating) -// True -// -// For convenience, dtype-like objects are allowed too: -// -// >>> np.issubdtype('S1', np.string_) -// True -// >>> np.issubdtype('i4', np.signedinteger) -// True -// -//go:linkname Issubdtype py.issubdtype -func Issubdtype(arg1 *py.Object, arg2 *py.Object) *py.Object - -// Set a Python function to be used when pretty printing arrays. -// -// Parameters -// ---------- -// f : function or None -// -// Function to be used to pretty print arrays. The function should expect -// a single array argument and return a string of the representation of -// the array. If None, the function is reset to the default NumPy function -// to print arrays. -// -// repr : bool, optional -// -// If True (default), the function for pretty printing (``__repr__``) -// is set, if False the function that returns the default string -// representation (``__str__``) is set. -// -// See Also -// -------- -// set_printoptions, get_printoptions -// -// Examples -// -------- -// >>> def pprint(arr): -// ... return 'HA! - What are you going to do now?' -// ... -// >>> np.set_string_function(pprint) -// >>> a = np.arange(10) -// >>> a -// HA! - What are you going to do now? -// >>> _ = a -// >>> # [0 1 2 3 4 5 6 7 8 9] -// -// We can reset the function to the default: -// -// >>> np.set_string_function(None) -// >>> a -// array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) -// -// `repr` affects either pretty printing or normal string representation. -// Note that “__repr__“ is still affected by setting “__str__“ -// because the width of each array element in the returned string becomes -// equal to the length of the result of “__str__()“. -// -// >>> x = np.arange(4) -// >>> np.set_string_function(lambda x:'random', repr=False) -// >>> x.__str__() -// 'random' -// >>> x.__repr__() -// 'array([0, 1, 2, 3])' -// -//go:linkname SetStringFunction py.set_string_function -func SetStringFunction(f *py.Object, repr *py.Object) *py.Object - -// Set printing options. -// -// These options determine the way floating point numbers, arrays and -// other NumPy objects are displayed. -// -// Parameters -// ---------- -// precision : int or None, optional -// -// Number of digits of precision for floating point output (default 8). -// May be None if `floatmode` is not `fixed`, to print as many digits as -// necessary to uniquely specify the value. -// -// threshold : int, optional -// -// Total number of array elements which trigger summarization -// rather than full repr (default 1000). -// To always use the full repr without summarization, pass `sys.maxsize`. -// -// edgeitems : int, optional -// -// Number of array items in summary at beginning and end of -// each dimension (default 3). -// -// linewidth : int, optional -// -// The number of characters per line for the purpose of inserting -// line breaks (default 75). -// -// suppress : bool, optional -// -// If True, always print floating point numbers using fixed point -// notation, in which case numbers equal to zero in the current precision -// will print as zero. If False, then scientific notation is used when -// absolute value of the smallest number is < 1e-4 or the ratio of the -// maximum absolute value to the minimum is > 1e3. The default is False. -// -// nanstr : str, optional -// -// String representation of floating point not-a-number (default nan). -// -// infstr : str, optional -// -// String representation of floating point infinity (default inf). -// -// sign : string, either '-', '+', or ' ', optional -// -// Controls printing of the sign of floating-point types. If '+', always -// print the sign of positive values. If ' ', always prints a space -// (whitespace character) in the sign position of positive values. If -// '-', omit the sign character of positive values. (default '-') -// -// formatter : dict of callables, optional -// -// If not None, the keys should indicate the type(s) that the respective -// formatting function applies to. Callables should return a string. -// Types that are not specified (by their corresponding keys) are handled -// by the default formatters. Individual types for which a formatter -// can be set are: -// -// - 'bool' -// - 'int' -// - 'timedelta' : a `numpy.timedelta64` -// - 'datetime' : a `numpy.datetime64` -// - 'float' -// - 'longfloat' : 128-bit floats -// - 'complexfloat' -// - 'longcomplexfloat' : composed of two 128-bit floats -// - 'numpystr' : types `numpy.bytes_` and `numpy.str_` -// - 'object' : `np.object_` arrays -// -// Other keys that can be used to set a group of types at once are: -// -// - 'all' : sets all types -// - 'int_kind' : sets 'int' -// - 'float_kind' : sets 'float' and 'longfloat' -// - 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat' -// - 'str_kind' : sets 'numpystr' -// -// floatmode : str, optional -// -// Controls the interpretation of the `precision` option for -// floating-point types. Can take the following values -// (default maxprec_equal): -// -// * 'fixed': Always print exactly `precision` fractional digits, -// even if this would print more or fewer digits than -// necessary to specify the value uniquely. -// * 'unique': Print the minimum number of fractional digits necessary -// to represent each value uniquely. Different elements may -// have a different number of digits. The value of the -// `precision` option is ignored. -// * 'maxprec': Print at most `precision` fractional digits, but if -// an element can be uniquely represented with fewer digits -// only print it with that many. -// * 'maxprec_equal': Print at most `precision` fractional digits, -// but if every element in the array can be uniquely -// represented with an equal number of fewer digits, use that -// many digits for all elements. -// -// legacy : string or `False`, optional -// -// If set to the string `'1.13'` enables 1.13 legacy printing mode. This -// approximates numpy 1.13 print output by including a space in the sign -// position of floats and different behavior for 0d arrays. This also -// enables 1.21 legacy printing mode (described below). -// -// If set to the string `'1.21'` enables 1.21 legacy printing mode. This -// approximates numpy 1.21 print output of complex structured dtypes -// by not inserting spaces after commas that separate fields and after -// colons. -// -// If set to `False`, disables legacy mode. -// -// Unrecognized strings will be ignored with a warning for forward -// compatibility. -// -// .. versionadded:: 1.14.0 -// .. versionchanged:: 1.22.0 -// -// See Also -// -------- -// get_printoptions, printoptions, set_string_function, array2string -// -// Notes -// ----- -// `formatter` is always reset with a call to `set_printoptions`. -// -// Use `printoptions` as a context manager to set the values temporarily. -// -// Examples -// -------- -// Floating point precision can be set: -// -// >>> np.set_printoptions(precision=4) -// >>> np.array([1.123456789]) -// [1.1235] -// -// Long arrays can be summarised: -// -// >>> np.set_printoptions(threshold=5) -// >>> np.arange(10) -// array([0, 1, 2, ..., 7, 8, 9]) -// -// Small results can be suppressed: -// -// >>> eps = np.finfo(float).eps -// >>> x = np.arange(4.) -// >>> x**2 - (x + eps)**2 -// array([-4.9304e-32, -4.4409e-16, 0.0000e+00, 0.0000e+00]) -// >>> np.set_printoptions(suppress=True) -// >>> x**2 - (x + eps)**2 -// array([-0., -0., 0., 0.]) -// -// A custom formatter can be used to display array elements as desired: -// -// >>> np.set_printoptions(formatter={'all':lambda x: 'int: '+str(-x)}) -// >>> x = np.arange(3) -// >>> x -// array([int: 0, int: -1, int: -2]) -// >>> np.set_printoptions() # formatter gets reset -// >>> x -// array([0, 1, 2]) -// -// To put back the default options, you can use: -// -// >>> np.set_printoptions(edgeitems=3, infstr='inf', -// ... linewidth=75, nanstr='nan', precision=8, -// ... suppress=False, threshold=1000, formatter=None) -// -// Also to temporarily override options, use `printoptions` as a context manager: -// -// >>> with np.printoptions(precision=2, suppress=True, threshold=5): -// ... np.linspace(0, 10, 10) -// array([ 0. , 1.11, 2.22, ..., 7.78, 8.89, 10. ]) -// -//go:linkname SetPrintoptions py.set_printoptions -func SetPrintoptions(precision *py.Object, threshold *py.Object, edgeitems *py.Object, linewidth *py.Object, suppress *py.Object, nanstr *py.Object, infstr *py.Object, formatter *py.Object, sign *py.Object, floatmode *py.Object) *py.Object - -// Return the current print options. -// -// Returns -// ------- -// print_opts : dict -// -// Dictionary of current print options with keys -// -// - precision : int -// - threshold : int -// - edgeitems : int -// - linewidth : int -// - suppress : bool -// - nanstr : str -// - infstr : str -// - formatter : dict of callables -// - sign : str -// -// For a full description of these options, see `set_printoptions`. -// -// See Also -// -------- -// set_printoptions, printoptions, set_string_function -// -//go:linkname GetPrintoptions py.get_printoptions -func GetPrintoptions() *py.Object - -// Context manager for setting print options. -// -// Set print options for the scope of the `with` block, and restore the old -// options at the end. See `set_printoptions` for the full description of -// available options. -// -// Examples -// -------- -// -// >>> from numpy.testing import assert_equal -// >>> with np.printoptions(precision=2): -// ... np.array([2.0]) / 3 -// array([0.67]) -// -// The `as`-clause of the `with`-statement gives the current print options: -// -// >>> with np.printoptions(precision=2) as opts: -// ... assert_equal(opts, np.get_printoptions()) -// -// See Also -// -------- -// set_printoptions, get_printoptions -// -//go:linkname Printoptions py.printoptions -func Printoptions(__llgo_va_list ...interface{}) *py.Object - -// Format a floating-point scalar as a decimal string in positional notation. -// -// Provides control over rounding, trimming and padding. Uses and assumes -// IEEE unbiased rounding. Uses the "Dragon4" algorithm. -// -// Parameters -// ---------- -// x : python float or numpy floating scalar -// -// Value to format. -// -// precision : non-negative integer or None, optional -// -// Maximum number of digits to print. May be None if `unique` is -// `True`, but must be an integer if unique is `False`. -// -// unique : boolean, optional -// -// If `True`, use a digit-generation strategy which gives the shortest -// representation which uniquely identifies the floating-point number from -// other values of the same type, by judicious rounding. If `precision` -// is given fewer digits than necessary can be printed, or if `min_digits` -// is given more can be printed, in which cases the last digit is rounded -// with unbiased rounding. -// If `False`, digits are generated as if printing an infinite-precision -// value and stopping after `precision` digits, rounding the remaining -// value with unbiased rounding -// -// fractional : boolean, optional -// -// If `True`, the cutoffs of `precision` and `min_digits` refer to the -// total number of digits after the decimal point, including leading -// zeros. -// If `False`, `precision` and `min_digits` refer to the total number of -// significant digits, before or after the decimal point, ignoring leading -// zeros. -// -// trim : one of 'k', '.', '0', '-', optional -// -// Controls post-processing trimming of trailing digits, as follows: -// -// * 'k' : keep trailing zeros, keep decimal point (no trimming) -// * '.' : trim all trailing zeros, leave decimal point -// * '0' : trim all but the zero before the decimal point. Insert the -// zero if it is missing. -// * '-' : trim trailing zeros and any trailing decimal point -// -// sign : boolean, optional -// -// Whether to show the sign for positive values. -// -// pad_left : non-negative integer, optional -// -// Pad the left side of the string with whitespace until at least that -// many characters are to the left of the decimal point. -// -// pad_right : non-negative integer, optional -// -// Pad the right side of the string with whitespace until at least that -// many characters are to the right of the decimal point. -// -// min_digits : non-negative integer or None, optional -// -// Minimum number of digits to print. Only has an effect if `unique=True` -// in which case additional digits past those necessary to uniquely -// identify the value may be printed, rounding the last additional digit. -// -// -- versionadded:: 1.21.0 -// -// Returns -// ------- -// rep : string -// -// The string representation of the floating point value -// -// See Also -// -------- -// format_float_scientific -// -// Examples -// -------- -// >>> np.format_float_positional(np.float32(np.pi)) -// '3.1415927' -// >>> np.format_float_positional(np.float16(np.pi)) -// '3.14' -// >>> np.format_float_positional(np.float16(0.3)) -// '0.3' -// >>> np.format_float_positional(np.float16(0.3), unique=False, precision=10) -// '0.3000488281' -// -//go:linkname FormatFloatPositional py.format_float_positional -func FormatFloatPositional(x *py.Object, precision *py.Object, unique *py.Object, fractional *py.Object, trim *py.Object, sign *py.Object, padLeft *py.Object, padRight *py.Object, minDigits *py.Object) *py.Object - -// Format a floating-point scalar as a decimal string in scientific notation. -// -// Provides control over rounding, trimming and padding. Uses and assumes -// IEEE unbiased rounding. Uses the "Dragon4" algorithm. -// -// Parameters -// ---------- -// x : python float or numpy floating scalar -// -// Value to format. -// -// precision : non-negative integer or None, optional -// -// Maximum number of digits to print. May be None if `unique` is -// `True`, but must be an integer if unique is `False`. -// -// unique : boolean, optional -// -// If `True`, use a digit-generation strategy which gives the shortest -// representation which uniquely identifies the floating-point number from -// other values of the same type, by judicious rounding. If `precision` -// is given fewer digits than necessary can be printed. If `min_digits` -// is given more can be printed, in which cases the last digit is rounded -// with unbiased rounding. -// If `False`, digits are generated as if printing an infinite-precision -// value and stopping after `precision` digits, rounding the remaining -// value with unbiased rounding -// -// trim : one of 'k', '.', '0', '-', optional -// -// Controls post-processing trimming of trailing digits, as follows: -// -// * 'k' : keep trailing zeros, keep decimal point (no trimming) -// * '.' : trim all trailing zeros, leave decimal point -// * '0' : trim all but the zero before the decimal point. Insert the -// zero if it is missing. -// * '-' : trim trailing zeros and any trailing decimal point -// -// sign : boolean, optional -// -// Whether to show the sign for positive values. -// -// pad_left : non-negative integer, optional -// -// Pad the left side of the string with whitespace until at least that -// many characters are to the left of the decimal point. -// -// exp_digits : non-negative integer, optional -// -// Pad the exponent with zeros until it contains at least this many digits. -// If omitted, the exponent will be at least 2 digits. -// -// min_digits : non-negative integer or None, optional -// -// Minimum number of digits to print. This only has an effect for -// `unique=True`. In that case more digits than necessary to uniquely -// identify the value may be printed and rounded unbiased. -// -// -- versionadded:: 1.21.0 -// -// Returns -// ------- -// rep : string -// -// The string representation of the floating point value -// -// See Also -// -------- -// format_float_positional -// -// Examples -// -------- -// >>> np.format_float_scientific(np.float32(np.pi)) -// '3.1415927e+00' -// >>> s = np.float32(1.23e24) -// >>> np.format_float_scientific(s, unique=False, precision=15) -// '1.230000071797338e+24' -// >>> np.format_float_scientific(s, exp_digits=4) -// '1.23e+0024' -// -//go:linkname FormatFloatScientific py.format_float_scientific -func FormatFloatScientific(x *py.Object, precision *py.Object, unique *py.Object, trim *py.Object, sign *py.Object, padLeft *py.Object, expDigits *py.Object, minDigits *py.Object) *py.Object - -// Return an ndarray of the provided type that satisfies requirements. -// -// This function is useful to be sure that an array with the correct flags -// is returned for passing to compiled code (perhaps through ctypes). -// -// Parameters -// ---------- -// a : array_like -// -// The object to be converted to a type-and-requirement-satisfying array. -// -// dtype : data-type -// -// The required data-type. If None preserve the current dtype. If your -// application requires the data to be in native byteorder, include -// a byteorder specification as a part of the dtype specification. -// -// requirements : str or sequence of str -// -// The requirements list can be any of the following -// -// * 'F_CONTIGUOUS' ('F') - ensure a Fortran-contiguous array -// * 'C_CONTIGUOUS' ('C') - ensure a C-contiguous array -// * 'ALIGNED' ('A') - ensure a data-type aligned array -// * 'WRITEABLE' ('W') - ensure a writable array -// * 'OWNDATA' ('O') - ensure an array that owns its own data -// * 'ENSUREARRAY', ('E') - ensure a base array, instead of a subclass -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// out : ndarray -// -// Array with specified requirements and type if given. -// -// See Also -// -------- -// asarray : Convert input to an ndarray. -// asanyarray : Convert to an ndarray, but pass through ndarray subclasses. -// ascontiguousarray : Convert input to a contiguous array. -// asfortranarray : Convert input to an ndarray with column-major -// -// memory order. -// -// ndarray.flags : Information about the memory layout of the array. -// -// Notes -// ----- -// The returned array will be guaranteed to have the listed requirements -// by making a copy if needed. -// -// Examples -// -------- -// >>> x = np.arange(6).reshape(2,3) -// >>> x.flags -// -// C_CONTIGUOUS : True -// F_CONTIGUOUS : False -// OWNDATA : False -// WRITEABLE : True -// ALIGNED : True -// WRITEBACKIFCOPY : False -// -// >>> y = np.require(x, dtype=np.float32, requirements=['A', 'O', 'W', 'F']) -// >>> y.flags -// -// C_CONTIGUOUS : False -// F_CONTIGUOUS : True -// OWNDATA : True -// WRITEABLE : True -// ALIGNED : True -// WRITEBACKIFCOPY : False -// -//go:linkname Require py.require -func Require(a *py.Object, dtype *py.Object, requirements *py.Object) *py.Object - -// Set how floating-point errors are handled. -// -// Note that operations on integer scalar types (such as `int16`) are -// handled like floating point, and are affected by these settings. -// -// Parameters -// ---------- -// all : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional -// -// Set treatment for all types of floating-point errors at once: -// -// - ignore: Take no action when the exception occurs. -// - warn: Print a `RuntimeWarning` (via the Python `warnings` module). -// - raise: Raise a `FloatingPointError`. -// - call: Call a function specified using the `seterrcall` function. -// - print: Print a warning directly to ``stdout``. -// - log: Record error in a Log object specified by `seterrcall`. -// -// The default is not to change the current behavior. -// -// divide : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional -// -// Treatment for division by zero. -// -// over : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional -// -// Treatment for floating-point overflow. -// -// under : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional -// -// Treatment for floating-point underflow. -// -// invalid : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional -// -// Treatment for invalid floating-point operation. -// -// Returns -// ------- -// old_settings : dict -// -// Dictionary containing the old settings. -// -// See also -// -------- -// seterrcall : Set a callback function for the 'call' mode. -// geterr, geterrcall, errstate -// -// Notes -// ----- -// The floating-point exceptions are defined in the IEEE 754 standard [1]_: -// -// - Division by zero: infinite result obtained from finite numbers. -// - Overflow: result too large to be expressed. -// - Underflow: result so close to zero that some precision -// was lost. -// - Invalid operation: result is not an expressible number, typically -// indicates that a NaN was produced. -// -// .. [1] https://en.wikipedia.org/wiki/IEEE_754 -// -// Examples -// -------- -// >>> old_settings = np.seterr(all='ignore') #seterr to known value -// >>> np.seterr(over='raise') -// {'divide': 'ignore', 'over': 'ignore', 'under': 'ignore', 'invalid': 'ignore'} -// >>> np.seterr(**old_settings) # reset to default -// {'divide': 'ignore', 'over': 'raise', 'under': 'ignore', 'invalid': 'ignore'} -// -// >>> np.int16(32000) * np.int16(3) -// 30464 -// >>> old_settings = np.seterr(all='warn', over='raise') -// >>> np.int16(32000) * np.int16(3) -// Traceback (most recent call last): -// -// File "", line 1, in -// -// FloatingPointError: overflow encountered in scalar multiply -// -// >>> old_settings = np.seterr(all='print') -// >>> np.geterr() -// {'divide': 'print', 'over': 'print', 'under': 'print', 'invalid': 'print'} -// >>> np.int16(32000) * np.int16(3) -// 30464 -// -//go:linkname Seterr py.seterr -func Seterr(all *py.Object, divide *py.Object, over *py.Object, under *py.Object, invalid *py.Object) *py.Object - -// Get the current way of handling floating-point errors. -// -// Returns -// ------- -// res : dict -// -// A dictionary with keys "divide", "over", "under", and "invalid", -// whose values are from the strings "ignore", "print", "log", "warn", -// "raise", and "call". The keys represent possible floating-point -// exceptions, and the values define how these exceptions are handled. -// -// See Also -// -------- -// geterrcall, seterr, seterrcall -// -// Notes -// ----- -// For complete documentation of the types of floating-point exceptions and -// treatment options, see `seterr`. -// -// Examples -// -------- -// >>> np.geterr() -// {'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'} -// >>> np.arange(3.) / np.arange(3.) -// array([nan, 1., 1.]) -// -// >>> oldsettings = np.seterr(all='warn', over='raise') -// >>> np.geterr() -// {'divide': 'warn', 'over': 'raise', 'under': 'warn', 'invalid': 'warn'} -// >>> np.arange(3.) / np.arange(3.) -// array([nan, 1., 1.]) -// -//go:linkname Geterr py.geterr -func Geterr() *py.Object - -// Set the size of the buffer used in ufuncs. -// -// Parameters -// ---------- -// size : int -// -// Size of buffer. -// -//go:linkname Setbufsize py.setbufsize -func Setbufsize(size *py.Object) *py.Object - -// Return the size of the buffer used in ufuncs. -// -// Returns -// ------- -// getbufsize : int -// -// Size of ufunc buffer in bytes. -// -//go:linkname Getbufsize py.getbufsize -func Getbufsize() *py.Object - -// Set the floating-point error callback function or log object. -// -// There are two ways to capture floating-point error messages. The first -// is to set the error-handler to 'call', using `seterr`. Then, set -// the function to call using this function. -// -// The second is to set the error-handler to 'log', using `seterr`. -// Floating-point errors then trigger a call to the 'write' method of -// the provided object. -// -// Parameters -// ---------- -// func : callable f(err, flag) or object with write method -// -// Function to call upon floating-point errors ('call'-mode) or -// object whose 'write' method is used to log such message ('log'-mode). -// -// The call function takes two arguments. The first is a string describing -// the type of error (such as "divide by zero", "overflow", "underflow", -// or "invalid value"), and the second is the status flag. The flag is a -// byte, whose four least-significant bits indicate the type of error, one -// of "divide", "over", "under", "invalid":: -// -// [0 0 0 0 divide over under invalid] -// -// In other words, ``flags = divide + 2*over + 4*under + 8*invalid``. -// -// If an object is provided, its write method should take one argument, -// a string. -// -// Returns -// ------- -// h : callable, log instance or None -// -// The old error handler. -// -// See Also -// -------- -// seterr, geterr, geterrcall -// -// Examples -// -------- -// Callback upon error: -// -// >>> def err_handler(type, flag): -// ... print("Floating point error (%s), with flag %s" % (type, flag)) -// ... -// -// >>> saved_handler = np.seterrcall(err_handler) -// >>> save_err = np.seterr(all='call') -// -// >>> np.array([1, 2, 3]) / 0.0 -// Floating point error (divide by zero), with flag 1 -// array([inf, inf, inf]) -// -// >>> np.seterrcall(saved_handler) -// -// >>> np.seterr(**save_err) -// {'divide': 'call', 'over': 'call', 'under': 'call', 'invalid': 'call'} -// -// Log error message: -// -// >>> class Log: -// ... def write(self, msg): -// ... print("LOG: %s" % msg) -// ... -// -// >>> log = Log() -// >>> saved_handler = np.seterrcall(log) -// >>> save_err = np.seterr(all='log') -// -// >>> np.array([1, 2, 3]) / 0.0 -// LOG: Warning: divide by zero encountered in divide -// array([inf, inf, inf]) -// -// >>> np.seterrcall(saved_handler) -// -// >>> np.seterr(**save_err) -// {'divide': 'log', 'over': 'log', 'under': 'log', 'invalid': 'log'} -// -//go:linkname Seterrcall py.seterrcall -func Seterrcall(func_ *py.Object) *py.Object - -// Return the current callback function used on floating-point errors. -// -// When the error handling for a floating-point error (one of "divide", -// "over", "under", or "invalid") is set to 'call' or 'log', the function -// that is called or the log instance that is written to is returned by -// `geterrcall`. This function or log instance has been set with -// `seterrcall`. -// -// Returns -// ------- -// errobj : callable, log instance or None -// -// The current error handler. If no handler was set through `seterrcall`, -// ``None`` is returned. -// -// See Also -// -------- -// seterrcall, seterr, geterr -// -// Notes -// ----- -// For complete documentation of the types of floating-point exceptions and -// treatment options, see `seterr`. -// -// Examples -// -------- -// >>> np.geterrcall() # we did not yet set a handler, returns None -// -// >>> oldsettings = np.seterr(all='call') -// >>> def err_handler(type, flag): -// ... print("Floating point error (%s), with flag %s" % (type, flag)) -// >>> oldhandler = np.seterrcall(err_handler) -// >>> np.array([1, 2, 3]) / 0.0 -// Floating point error (divide by zero), with flag 1 -// array([inf, inf, inf]) -// -// >>> cur_handler = np.geterrcall() -// >>> cur_handler is err_handler -// True -// -//go:linkname Geterrcall py.geterrcall -func Geterrcall() *py.Object - -// Return a description for the given data type code. -// -// Parameters -// ---------- -// char : str -// -// Data type code. -// -// Returns -// ------- -// out : str -// -// Description of the input data type code. -// -// See Also -// -------- -// dtype, typecodes -// -// Examples -// -------- -// >>> typechars = ['S1', '?', 'B', 'D', 'G', 'F', 'I', 'H', 'L', 'O', 'Q', -// ... 'S', 'U', 'V', 'b', 'd', 'g', 'f', 'i', 'h', 'l', 'q'] -// >>> for typechar in typechars: -// ... print(typechar, ' : ', np.typename(typechar)) -// ... -// S1 : character -// ? : bool -// B : unsigned char -// D : complex double precision -// G : complex long double precision -// F : complex single precision -// I : unsigned integer -// H : unsigned short -// L : unsigned long integer -// O : object -// Q : unsigned long long integer -// S : string -// U : unicode -// V : void -// b : signed char -// d : double precision -// g : long precision -// f : single precision -// i : integer -// h : short -// l : long integer -// q : long long integer -// -//go:linkname Typename py.typename -func Typename(char *py.Object) *py.Object - -// Return the character for the minimum-size type to which given types can -// be safely cast. -// -// The returned type character must represent the smallest size dtype such -// that an array of the returned type can handle the data from an array of -// all types in `typechars` (or if `typechars` is an array, then its -// dtype.char). -// -// Parameters -// ---------- -// typechars : list of str or array_like -// -// If a list of strings, each string should represent a dtype. -// If array_like, the character representation of the array dtype is used. -// -// typeset : str or list of str, optional -// -// The set of characters that the returned character is chosen from. -// The default set is 'GDFgdf'. -// -// default : str, optional -// -// The default character, this is returned if none of the characters in -// `typechars` matches a character in `typeset`. -// -// Returns -// ------- -// typechar : str -// -// The character representing the minimum-size type that was found. -// -// See Also -// -------- -// dtype, sctype2char, maximum_sctype -// -// Examples -// -------- -// >>> np.mintypecode(['d', 'f', 'S']) -// 'd' -// >>> x = np.array([1.1, 2-3.j]) -// >>> np.mintypecode(x) -// 'D' -// -// >>> np.mintypecode('abceh', default='G') -// 'G' -// -//go:linkname Mintypecode py.mintypecode -func Mintypecode(typechars *py.Object, typeset *py.Object, default_ *py.Object) *py.Object - -// Return the indices to access the main diagonal of an array. -// -// This returns a tuple of indices that can be used to access the main -// diagonal of an array `a` with “a.ndim >= 2“ dimensions and shape -// (n, n, ..., n). For “a.ndim = 2“ this is the usual diagonal, for -// “a.ndim > 2“ this is the set of indices to access “a[i, i, ..., i]“ -// for “i = [0..n-1]“. -// -// Parameters -// ---------- -// n : int -// -// The size, along each dimension, of the arrays for which the returned -// indices can be used. -// -// ndim : int, optional -// -// The number of dimensions. -// -// See Also -// -------- -// diag_indices_from -// -// Notes -// ----- -// .. versionadded:: 1.4.0 -// -// Examples -// -------- -// Create a set of indices to access the diagonal of a (4, 4) array: -// -// >>> di = np.diag_indices(4) -// >>> di -// (array([0, 1, 2, 3]), array([0, 1, 2, 3])) -// >>> a = np.arange(16).reshape(4, 4) -// >>> a -// array([[ 0, 1, 2, 3], -// -// [ 4, 5, 6, 7], -// [ 8, 9, 10, 11], -// [12, 13, 14, 15]]) -// -// >>> a[di] = 100 -// >>> a -// array([[100, 1, 2, 3], -// -// [ 4, 100, 6, 7], -// [ 8, 9, 100, 11], -// [ 12, 13, 14, 100]]) -// -// Now, we create indices to manipulate a 3-D array: -// -// >>> d3 = np.diag_indices(2, 3) -// >>> d3 -// (array([0, 1]), array([0, 1]), array([0, 1])) -// -// And use it to set the diagonal of an array of zeros to 1: -// -// >>> a = np.zeros((2, 2, 2), dtype=int) -// >>> a[d3] = 1 -// >>> a -// array([[[1, 0], -// -// [0, 0]], -// [[0, 0], -// [0, 1]]]) -// -//go:linkname DiagIndices py.diag_indices -func DiagIndices(n *py.Object, ndim *py.Object) *py.Object - -// Check whether or not an object can be iterated over. -// -// Parameters -// ---------- -// y : object -// -// Input object. -// -// Returns -// ------- -// b : bool -// -// Return ``True`` if the object has an iterator method or is a -// sequence and ``False`` otherwise. -// -// Examples -// -------- -// >>> np.iterable([1, 2, 3]) -// True -// >>> np.iterable(2) -// False -// -// Notes -// ----- -// In most cases, the results of “np.iterable(obj)“ are consistent with -// “isinstance(obj, collections.abc.Iterable)“. One notable exception is -// the treatment of 0-dimensional arrays:: -// -// >>> from collections.abc import Iterable -// >>> a = np.array(1.0) # 0-dimensional numpy array -// >>> isinstance(a, Iterable) -// True -// >>> np.iterable(a) -// False -// -//go:linkname Iterable py.iterable -func Iterable(y *py.Object) *py.Object - -// Display a message on a device. -// -// Parameters -// ---------- -// mesg : str -// -// Message to display. -// -// device : object -// -// Device to write message. If None, defaults to ``sys.stdout`` which is -// very similar to ``print``. `device` needs to have ``write()`` and -// ``flush()`` methods. -// -// linefeed : bool, optional -// -// Option whether to print a line feed or not. Defaults to True. -// -// Raises -// ------ -// AttributeError -// -// If `device` does not have a ``write()`` or ``flush()`` method. -// -// Examples -// -------- -// Besides “sys.stdout“, a file-like object can also be used as it has -// both required methods: -// -// >>> from io import StringIO -// >>> buf = StringIO() -// >>> np.disp(u'"Display" in a file', device=buf) -// >>> buf.getvalue() -// '"Display" in a file\n' -// -//go:linkname Disp py.disp -func Disp(mesg *py.Object, device *py.Object, linefeed *py.Object) *py.Object - -// Convert the input to an array, checking for NaNs or Infs. -// -// Parameters -// ---------- -// a : array_like -// Input data, in any form that can be converted to an array. This -// includes lists, lists of tuples, tuples, tuples of tuples, tuples -// of lists and ndarrays. Success requires no NaNs or Infs. -// dtype : data-type, optional -// By default, the data-type is inferred from the input data. -// order : {'C', 'F', 'A', 'K'}, optional -// Memory layout. 'A' and 'K' depend on the order of input array a. -// 'C' row-major (C-style), -// 'F' column-major (Fortran-style) memory representation. -// 'A' (any) means 'F' if `a` is Fortran contiguous, 'C' otherwise -// 'K' (keep) preserve input order -// Defaults to 'C'. -// -// Returns -// ------- -// out : ndarray -// Array interpretation of `a`. No copy is performed if the input -// is already an ndarray. If `a` is a subclass of ndarray, a base -// class ndarray is returned. -// -// Raises -// ------ -// ValueError -// Raises ValueError if `a` contains NaN (Not a Number) or Inf (Infinity). -// -// See Also -// -------- -// asarray : Create and array. -// asanyarray : Similar function which passes through subclasses. -// ascontiguousarray : Convert input to a contiguous array. -// asfarray : Convert input to a floating point ndarray. -// asfortranarray : Convert input to an ndarray with column-major -// memory order. -// fromiter : Create an array from an iterator. -// fromfunction : Construct an array by executing a function on grid -// positions. -// -// Examples -// -------- -// Convert a list into an array. If all elements are finite -// ``asarray_chkfinite`` is identical to ``asarray``. -// -// >>> a = [1, 2] -// >>> np.asarray_chkfinite(a, dtype=float) -// array([1., 2.]) -// -// Raises ValueError if array_like contains Nans or Infs. -// -// >>> a = [1, 2, np.inf] -// >>> try: -// ... np.asarray_chkfinite(a) -// ... except ValueError: -// ... print('ValueError') -// ... -// ValueError -// -//go:linkname AsarrayChkfinite py.asarray_chkfinite -func AsarrayChkfinite(a *py.Object, dtype *py.Object, order *py.Object) *py.Object - -// Return the Hamming window. -// -// The Hamming window is a taper formed by using a weighted cosine. -// -// Parameters -// ---------- -// M : int -// -// Number of points in the output window. If zero or less, an -// empty array is returned. -// -// Returns -// ------- -// out : ndarray -// -// The window, with the maximum value normalized to one (the value -// one appears only if the number of samples is odd). -// -// See Also -// -------- -// bartlett, blackman, hanning, kaiser -// -// Notes -// ----- -// The Hamming window is defined as -// -// .. math:: w(n) = 0.54 - 0.46\cos\left(\frac{2\pi{n}}{M-1}\right) -// -// \qquad 0 \leq n \leq M-1 -// -// The Hamming was named for R. W. Hamming, an associate of J. W. Tukey -// and is described in Blackman and Tukey. It was recommended for -// smoothing the truncated autocovariance function in the time domain. -// Most references to the Hamming window come from the signal processing -// literature, where it is used as one of many windowing functions for -// smoothing values. It is also known as an apodization (which means -// "removing the foot", i.e. smoothing discontinuities at the beginning -// and end of the sampled signal) or tapering function. -// -// References -// ---------- -// .. [1] Blackman, R.B. and Tukey, J.W., (1958) The measurement of power -// -// spectra, Dover Publications, New York. -// -// .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The -// -// University of Alberta Press, 1975, pp. 109-110. -// -// .. [3] Wikipedia, "Window function", -// -// https://en.wikipedia.org/wiki/Window_function -// -// .. [4] W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling, -// -// "Numerical Recipes", Cambridge University Press, 1986, page 425. -// -// Examples -// -------- -// >>> np.hamming(12) -// array([ 0.08 , 0.15302337, 0.34890909, 0.60546483, 0.84123594, # may vary -// -// 0.98136677, 0.98136677, 0.84123594, 0.60546483, 0.34890909, -// 0.15302337, 0.08 ]) -// -// Plot the window and the frequency response: -// -// >>> import matplotlib.pyplot as plt -// >>> from numpy.fft import fft, fftshift -// >>> window = np.hamming(51) -// >>> plt.plot(window) -// [] -// >>> plt.title("Hamming window") -// Text(0.5, 1.0, 'Hamming window') -// >>> plt.ylabel("Amplitude") -// Text(0, 0.5, 'Amplitude') -// >>> plt.xlabel("Sample") -// Text(0.5, 0, 'Sample') -// >>> plt.show() -// -// >>> plt.figure() -//
-// >>> A = fft(window, 2048) / 25.5 -// >>> mag = np.abs(fftshift(A)) -// >>> freq = np.linspace(-0.5, 0.5, len(A)) -// >>> response = 20 * np.log10(mag) -// >>> response = np.clip(response, -100, 100) -// >>> plt.plot(freq, response) -// [] -// >>> plt.title("Frequency response of Hamming window") -// Text(0.5, 1.0, 'Frequency response of Hamming window') -// >>> plt.ylabel("Magnitude [dB]") -// Text(0, 0.5, 'Magnitude [dB]') -// >>> plt.xlabel("Normalized frequency [cycles per sample]") -// Text(0.5, 0, 'Normalized frequency [cycles per sample]') -// >>> plt.axis('tight') -// ... -// >>> plt.show() -// -//go:linkname Hamming py.hamming -func Hamming(M *py.Object) *py.Object - -// Return the Hanning window. -// -// The Hanning window is a taper formed by using a weighted cosine. -// -// Parameters -// ---------- -// M : int -// -// Number of points in the output window. If zero or less, an -// empty array is returned. -// -// Returns -// ------- -// out : ndarray, shape(M,) -// -// The window, with the maximum value normalized to one (the value -// one appears only if `M` is odd). -// -// See Also -// -------- -// bartlett, blackman, hamming, kaiser -// -// Notes -// ----- -// The Hanning window is defined as -// -// .. math:: w(n) = 0.5 - 0.5\cos\left(\frac{2\pi{n}}{M-1}\right) -// -// \qquad 0 \leq n \leq M-1 -// -// The Hanning was named for Julius von Hann, an Austrian meteorologist. -// It is also known as the Cosine Bell. Some authors prefer that it be -// called a Hann window, to help avoid confusion with the very similar -// Hamming window. -// -// Most references to the Hanning window come from the signal processing -// literature, where it is used as one of many windowing functions for -// smoothing values. It is also known as an apodization (which means -// "removing the foot", i.e. smoothing discontinuities at the beginning -// and end of the sampled signal) or tapering function. -// -// References -// ---------- -// .. [1] Blackman, R.B. and Tukey, J.W., (1958) The measurement of power -// -// spectra, Dover Publications, New York. -// -// .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", -// -// The University of Alberta Press, 1975, pp. 106-108. -// -// .. [3] Wikipedia, "Window function", -// -// https://en.wikipedia.org/wiki/Window_function -// -// .. [4] W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling, -// -// "Numerical Recipes", Cambridge University Press, 1986, page 425. -// -// Examples -// -------- -// >>> np.hanning(12) -// array([0. , 0.07937323, 0.29229249, 0.57115742, 0.82743037, -// -// 0.97974649, 0.97974649, 0.82743037, 0.57115742, 0.29229249, -// 0.07937323, 0. ]) -// -// Plot the window and its frequency response: -// -// >>> import matplotlib.pyplot as plt -// >>> from numpy.fft import fft, fftshift -// >>> window = np.hanning(51) -// >>> plt.plot(window) -// [] -// >>> plt.title("Hann window") -// Text(0.5, 1.0, 'Hann window') -// >>> plt.ylabel("Amplitude") -// Text(0, 0.5, 'Amplitude') -// >>> plt.xlabel("Sample") -// Text(0.5, 0, 'Sample') -// >>> plt.show() -// -// >>> plt.figure() -//
-// >>> A = fft(window, 2048) / 25.5 -// >>> mag = np.abs(fftshift(A)) -// >>> freq = np.linspace(-0.5, 0.5, len(A)) -// >>> with np.errstate(divide='ignore', invalid='ignore'): -// ... response = 20 * np.log10(mag) -// ... -// >>> response = np.clip(response, -100, 100) -// >>> plt.plot(freq, response) -// [] -// >>> plt.title("Frequency response of the Hann window") -// Text(0.5, 1.0, 'Frequency response of the Hann window') -// >>> plt.ylabel("Magnitude [dB]") -// Text(0, 0.5, 'Magnitude [dB]') -// >>> plt.xlabel("Normalized frequency [cycles per sample]") -// Text(0.5, 0, 'Normalized frequency [cycles per sample]') -// >>> plt.axis('tight') -// ... -// >>> plt.show() -// -//go:linkname Hanning py.hanning -func Hanning(M *py.Object) *py.Object - -// Return the Bartlett window. -// -// The Bartlett window is very similar to a triangular window, except -// that the end points are at zero. It is often used in signal -// processing for tapering a signal, without generating too much -// ripple in the frequency domain. -// -// Parameters -// ---------- -// M : int -// -// Number of points in the output window. If zero or less, an -// empty array is returned. -// -// Returns -// ------- -// out : array -// -// The triangular window, with the maximum value normalized to one -// (the value one appears only if the number of samples is odd), with -// the first and last samples equal to zero. -// -// See Also -// -------- -// blackman, hamming, hanning, kaiser -// -// Notes -// ----- -// The Bartlett window is defined as -// -// .. math:: w(n) = \frac{2}{M-1} \left( -// -// \frac{M-1}{2} - \left|n - \frac{M-1}{2}\right| -// \right) -// -// Most references to the Bartlett window come from the signal processing -// literature, where it is used as one of many windowing functions for -// smoothing values. Note that convolution with this window produces linear -// interpolation. It is also known as an apodization (which means "removing -// the foot", i.e. smoothing discontinuities at the beginning and end of the -// sampled signal) or tapering function. The Fourier transform of the -// Bartlett window is the product of two sinc functions. Note the excellent -// discussion in Kanasewich [2]_. -// -// References -// ---------- -// .. [1] M.S. Bartlett, "Periodogram Analysis and Continuous Spectra", -// -// Biometrika 37, 1-16, 1950. -// -// .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", -// -// The University of Alberta Press, 1975, pp. 109-110. -// -// .. [3] A.V. Oppenheim and R.W. Schafer, "Discrete-Time Signal -// -// Processing", Prentice-Hall, 1999, pp. 468-471. -// -// .. [4] Wikipedia, "Window function", -// -// https://en.wikipedia.org/wiki/Window_function -// -// .. [5] W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling, -// -// "Numerical Recipes", Cambridge University Press, 1986, page 429. -// -// Examples -// -------- -// >>> import matplotlib.pyplot as plt -// >>> np.bartlett(12) -// array([ 0. , 0.18181818, 0.36363636, 0.54545455, 0.72727273, # may vary -// -// 0.90909091, 0.90909091, 0.72727273, 0.54545455, 0.36363636, -// 0.18181818, 0. ]) -// -// Plot the window and its frequency response (requires SciPy and matplotlib): -// -// >>> from numpy.fft import fft, fftshift -// >>> window = np.bartlett(51) -// >>> plt.plot(window) -// [] -// >>> plt.title("Bartlett window") -// Text(0.5, 1.0, 'Bartlett window') -// >>> plt.ylabel("Amplitude") -// Text(0, 0.5, 'Amplitude') -// >>> plt.xlabel("Sample") -// Text(0.5, 0, 'Sample') -// >>> plt.show() -// -// >>> plt.figure() -//
-// >>> A = fft(window, 2048) / 25.5 -// >>> mag = np.abs(fftshift(A)) -// >>> freq = np.linspace(-0.5, 0.5, len(A)) -// >>> with np.errstate(divide='ignore', invalid='ignore'): -// ... response = 20 * np.log10(mag) -// ... -// >>> response = np.clip(response, -100, 100) -// >>> plt.plot(freq, response) -// [] -// >>> plt.title("Frequency response of Bartlett window") -// Text(0.5, 1.0, 'Frequency response of Bartlett window') -// >>> plt.ylabel("Magnitude [dB]") -// Text(0, 0.5, 'Magnitude [dB]') -// >>> plt.xlabel("Normalized frequency [cycles per sample]") -// Text(0.5, 0, 'Normalized frequency [cycles per sample]') -// >>> _ = plt.axis('tight') -// >>> plt.show() -// -//go:linkname Bartlett py.bartlett -func Bartlett(M *py.Object) *py.Object - -// Return the Blackman window. -// -// The Blackman window is a taper formed by using the first three -// terms of a summation of cosines. It was designed to have close to the -// minimal leakage possible. It is close to optimal, only slightly worse -// than a Kaiser window. -// -// Parameters -// ---------- -// M : int -// -// Number of points in the output window. If zero or less, an empty -// array is returned. -// -// Returns -// ------- -// out : ndarray -// -// The window, with the maximum value normalized to one (the value one -// appears only if the number of samples is odd). -// -// See Also -// -------- -// bartlett, hamming, hanning, kaiser -// -// Notes -// ----- -// The Blackman window is defined as -// -// .. math:: w(n) = 0.42 - 0.5 \cos(2\pi n/M) + 0.08 \cos(4\pi n/M) -// -// Most references to the Blackman window come from the signal processing -// literature, where it is used as one of many windowing functions for -// smoothing values. It is also known as an apodization (which means -// "removing the foot", i.e. smoothing discontinuities at the beginning -// and end of the sampled signal) or tapering function. It is known as a -// "near optimal" tapering function, almost as good (by some measures) -// as the kaiser window. -// -// References -// ---------- -// Blackman, R.B. and Tukey, J.W., (1958) The measurement of power spectra, -// Dover Publications, New York. -// -// Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing. -// Upper Saddle River, NJ: Prentice-Hall, 1999, pp. 468-471. -// -// Examples -// -------- -// >>> import matplotlib.pyplot as plt -// >>> np.blackman(12) -// array([-1.38777878e-17, 3.26064346e-02, 1.59903635e-01, # may vary -// -// 4.14397981e-01, 7.36045180e-01, 9.67046769e-01, -// 9.67046769e-01, 7.36045180e-01, 4.14397981e-01, -// 1.59903635e-01, 3.26064346e-02, -1.38777878e-17]) -// -// Plot the window and the frequency response: -// -// >>> from numpy.fft import fft, fftshift -// >>> window = np.blackman(51) -// >>> plt.plot(window) -// [] -// >>> plt.title("Blackman window") -// Text(0.5, 1.0, 'Blackman window') -// >>> plt.ylabel("Amplitude") -// Text(0, 0.5, 'Amplitude') -// >>> plt.xlabel("Sample") -// Text(0.5, 0, 'Sample') -// >>> plt.show() -// -// >>> plt.figure() -//
-// >>> A = fft(window, 2048) / 25.5 -// >>> mag = np.abs(fftshift(A)) -// >>> freq = np.linspace(-0.5, 0.5, len(A)) -// >>> with np.errstate(divide='ignore', invalid='ignore'): -// ... response = 20 * np.log10(mag) -// ... -// >>> response = np.clip(response, -100, 100) -// >>> plt.plot(freq, response) -// [] -// >>> plt.title("Frequency response of Blackman window") -// Text(0.5, 1.0, 'Frequency response of Blackman window') -// >>> plt.ylabel("Magnitude [dB]") -// Text(0, 0.5, 'Magnitude [dB]') -// >>> plt.xlabel("Normalized frequency [cycles per sample]") -// Text(0.5, 0, 'Normalized frequency [cycles per sample]') -// >>> _ = plt.axis('tight') -// >>> plt.show() -// -//go:linkname Blackman py.blackman -func Blackman(M *py.Object) *py.Object - -// Return the Kaiser window. -// -// The Kaiser window is a taper formed by using a Bessel function. -// -// Parameters -// ---------- -// M : int -// -// Number of points in the output window. If zero or less, an -// empty array is returned. -// -// beta : float -// -// Shape parameter for window. -// -// Returns -// ------- -// out : array -// -// The window, with the maximum value normalized to one (the value -// one appears only if the number of samples is odd). -// -// See Also -// -------- -// bartlett, blackman, hamming, hanning -// -// Notes -// ----- -// The Kaiser window is defined as -// -// .. math:: w(n) = I_0\left( \beta \sqrt{1-\frac{4n^2}{(M-1)^2}} -// -// \right)/I_0(\beta) -// -// with -// -// .. math:: \quad -\frac{M-1}{2} \leq n \leq \frac{M-1}{2}, -// -// where :math:`I_0` is the modified zeroth-order Bessel function. -// -// The Kaiser was named for Jim Kaiser, who discovered a simple -// approximation to the DPSS window based on Bessel functions. The Kaiser -// window is a very good approximation to the Digital Prolate Spheroidal -// Sequence, or Slepian window, which is the transform which maximizes the -// energy in the main lobe of the window relative to total energy. -// -// The Kaiser can approximate many other windows by varying the beta -// parameter. -// -// ==== ======================= -// beta Window shape -// ==== ======================= -// 0 Rectangular -// 5 Similar to a Hamming -// 6 Similar to a Hanning -// 8.6 Similar to a Blackman -// ==== ======================= -// -// A beta value of 14 is probably a good starting point. Note that as beta -// gets large, the window narrows, and so the number of samples needs to be -// large enough to sample the increasingly narrow spike, otherwise NaNs will -// get returned. -// -// Most references to the Kaiser window come from the signal processing -// literature, where it is used as one of many windowing functions for -// smoothing values. It is also known as an apodization (which means -// "removing the foot", i.e. smoothing discontinuities at the beginning -// and end of the sampled signal) or tapering function. -// -// References -// ---------- -// .. [1] J. F. Kaiser, "Digital Filters" - Ch 7 in "Systems analysis by -// -// digital computer", Editors: F.F. Kuo and J.F. Kaiser, p 218-285. -// John Wiley and Sons, New York, (1966). -// -// .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The -// -// University of Alberta Press, 1975, pp. 177-178. -// -// .. [3] Wikipedia, "Window function", -// -// https://en.wikipedia.org/wiki/Window_function -// -// Examples -// -------- -// >>> import matplotlib.pyplot as plt -// >>> np.kaiser(12, 14) -// -// array([7.72686684e-06, 3.46009194e-03, 4.65200189e-02, # may vary -// 2.29737120e-01, 5.99885316e-01, 9.45674898e-01, -// 9.45674898e-01, 5.99885316e-01, 2.29737120e-01, -// 4.65200189e-02, 3.46009194e-03, 7.72686684e-06]) -// -// Plot the window and the frequency response: -// -// >>> from numpy.fft import fft, fftshift -// >>> window = np.kaiser(51, 14) -// >>> plt.plot(window) -// [] -// >>> plt.title("Kaiser window") -// Text(0.5, 1.0, 'Kaiser window') -// >>> plt.ylabel("Amplitude") -// Text(0, 0.5, 'Amplitude') -// >>> plt.xlabel("Sample") -// Text(0.5, 0, 'Sample') -// >>> plt.show() -// -// >>> plt.figure() -//
-// >>> A = fft(window, 2048) / 25.5 -// >>> mag = np.abs(fftshift(A)) -// >>> freq = np.linspace(-0.5, 0.5, len(A)) -// >>> response = 20 * np.log10(mag) -// >>> response = np.clip(response, -100, 100) -// >>> plt.plot(freq, response) -// [] -// >>> plt.title("Frequency response of Kaiser window") -// Text(0.5, 1.0, 'Frequency response of Kaiser window') -// >>> plt.ylabel("Magnitude [dB]") -// Text(0, 0.5, 'Magnitude [dB]') -// >>> plt.xlabel("Normalized frequency [cycles per sample]") -// Text(0.5, 0, 'Normalized frequency [cycles per sample]') -// >>> plt.axis('tight') -// (-0.5, 0.5, -100.0, ...) # may vary -// >>> plt.show() -// -//go:linkname Kaiser py.kaiser -func Kaiser(M *py.Object, beta *py.Object) *py.Object - -// Add documentation to an existing object, typically one defined in C -// -// The purpose is to allow easier editing of the docstrings without requiring -// a re-compile. This exists primarily for internal use within numpy itself. -// -// Parameters -// ---------- -// place : str -// -// The absolute name of the module to import from -// -// obj : str -// -// The name of the object to add documentation to, typically a class or -// function name -// -// doc : {str, Tuple[str, str], List[Tuple[str, str]]} -// -// If a string, the documentation to apply to `obj` -// -// If a tuple, then the first element is interpreted as an attribute of -// `obj` and the second as the docstring to apply - ``(method, docstring)`` -// -// If a list, then each element of the list should be a tuple of length -// two - ``[(method1, docstring1), (method2, docstring2), ...]`` -// -// warn_on_python : bool -// -// If True, the default, emit `UserWarning` if this is used to attach -// documentation to a pure-python object. -// -// Notes -// ----- -// This routine never raises an error if the docstring can't be written, but -// will raise an error if the object being documented does not exist. -// -// This routine cannot modify read-only docstrings, as appear -// in new-style classes or built-in functions. Because this -// routine never raises an error the caller must check manually -// that the docstrings were changed. -// -// Since this function grabs the “char *“ from a c-level str object and puts -// it into the “tp_doc“ slot of the type of `obj`, it violates a number of -// C-API best-practices, by: -// -// - modifying a `PyTypeObject` after calling `PyType_Ready` -// - calling `Py_INCREF` on the str and losing the reference, so the str -// will never be released -// -// If possible it should be avoided. -// -//go:linkname AddNewdoc py.add_newdoc -func AddNewdoc(place *py.Object, obj *py.Object, doc *py.Object, warnOnPython *py.Object) *py.Object - -// Find the wrapper for the array with the highest priority. -// -// In case of ties, leftmost wins. If no wrapper is found, return None -// -//go:linkname GetArrayWrap py.get_array_wrap -func GetArrayWrap(__llgo_va_list ...interface{}) *py.Object - -// Broadcast the input shapes into a single shape. -// -// :ref:`Learn more about broadcasting here `. -// -// .. versionadded:: 1.20.0 -// -// Parameters -// ---------- -// `*args` : tuples of ints, or ints -// -// The shapes to be broadcast against each other. -// -// Returns -// ------- -// tuple -// -// Broadcasted shape. -// -// Raises -// ------ -// ValueError -// -// If the shapes are not compatible and cannot be broadcast according -// to NumPy's broadcasting rules. -// -// See Also -// -------- -// broadcast -// broadcast_arrays -// broadcast_to -// -// Examples -// -------- -// >>> np.broadcast_shapes((1, 2), (3, 1), (3, 2)) -// (3, 2) -// -// >>> np.broadcast_shapes((6, 7), (5, 6, 1), (7,), (5, 1, 7)) -// (5, 6, 7) -// -//go:linkname BroadcastShapes py.broadcast_shapes -func BroadcastShapes(__llgo_va_list ...interface{}) *py.Object - -// Return a 2-D array with ones on the diagonal and zeros elsewhere. -// -// Parameters -// ---------- -// N : int -// -// Number of rows in the output. -// -// M : int, optional -// -// Number of columns in the output. If None, defaults to `N`. -// -// k : int, optional -// -// Index of the diagonal: 0 (the default) refers to the main diagonal, -// a positive value refers to an upper diagonal, and a negative value -// to a lower diagonal. -// -// dtype : data-type, optional -// -// Data-type of the returned array. -// -// order : {'C', 'F'}, optional -// -// Whether the output should be stored in row-major (C-style) or -// column-major (Fortran-style) order in memory. -// -// .. versionadded:: 1.14.0 -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// I : ndarray of shape (N,M) -// -// An array where all elements are equal to zero, except for the `k`-th -// diagonal, whose values are equal to one. -// -// See Also -// -------- -// identity : (almost) equivalent function -// diag : diagonal 2-D array from a 1-D array specified by the user. -// -// Examples -// -------- -// >>> np.eye(2, dtype=int) -// array([[1, 0], -// -// [0, 1]]) -// -// >>> np.eye(3, k=1) -// array([[0., 1., 0.], -// -// [0., 0., 1.], -// [0., 0., 0.]]) -// -//go:linkname Eye py.eye -func Eye(N *py.Object, M *py.Object, k *py.Object, dtype *py.Object, order *py.Object) *py.Object - -// An array with ones at and below the given diagonal and zeros elsewhere. -// -// Parameters -// ---------- -// N : int -// -// Number of rows in the array. -// -// M : int, optional -// -// Number of columns in the array. -// By default, `M` is taken equal to `N`. -// -// k : int, optional -// -// The sub-diagonal at and below which the array is filled. -// `k` = 0 is the main diagonal, while `k` < 0 is below it, -// and `k` > 0 is above. The default is 0. -// -// dtype : dtype, optional -// -// Data type of the returned array. The default is float. -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// tri : ndarray of shape (N, M) -// -// Array with its lower triangle filled with ones and zero elsewhere; -// in other words ``T[i,j] == 1`` for ``j <= i + k``, 0 otherwise. -// -// Examples -// -------- -// >>> np.tri(3, 5, 2, dtype=int) -// array([[1, 1, 1, 0, 0], -// -// [1, 1, 1, 1, 0], -// [1, 1, 1, 1, 1]]) -// -// >>> np.tri(3, 5, -1) -// array([[0., 0., 0., 0., 0.], -// -// [1., 0., 0., 0., 0.], -// [1., 1., 0., 0., 0.]]) -// -//go:linkname Tri py.tri -func Tri(N *py.Object, M *py.Object, k *py.Object, dtype *py.Object) *py.Object - -// Return the indices to access (n, n) arrays, given a masking function. -// -// Assume `mask_func` is a function that, for a square array a of size -// “(n, n)“ with a possible offset argument `k`, when called as -// “mask_func(a, k)“ returns a new array with zeros in certain locations -// (functions like `triu` or `tril` do precisely this). Then this function -// returns the indices where the non-zero values would be located. -// -// Parameters -// ---------- -// n : int -// -// The returned indices will be valid to access arrays of shape (n, n). -// -// mask_func : callable -// -// A function whose call signature is similar to that of `triu`, `tril`. -// That is, ``mask_func(x, k)`` returns a boolean array, shaped like `x`. -// `k` is an optional argument to the function. -// -// k : scalar -// -// An optional argument which is passed through to `mask_func`. Functions -// like `triu`, `tril` take a second argument that is interpreted as an -// offset. -// -// Returns -// ------- -// indices : tuple of arrays. -// -// The `n` arrays of indices corresponding to the locations where -// ``mask_func(np.ones((n, n)), k)`` is True. -// -// See Also -// -------- -// triu, tril, triu_indices, tril_indices -// -// Notes -// ----- -// .. versionadded:: 1.4.0 -// -// Examples -// -------- -// These are the indices that would allow you to access the upper triangular -// part of any 3x3 array: -// -// >>> iu = np.mask_indices(3, np.triu) -// -// For example, if `a` is a 3x3 array: -// -// >>> a = np.arange(9).reshape(3, 3) -// >>> a -// array([[0, 1, 2], -// -// [3, 4, 5], -// [6, 7, 8]]) -// -// >>> a[iu] -// array([0, 1, 2, 4, 5, 8]) -// -// An offset can be passed also to the masking function. This gets us the -// indices starting on the first diagonal right of the main one: -// -// >>> iu1 = np.mask_indices(3, np.triu, 1) -// -// with which we now extract only three elements: -// -// >>> a[iu1] -// array([1, 2, 5]) -// -//go:linkname MaskIndices py.mask_indices -func MaskIndices(n *py.Object, maskFunc *py.Object, k *py.Object) *py.Object - -// Return the indices for the lower-triangle of an (n, m) array. -// -// Parameters -// ---------- -// n : int -// -// The row dimension of the arrays for which the returned -// indices will be valid. -// -// k : int, optional -// -// Diagonal offset (see `tril` for details). -// -// m : int, optional -// -// .. versionadded:: 1.9.0 -// -// The column dimension of the arrays for which the returned -// arrays will be valid. -// By default `m` is taken equal to `n`. -// -// Returns -// ------- -// inds : tuple of arrays -// -// The indices for the triangle. The returned tuple contains two arrays, -// each with the indices along one dimension of the array. -// -// See also -// -------- -// triu_indices : similar function, for upper-triangular. -// mask_indices : generic function accepting an arbitrary mask function. -// tril, triu -// -// Notes -// ----- -// .. versionadded:: 1.4.0 -// -// Examples -// -------- -// Compute two different sets of indices to access 4x4 arrays, one for the -// lower triangular part starting at the main diagonal, and one starting two -// diagonals further right: -// -// >>> il1 = np.tril_indices(4) -// >>> il2 = np.tril_indices(4, 2) -// -// Here is how they can be used with a sample array: -// -// >>> a = np.arange(16).reshape(4, 4) -// >>> a -// array([[ 0, 1, 2, 3], -// -// [ 4, 5, 6, 7], -// [ 8, 9, 10, 11], -// [12, 13, 14, 15]]) -// -// Both for indexing: -// -// >>> a[il1] -// array([ 0, 4, 5, ..., 13, 14, 15]) -// -// And for assigning values: -// -// >>> a[il1] = -1 -// >>> a -// array([[-1, 1, 2, 3], -// -// [-1, -1, 6, 7], -// [-1, -1, -1, 11], -// [-1, -1, -1, -1]]) -// -// These cover almost the whole array (two diagonals right of the main one): -// -// >>> a[il2] = -10 -// >>> a -// array([[-10, -10, -10, 3], -// -// [-10, -10, -10, -10], -// [-10, -10, -10, -10], -// [-10, -10, -10, -10]]) -// -//go:linkname TrilIndices py.tril_indices -func TrilIndices(n *py.Object, k *py.Object, m *py.Object) *py.Object - -// Return the indices for the upper-triangle of an (n, m) array. -// -// Parameters -// ---------- -// n : int -// -// The size of the arrays for which the returned indices will -// be valid. -// -// k : int, optional -// -// Diagonal offset (see `triu` for details). -// -// m : int, optional -// -// .. versionadded:: 1.9.0 -// -// The column dimension of the arrays for which the returned -// arrays will be valid. -// By default `m` is taken equal to `n`. -// -// Returns -// ------- -// inds : tuple, shape(2) of ndarrays, shape(`n`) -// -// The indices for the triangle. The returned tuple contains two arrays, -// each with the indices along one dimension of the array. Can be used -// to slice a ndarray of shape(`n`, `n`). -// -// See also -// -------- -// tril_indices : similar function, for lower-triangular. -// mask_indices : generic function accepting an arbitrary mask function. -// triu, tril -// -// Notes -// ----- -// .. versionadded:: 1.4.0 -// -// Examples -// -------- -// Compute two different sets of indices to access 4x4 arrays, one for the -// upper triangular part starting at the main diagonal, and one starting two -// diagonals further right: -// -// >>> iu1 = np.triu_indices(4) -// >>> iu2 = np.triu_indices(4, 2) -// -// Here is how they can be used with a sample array: -// -// >>> a = np.arange(16).reshape(4, 4) -// >>> a -// array([[ 0, 1, 2, 3], -// -// [ 4, 5, 6, 7], -// [ 8, 9, 10, 11], -// [12, 13, 14, 15]]) -// -// Both for indexing: -// -// >>> a[iu1] -// array([ 0, 1, 2, ..., 10, 11, 15]) -// -// And for assigning values: -// -// >>> a[iu1] = -1 -// >>> a -// array([[-1, -1, -1, -1], -// -// [ 4, -1, -1, -1], -// [ 8, 9, -1, -1], -// [12, 13, 14, -1]]) -// -// These cover only a small part of the whole array (two diagonals right -// of the main one): -// -// >>> a[iu2] = -10 -// >>> a -// array([[ -1, -1, -10, -10], -// -// [ 4, -1, -1, -10], -// [ 8, 9, -1, -1], -// [ 12, 13, 14, -1]]) -// -//go:linkname TriuIndices py.triu_indices -func TriuIndices(n *py.Object, k *py.Object, m *py.Object) *py.Object - -// Determine if a class is a subclass of a second class. -// -// `issubclass_` is equivalent to the Python built-in “issubclass“, -// except that it returns False instead of raising a TypeError if one -// of the arguments is not a class. -// -// Parameters -// ---------- -// arg1 : class -// -// Input class. True is returned if `arg1` is a subclass of `arg2`. -// -// arg2 : class or tuple of classes. -// -// Input class. If a tuple of classes, True is returned if `arg1` is a -// subclass of any of the tuple elements. -// -// Returns -// ------- -// out : bool -// -// Whether `arg1` is a subclass of `arg2` or not. -// -// See Also -// -------- -// issubsctype, issubdtype, issctype -// -// Examples -// -------- -// >>> np.issubclass_(np.int32, int) -// False -// >>> np.issubclass_(np.int32, float) -// False -// >>> np.issubclass_(np.float64, float) -// True -// -//go:linkname Issubclass py.issubclass_ -func Issubclass(arg1 *py.Object, arg2 *py.Object) *py.Object - -// Determine if the first argument is a subclass of the second argument. -// -// Parameters -// ---------- -// arg1, arg2 : dtype or dtype specifier -// -// Data-types. -// -// Returns -// ------- -// out : bool -// -// The result. -// -// See Also -// -------- -// issctype, issubdtype, obj2sctype -// -// Examples -// -------- -// >>> np.issubsctype('S8', str) -// False -// >>> np.issubsctype(np.array([1]), int) -// True -// >>> np.issubsctype(np.array([1]), float) -// False -// -//go:linkname Issubsctype py.issubsctype -func Issubsctype(arg1 *py.Object, arg2 *py.Object) *py.Object - -// Issues a DeprecationWarning, adds warning to `old_name`'s -// docstring, rebinds “old_name.__name__“ and returns the new -// function object. -// -// This function may also be used as a decorator. -// -// Parameters -// ---------- -// func : function -// -// The function to be deprecated. -// -// old_name : str, optional -// -// The name of the function to be deprecated. Default is None, in -// which case the name of `func` is used. -// -// new_name : str, optional -// -// The new name for the function. Default is None, in which case the -// deprecation message is that `old_name` is deprecated. If given, the -// deprecation message is that `old_name` is deprecated and `new_name` -// should be used instead. -// -// message : str, optional -// -// Additional explanation of the deprecation. Displayed in the -// docstring after the warning. -// -// Returns -// ------- -// old_func : function -// -// The deprecated function. -// -// Examples -// -------- -// Note that “olduint“ returns a value after printing Deprecation -// Warning: -// -// >>> olduint = np.deprecate(np.uint) -// DeprecationWarning: `uint64` is deprecated! # may vary -// >>> olduint(6) -// 6 -// -//go:linkname Deprecate py.deprecate -func Deprecate(__llgo_va_list ...interface{}) *py.Object - -// Deprecates a function and includes the deprecation in its docstring. -// -// This function is used as a decorator. It returns an object that can be -// used to issue a DeprecationWarning, by passing the to-be decorated -// function as argument, this adds warning to the to-be decorated function's -// docstring and returns the new function object. -// -// See Also -// -------- -// deprecate : Decorate a function such that it issues a `DeprecationWarning` -// -// Parameters -// ---------- -// msg : str -// -// Additional explanation of the deprecation. Displayed in the -// docstring after the warning. -// -// Returns -// ------- -// obj : object -// -//go:linkname DeprecateWithDoc py.deprecate_with_doc -func DeprecateWithDoc(msg *py.Object) *py.Object - -// Return the directory that contains the NumPy \*.h header files. -// -// Extension modules that need to compile against NumPy should use this -// function to locate the appropriate include directory. -// -// Notes -// ----- -// When using “distutils“, for example in “setup.py“:: -// -// import numpy as np -// ... -// Extension('extension_name', ... -// include_dirs=[np.get_include()]) -// ... -// -//go:linkname GetInclude py.get_include -func GetInclude() *py.Object - -// Get help information for an array, function, class, or module. -// -// Parameters -// ---------- -// object : object or str, optional -// -// Input object or name to get information about. If `object` is -// an `ndarray` instance, information about the array is printed. -// If `object` is a numpy object, its docstring is given. If it is -// a string, available modules are searched for matching objects. -// If None, information about `info` itself is returned. -// -// maxwidth : int, optional -// -// Printing width. -// -// output : file like object, optional -// -// File like object that the output is written to, default is -// ``None``, in which case ``sys.stdout`` will be used. -// The object has to be opened in 'w' or 'a' mode. -// -// toplevel : str, optional -// -// Start search at this level. -// -// See Also -// -------- -// source, lookfor -// -// Notes -// ----- -// When used interactively with an object, “np.info(obj)“ is equivalent -// to “help(obj)“ on the Python prompt or “obj?“ on the IPython -// prompt. -// -// Examples -// -------- -// >>> np.info(np.polyval) # doctest: +SKIP -// -// polyval(p, x) -// Evaluate the polynomial p at x. -// ... -// -// When using a string for `object` it is possible to get multiple results. -// -// >>> np.info('fft') # doctest: +SKIP -// -// *** Found in numpy *** -// -// Core FFT routines -// ... -// -// *** Found in numpy.fft *** -// fft(a, n=None, axis=-1) -// -// ... -// -// *** Repeat reference found in numpy.fft.fftpack *** -// *** Total of 3 references found. *** -// -// When the argument is an array, information about the array is printed. -// -// >>> a = np.array([[1 + 2j, 3, -4], [-5j, 6, 0]], dtype=np.complex64) -// >>> np.info(a) -// class: ndarray -// shape: (2, 3) -// strides: (24, 8) -// itemsize: 8 -// aligned: True -// contiguous: True -// fortran: False -// data pointer: 0x562b6e0d2860 # may vary -// byteorder: little -// byteswap: False -// type: complex64 -// -//go:linkname Info py.info -func Info(object *py.Object, maxwidth *py.Object, output *py.Object, toplevel *py.Object) *py.Object - -// Print or write to a file the source code for a NumPy object. -// -// The source code is only returned for objects written in Python. Many -// functions and classes are defined in C and will therefore not return -// useful information. -// -// Parameters -// ---------- -// object : numpy object -// -// Input object. This can be any object (function, class, module, -// ...). -// -// output : file object, optional -// -// If `output` not supplied then source code is printed to screen -// (sys.stdout). File object must be created with either write 'w' or -// append 'a' modes. -// -// See Also -// -------- -// lookfor, info -// -// Examples -// -------- -// >>> np.source(np.interp) #doctest: +SKIP -// In file: /usr/lib/python2.6/dist-packages/numpy/lib/function_base.py -// def interp(x, xp, fp, left=None, right=None): -// -// """.... (full docstring printed)""" -// if isinstance(x, (float, int, number)): -// return compiled_interp([x], xp, fp, left, right).item() -// else: -// return compiled_interp(x, xp, fp, left, right) -// -// The source code is only returned for objects written in Python. -// -// >>> np.source(np.array) #doctest: +SKIP -// Not available for this object. -// -//go:linkname Source py.source -func Source(object *py.Object, output *py.Object) *py.Object - -// Print the NumPy arrays in the given dictionary. -// -// If there is no dictionary passed in or `vardict` is None then returns -// NumPy arrays in the globals() dictionary (all NumPy arrays in the -// namespace). -// -// Parameters -// ---------- -// vardict : dict, optional -// -// A dictionary possibly containing ndarrays. Default is globals(). -// -// Returns -// ------- -// out : None -// -// Returns 'None'. -// -// Notes -// ----- -// Prints out the name, shape, bytes and type of all of the ndarrays -// present in `vardict`. -// -// Examples -// -------- -// >>> a = np.arange(10) -// >>> b = np.ones(20) -// >>> np.who() -// Name Shape Bytes Type -// =========================================================== -// a 10 80 int64 -// b 20 160 float64 -// Upper bound on total bytes = 240 -// -// >>> d = {'x': np.arange(2.0), 'y': np.arange(3.0), 'txt': 'Some str', -// ... 'idx':5} -// >>> np.who(d) -// Name Shape Bytes Type -// =========================================================== -// x 2 16 float64 -// y 3 24 float64 -// Upper bound on total bytes = 40 -// -//go:linkname Who py.who -func Who(vardict *py.Object) *py.Object - -// Do a keyword search on docstrings. -// -// A list of objects that matched the search is displayed, -// sorted by relevance. All given keywords need to be found in the -// docstring for it to be returned as a result, but the order does -// not matter. -// -// Parameters -// ---------- -// what : str -// -// String containing words to look for. -// -// module : str or list, optional -// -// Name of module(s) whose docstrings to go through. -// -// import_modules : bool, optional -// -// Whether to import sub-modules in packages. Default is True. -// -// regenerate : bool, optional -// -// Whether to re-generate the docstring cache. Default is False. -// -// output : file-like, optional -// -// File-like object to write the output to. If omitted, use a pager. -// -// See Also -// -------- -// source, info -// -// Notes -// ----- -// Relevance is determined only roughly, by checking if the keywords occur -// in the function name, at the start of a docstring, etc. -// -// Examples -// -------- -// >>> np.lookfor('binary representation') # doctest: +SKIP -// Search results for 'binary representation' -// ------------------------------------------ -// numpy.binary_repr -// -// Return the binary representation of the input number as a string. -// -// numpy.core.setup_common.long_double_representation -// -// Given a binary dump as given by GNU od -b, look for long double -// -// numpy.base_repr -// -// Return a string representation of a number in the given base system. -// -// ... -// -//go:linkname Lookfor py.lookfor -func Lookfor(what *py.Object, module *py.Object, importModules *py.Object, regenerate *py.Object, output *py.Object) *py.Object - -// Returns pointers to the end-points of an array. -// -// Parameters -// ---------- -// a : ndarray -// -// Input array. It must conform to the Python-side of the array -// interface. -// -// Returns -// ------- -// (low, high) : tuple of 2 integers -// -// The first integer is the first byte of the array, the second -// integer is just past the last byte of the array. If `a` is not -// contiguous it will not use every byte between the (`low`, `high`) -// values. -// -// Examples -// -------- -// >>> I = np.eye(2, dtype='f'); I.dtype -// dtype('float32') -// >>> low, high = np.byte_bounds(I) -// >>> high - low == I.size*I.itemsize -// True -// >>> I = np.eye(2); I.dtype -// dtype('float64') -// >>> low, high = np.byte_bounds(I) -// >>> high - low == I.size*I.itemsize -// True -// -//go:linkname ByteBounds py.byte_bounds -func ByteBounds(a *py.Object) *py.Object - -// Protected string evaluation. -// -// Evaluate a string containing a Python literal expression without -// allowing the execution of arbitrary non-literal code. -// -// .. warning:: -// -// This function is identical to :py:meth:`ast.literal_eval` and -// has the same security implications. It may not always be safe -// to evaluate large input strings. -// -// Parameters -// ---------- -// source : str -// -// The string to evaluate. -// -// Returns -// ------- -// obj : object -// -// The result of evaluating `source`. -// -// Raises -// ------ -// SyntaxError -// -// If the code has invalid Python syntax, or if it contains -// non-literal code. -// -// Examples -// -------- -// >>> np.safe_eval('1') -// 1 -// >>> np.safe_eval('[1, 2, 3]') -// [1, 2, 3] -// >>> np.safe_eval('{"foo": ("bar", 10.0)}') -// {'foo': ('bar', 10.0)} -// -// >>> np.safe_eval('import os') -// Traceback (most recent call last): -// -// ... -// -// SyntaxError: invalid syntax -// -// >>> np.safe_eval('open("/home/user/.ssh/id_dsa").read()') -// Traceback (most recent call last): -// -// ... -// -// ValueError: malformed node or string: <_ast.Call object at 0x...> -// -//go:linkname SafeEval py.safe_eval -func SafeEval(source *py.Object) *py.Object - -// Print information about various resources in the system -// including available intrinsic support and BLAS/LAPACK library -// in use -// -// .. versionadded:: 1.24.0 -// -// See Also -// -------- -// show_config : Show libraries in the system on which NumPy was built. -// -// Notes -// ----- -// 1. Information is derived with the help of `threadpoolctl `_ -// library if available. -// 2. SIMD related information is derived from “__cpu_features__“, -// “__cpu_baseline__“ and “__cpu_dispatch__“ -// -//go:linkname ShowRuntime py.show_runtime -func ShowRuntime() *py.Object - -// Load data from a text file. -// -// Parameters -// ---------- -// fname : file, str, pathlib.Path, list of str, generator -// -// File, filename, list, or generator to read. If the filename -// extension is ``.gz`` or ``.bz2``, the file is first decompressed. Note -// that generators must return bytes or strings. The strings -// in a list or produced by a generator are treated as lines. -// -// dtype : data-type, optional -// -// Data-type of the resulting array; default: float. If this is a -// structured data-type, the resulting array will be 1-dimensional, and -// each row will be interpreted as an element of the array. In this -// case, the number of columns used must match the number of fields in -// the data-type. -// -// comments : str or sequence of str or None, optional -// -// The characters or list of characters used to indicate the start of a -// comment. None implies no comments. For backwards compatibility, byte -// strings will be decoded as 'latin1'. The default is '#'. -// -// delimiter : str, optional -// -// The character used to separate the values. For backwards compatibility, -// byte strings will be decoded as 'latin1'. The default is whitespace. -// -// .. versionchanged:: 1.23.0 -// Only single character delimiters are supported. Newline characters -// cannot be used as the delimiter. -// -// converters : dict or callable, optional -// -// Converter functions to customize value parsing. If `converters` is -// callable, the function is applied to all columns, else it must be a -// dict that maps column number to a parser function. -// See examples for further details. -// Default: None. -// -// .. versionchanged:: 1.23.0 -// The ability to pass a single callable to be applied to all columns -// was added. -// -// skiprows : int, optional -// -// Skip the first `skiprows` lines, including comments; default: 0. -// -// usecols : int or sequence, optional -// -// Which columns to read, with 0 being the first. For example, -// ``usecols = (1,4,5)`` will extract the 2nd, 5th and 6th columns. -// The default, None, results in all columns being read. -// -// .. versionchanged:: 1.11.0 -// When a single column has to be read it is possible to use -// an integer instead of a tuple. E.g ``usecols = 3`` reads the -// fourth column the same way as ``usecols = (3,)`` would. -// -// unpack : bool, optional -// -// If True, the returned array is transposed, so that arguments may be -// unpacked using ``x, y, z = loadtxt(...)``. When used with a -// structured data-type, arrays are returned for each field. -// Default is False. -// -// ndmin : int, optional -// -// The returned array will have at least `ndmin` dimensions. -// Otherwise mono-dimensional axes will be squeezed. -// Legal values: 0 (default), 1 or 2. -// -// .. versionadded:: 1.6.0 -// -// encoding : str, optional -// -// Encoding used to decode the inputfile. Does not apply to input streams. -// The special value 'bytes' enables backward compatibility workarounds -// that ensures you receive byte arrays as results if possible and passes -// 'latin1' encoded strings to converters. Override this value to receive -// unicode arrays and pass strings as input to converters. If set to None -// the system default is used. The default value is 'bytes'. -// -// .. versionadded:: 1.14.0 -// -// max_rows : int, optional -// -// Read `max_rows` rows of content after `skiprows` lines. The default is -// to read all the rows. Note that empty rows containing no data such as -// empty lines and comment lines are not counted towards `max_rows`, -// while such lines are counted in `skiprows`. -// -// .. versionadded:: 1.16.0 -// -// .. versionchanged:: 1.23.0 -// Lines containing no data, including comment lines (e.g., lines -// starting with '#' or as specified via `comments`) are not counted -// towards `max_rows`. -// -// quotechar : unicode character or None, optional -// -// The character used to denote the start and end of a quoted item. -// Occurrences of the delimiter or comment characters are ignored within -// a quoted item. The default value is ``quotechar=None``, which means -// quoting support is disabled. -// -// If two consecutive instances of `quotechar` are found within a quoted -// field, the first is treated as an escape character. See examples. -// -// .. versionadded:: 1.23.0 -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// out : ndarray -// -// Data read from the text file. -// -// See Also -// -------- -// load, fromstring, fromregex -// genfromtxt : Load data with missing values handled as specified. -// scipy.io.loadmat : reads MATLAB data files -// -// Notes -// ----- -// This function aims to be a fast reader for simply formatted files. The -// `genfromtxt` function provides more sophisticated handling of, e.g., -// lines with missing values. -// -// Each row in the input text file must have the same number of values to be -// able to read all values. If all rows do not have same number of values, a -// subset of up to n columns (where n is the least number of values present -// in all rows) can be read by specifying the columns via `usecols`. -// -// .. versionadded:: 1.10.0 -// -// The strings produced by the Python float.hex method can be used as -// input for floats. -// -// Examples -// -------- -// >>> from io import StringIO # StringIO behaves like a file object -// >>> c = StringIO("0 1\n2 3") -// >>> np.loadtxt(c) -// array([[0., 1.], -// -// [2., 3.]]) -// -// >>> d = StringIO("M 21 72\nF 35 58") -// >>> np.loadtxt(d, dtype={'names': ('gender', 'age', 'weight'), -// ... 'formats': ('S1', 'i4', 'f4')}) -// array([(b'M', 21, 72.), (b'F', 35, 58.)], -// -// dtype=[('gender', 'S1'), ('age', '>> c = StringIO("1,0,2\n3,0,4") -// >>> x, y = np.loadtxt(c, delimiter=',', usecols=(0, 2), unpack=True) -// >>> x -// array([1., 3.]) -// >>> y -// array([2., 4.]) -// -// The `converters` argument is used to specify functions to preprocess the -// text prior to parsing. `converters` can be a dictionary that maps -// preprocessing functions to each column: -// -// >>> s = StringIO("1.618, 2.296\n3.141, 4.669\n") -// >>> conv = { -// ... 0: lambda x: np.floor(float(x)), # conversion fn for column 0 -// ... 1: lambda x: np.ceil(float(x)), # conversion fn for column 1 -// ... } -// >>> np.loadtxt(s, delimiter=",", converters=conv) -// array([[1., 3.], -// -// [3., 5.]]) -// -// `converters` can be a callable instead of a dictionary, in which case it -// is applied to all columns: -// -// >>> s = StringIO("0xDE 0xAD\n0xC0 0xDE") -// >>> import functools -// >>> conv = functools.partial(int, base=16) -// >>> np.loadtxt(s, converters=conv) -// array([[222., 173.], -// -// [192., 222.]]) -// -// This example shows how `converters` can be used to convert a field -// with a trailing minus sign into a negative number. -// -// >>> s = StringIO('10.01 31.25-\n19.22 64.31\n17.57- 63.94') -// >>> def conv(fld): -// ... return -float(fld[:-1]) if fld.endswith(b'-') else float(fld) -// ... -// >>> np.loadtxt(s, converters=conv) -// array([[ 10.01, -31.25], -// -// [ 19.22, 64.31], -// [-17.57, 63.94]]) -// -// Using a callable as the converter can be particularly useful for handling -// values with different formatting, e.g. floats with underscores: -// -// >>> s = StringIO("1 2.7 100_000") -// >>> np.loadtxt(s, converters=float) -// array([1.e+00, 2.7e+00, 1.e+05]) -// -// This idea can be extended to automatically handle values specified in -// many different formats: -// -// >>> def conv(val): -// ... try: -// ... return float(val) -// ... except ValueError: -// ... return float.fromhex(val) -// >>> s = StringIO("1, 2.5, 3_000, 0b4, 0x1.4000000000000p+2") -// >>> np.loadtxt(s, delimiter=",", converters=conv, encoding=None) -// array([1.0e+00, 2.5e+00, 3.0e+03, 1.8e+02, 5.0e+00]) -// -// Note that with the default “encoding="bytes"“, the inputs to the -// converter function are latin-1 encoded byte strings. To deactivate the -// implicit encoding prior to conversion, use “encoding=None“ -// -// >>> s = StringIO('10.01 31.25-\n19.22 64.31\n17.57- 63.94') -// >>> conv = lambda x: -float(x[:-1]) if x.endswith('-') else float(x) -// >>> np.loadtxt(s, converters=conv, encoding=None) -// array([[ 10.01, -31.25], -// -// [ 19.22, 64.31], -// [-17.57, 63.94]]) -// -// Support for quoted fields is enabled with the `quotechar` parameter. -// Comment and delimiter characters are ignored when they appear within a -// quoted item delineated by `quotechar`: -// -// >>> s = StringIO('"alpha, #42", 10.0\n"beta, #64", 2.0\n') -// >>> dtype = np.dtype([("label", "U12"), ("value", float)]) -// >>> np.loadtxt(s, dtype=dtype, delimiter=",", quotechar='"') -// array([('alpha, #42', 10.), ('beta, #64', 2.)], -// -// dtype=[('label', '>> s = StringIO('"alpha, #42" 10.0\n"beta, #64" 2.0\n') -// >>> dtype = np.dtype([("label", "U12"), ("value", float)]) -// >>> np.loadtxt(s, dtype=dtype, delimiter=None, quotechar='"') -// array([('alpha, #42', 10.), ('beta, #64', 2.)], -// -// dtype=[('label', '>> s = StringIO('"Hello, my name is ""Monty""!"') -// >>> np.loadtxt(s, dtype="U", delimiter=",", quotechar='"') -// array('Hello, my name is "Monty"!', dtype='>> d = StringIO("1 2\n2 4\n3 9 12\n4 16 20") -// >>> np.loadtxt(d, usecols=(0, 1)) -// array([[ 1., 2.], -// -// [ 2., 4.], -// [ 3., 9.], -// [ 4., 16.]]) -// -//go:linkname Loadtxt py.loadtxt -func Loadtxt(fname *py.Object, dtype *py.Object, comments *py.Object, delimiter *py.Object, converters *py.Object, skiprows *py.Object, usecols *py.Object, unpack *py.Object, ndmin *py.Object, encoding *py.Object, maxRows *py.Object) *py.Object - -// Load data from a text file, with missing values handled as specified. -// -// Each line past the first `skip_header` lines is split at the `delimiter` -// character, and characters following the `comments` character are discarded. -// -// Parameters -// ---------- -// fname : file, str, pathlib.Path, list of str, generator -// -// File, filename, list, or generator to read. If the filename -// extension is ``.gz`` or ``.bz2``, the file is first decompressed. Note -// that generators must return bytes or strings. The strings -// in a list or produced by a generator are treated as lines. -// -// dtype : dtype, optional -// -// Data type of the resulting array. -// If None, the dtypes will be determined by the contents of each -// column, individually. -// -// comments : str, optional -// -// The character used to indicate the start of a comment. -// All the characters occurring on a line after a comment are discarded. -// -// delimiter : str, int, or sequence, optional -// -// The string used to separate values. By default, any consecutive -// whitespaces act as delimiter. An integer or sequence of integers -// can also be provided as width(s) of each field. -// -// skiprows : int, optional -// -// `skiprows` was removed in numpy 1.10. Please use `skip_header` instead. -// -// skip_header : int, optional -// -// The number of lines to skip at the beginning of the file. -// -// skip_footer : int, optional -// -// The number of lines to skip at the end of the file. -// -// converters : variable, optional -// -// The set of functions that convert the data of a column to a value. -// The converters can also be used to provide a default value -// for missing data: ``converters = {3: lambda s: float(s or 0)}``. -// -// missing : variable, optional -// -// `missing` was removed in numpy 1.10. Please use `missing_values` -// instead. -// -// missing_values : variable, optional -// -// The set of strings corresponding to missing data. -// -// filling_values : variable, optional -// -// The set of values to be used as default when the data are missing. -// -// usecols : sequence, optional -// -// Which columns to read, with 0 being the first. For example, -// ``usecols = (1, 4, 5)`` will extract the 2nd, 5th and 6th columns. -// -// names : {None, True, str, sequence}, optional -// -// If `names` is True, the field names are read from the first line after -// the first `skip_header` lines. This line can optionally be preceded -// by a comment delimiter. If `names` is a sequence or a single-string of -// comma-separated names, the names will be used to define the field names -// in a structured dtype. If `names` is None, the names of the dtype -// fields will be used, if any. -// -// excludelist : sequence, optional -// -// A list of names to exclude. This list is appended to the default list -// ['return','file','print']. Excluded names are appended with an -// underscore: for example, `file` would become `file_`. -// -// deletechars : str, optional -// -// A string combining invalid characters that must be deleted from the -// names. -// -// defaultfmt : str, optional -// -// A format used to define default field names, such as "f%i" or "f_%02i". -// -// autostrip : bool, optional -// -// Whether to automatically strip white spaces from the variables. -// -// replace_space : char, optional -// -// Character(s) used in replacement of white spaces in the variable -// names. By default, use a '_'. -// -// case_sensitive : {True, False, 'upper', 'lower'}, optional -// -// If True, field names are case sensitive. -// If False or 'upper', field names are converted to upper case. -// If 'lower', field names are converted to lower case. -// -// unpack : bool, optional -// -// If True, the returned array is transposed, so that arguments may be -// unpacked using ``x, y, z = genfromtxt(...)``. When used with a -// structured data-type, arrays are returned for each field. -// Default is False. -// -// usemask : bool, optional -// -// If True, return a masked array. -// If False, return a regular array. -// -// loose : bool, optional -// -// If True, do not raise errors for invalid values. -// -// invalid_raise : bool, optional -// -// If True, an exception is raised if an inconsistency is detected in the -// number of columns. -// If False, a warning is emitted and the offending lines are skipped. -// -// max_rows : int, optional -// -// The maximum number of rows to read. Must not be used with skip_footer -// at the same time. If given, the value must be at least 1. Default is -// to read the entire file. -// -// .. versionadded:: 1.10.0 -// -// encoding : str, optional -// -// Encoding used to decode the inputfile. Does not apply when `fname` is -// a file object. The special value 'bytes' enables backward compatibility -// workarounds that ensure that you receive byte arrays when possible -// and passes latin1 encoded strings to converters. Override this value to -// receive unicode arrays and pass strings as input to converters. If set -// to None the system default is used. The default value is 'bytes'. -// -// .. versionadded:: 1.14.0 -// -// ndmin : int, optional -// -// Same parameter as `loadtxt` -// -// .. versionadded:: 1.23.0 -// -// like : array_like, optional -// -// Reference object to allow the creation of arrays which are not -// NumPy arrays. If an array-like passed in as ``like`` supports -// the ``__array_function__`` protocol, the result will be defined -// by it. In this case, it ensures the creation of an array object -// compatible with that passed in via this argument. -// -// .. versionadded:: 1.20.0 -// -// Returns -// ------- -// out : ndarray -// -// Data read from the text file. If `usemask` is True, this is a -// masked array. -// -// See Also -// -------- -// numpy.loadtxt : equivalent function when no data is missing. -// -// Notes -// ----- -// - When spaces are used as delimiters, or when no delimiter has been given -// as input, there should not be any missing data between two fields. -// - When the variables are named (either by a flexible dtype or with `names`), -// there must not be any header in the file (else a ValueError -// exception is raised). -// - Individual values are not stripped of spaces by default. -// When using a custom converter, make sure the function does remove spaces. -// -// References -// ---------- -// .. [1] NumPy User Guide, section `I/O with NumPy -// -// `_. -// -// Examples -// -------- -// >>> from io import StringIO -// >>> import numpy as np -// -// # Comma delimited file with mixed dtype -// -// >>> s = StringIO(u"1,1.3,abcde") -// >>> data = np.genfromtxt(s, dtype=[('myint','i8'),('myfloat','f8'), -// ... ('mystring','S5')], delimiter=",") -// >>> data -// array((1, 1.3, b'abcde'), -// -// dtype=[('myint', '>> _ = s.seek(0) # needed for StringIO example only -// >>> data = np.genfromtxt(s, dtype=None, -// ... names = ['myint','myfloat','mystring'], delimiter=",") -// >>> data -// array((1, 1.3, b'abcde'), -// -// dtype=[('myint', '>> _ = s.seek(0) -// >>> data = np.genfromtxt(s, dtype="i8,f8,S5", -// ... names=['myint','myfloat','mystring'], delimiter=",") -// >>> data -// array((1, 1.3, b'abcde'), -// -// dtype=[('myint', '>> s = StringIO(u"11.3abcde") -// >>> data = np.genfromtxt(s, dtype=None, names=['intvar','fltvar','strvar'], -// ... delimiter=[1,3,5]) -// >>> data -// array((1, 1.3, b'abcde'), -// -// dtype=[('intvar', '>> f = StringIO(”' -// ... text,# of chars -// ... hello world,11 -// ... numpy,5”') -// >>> np.genfromtxt(f, dtype='S12,S12', delimiter=',') -// array([(b'text', b”), (b'hello world', b'11'), (b'numpy', b'5')], -// -// dtype=[('f0', 'S12'), ('f1', 'S12')]) -// -//go:linkname Genfromtxt py.genfromtxt -func Genfromtxt(fname *py.Object, dtype *py.Object, comments *py.Object, delimiter *py.Object, skipHeader *py.Object, skipFooter *py.Object, converters *py.Object, missingValues *py.Object, fillingValues *py.Object, usecols *py.Object, names *py.Object, excludelist *py.Object, deletechars *py.Object, replaceSpace *py.Object, autostrip *py.Object, caseSensitive *py.Object, defaultfmt *py.Object, unpack *py.Object, usemask *py.Object, loose *py.Object, invalidRaise *py.Object, maxRows *py.Object, encoding *py.Object) *py.Object - -// Load ASCII data from a file and return it in a record array. -// -// If “usemask=False“ a standard `recarray` is returned, -// if “usemask=True“ a MaskedRecords array is returned. -// -// Parameters -// ---------- -// fname, kwargs : For a description of input parameters, see `genfromtxt`. -// -// See Also -// -------- -// numpy.genfromtxt : generic function -// -// Notes -// ----- -// By default, `dtype` is None, which means that the data-type of the output -// array will be determined from the data. -// -//go:linkname Recfromtxt py.recfromtxt -func Recfromtxt(fname *py.Object) *py.Object - -// Load ASCII data stored in a comma-separated file. -// -// The returned array is a record array (if “usemask=False“, see -// `recarray`) or a masked record array (if “usemask=True“, -// see `ma.mrecords.MaskedRecords`). -// -// Parameters -// ---------- -// fname, kwargs : For a description of input parameters, see `genfromtxt`. -// -// See Also -// -------- -// numpy.genfromtxt : generic function to load ASCII data. -// -// Notes -// ----- -// By default, `dtype` is None, which means that the data-type of the output -// array will be determined from the data. -// -//go:linkname Recfromcsv py.recfromcsv -func Recfromcsv(fname *py.Object) *py.Object - -// Load arrays or pickled objects from “.npy“, “.npz“ or pickled files. -// -// .. warning:: Loading files that contain object arrays uses the “pickle“ -// -// module, which is not secure against erroneous or maliciously -// constructed data. Consider passing ``allow_pickle=False`` to -// load data that is known not to contain object arrays for the -// safer handling of untrusted sources. -// -// Parameters -// ---------- -// file : file-like object, string, or pathlib.Path -// -// The file to read. File-like objects must support the -// ``seek()`` and ``read()`` methods and must always -// be opened in binary mode. Pickled files require that the -// file-like object support the ``readline()`` method as well. -// -// mmap_mode : {None, 'r+', 'r', 'w+', 'c'}, optional -// -// If not None, then memory-map the file, using the given mode (see -// `numpy.memmap` for a detailed description of the modes). A -// memory-mapped array is kept on disk. However, it can be accessed -// and sliced like any ndarray. Memory mapping is especially useful -// for accessing small fragments of large files without reading the -// entire file into memory. -// -// allow_pickle : bool, optional -// -// Allow loading pickled object arrays stored in npy files. Reasons for -// disallowing pickles include security, as loading pickled data can -// execute arbitrary code. If pickles are disallowed, loading object -// arrays will fail. Default: False -// -// .. versionchanged:: 1.16.3 -// Made default False in response to CVE-2019-6446. -// -// fix_imports : bool, optional -// -// Only useful when loading Python 2 generated pickled files on Python 3, -// which includes npy/npz files containing object arrays. If `fix_imports` -// is True, pickle will try to map the old Python 2 names to the new names -// used in Python 3. -// -// encoding : str, optional -// -// What encoding to use when reading Python 2 strings. Only useful when -// loading Python 2 generated pickled files in Python 3, which includes -// npy/npz files containing object arrays. Values other than 'latin1', -// 'ASCII', and 'bytes' are not allowed, as they can corrupt numerical -// data. Default: 'ASCII' -// -// max_header_size : int, optional -// -// Maximum allowed size of the header. Large headers may not be safe -// to load securely and thus require explicitly passing a larger value. -// See :py:func:`ast.literal_eval()` for details. -// This option is ignored when `allow_pickle` is passed. In that case -// the file is by definition trusted and the limit is unnecessary. -// -// Returns -// ------- -// result : array, tuple, dict, etc. -// -// Data stored in the file. For ``.npz`` files, the returned instance -// of NpzFile class must be closed to avoid leaking file descriptors. -// -// Raises -// ------ -// OSError -// -// If the input file does not exist or cannot be read. -// -// UnpicklingError -// -// If ``allow_pickle=True``, but the file cannot be loaded as a pickle. -// -// ValueError -// -// The file contains an object array, but ``allow_pickle=False`` given. -// -// EOFError -// -// When calling ``np.load`` multiple times on the same file handle, -// if all data has already been read -// -// See Also -// -------- -// save, savez, savez_compressed, loadtxt -// memmap : Create a memory-map to an array stored in a file on disk. -// lib.format.open_memmap : Create or load a memory-mapped “.npy“ file. -// -// Notes -// ----- -// -// - If the file contains pickle data, then whatever object is stored -// in the pickle is returned. -// -// - If the file is a “.npy“ file, then a single array is returned. -// -// - If the file is a “.npz“ file, then a dictionary-like object is -// returned, containing “{filename: array}“ key-value pairs, one for -// each file in the archive. -// -// - If the file is a “.npz“ file, the returned value supports the -// context manager protocol in a similar fashion to the open function:: -// -// with load('foo.npz') as data: -// a = data['a'] -// -// The underlying file descriptor is closed when exiting the 'with' -// block. -// -// Examples -// -------- -// Store data to disk, and load it again: -// -// >>> np.save('/tmp/123', np.array([[1, 2, 3], [4, 5, 6]])) -// >>> np.load('/tmp/123.npy') -// array([[1, 2, 3], -// -// [4, 5, 6]]) -// -// Store compressed data to disk, and load it again: -// -// >>> a=np.array([[1, 2, 3], [4, 5, 6]]) -// >>> b=np.array([1, 2]) -// >>> np.savez('/tmp/123.npz', a=a, b=b) -// >>> data = np.load('/tmp/123.npz') -// >>> data['a'] -// array([[1, 2, 3], -// -// [4, 5, 6]]) -// -// >>> data['b'] -// array([1, 2]) -// >>> data.close() -// -// Mem-map the stored array, and then access the second row -// directly from disk: -// -// >>> X = np.load('/tmp/123.npy', mmap_mode='r') -// >>> X[1, :] -// memmap([4, 5, 6]) -// -//go:linkname Load py.load -func Load(file *py.Object, mmapMode *py.Object, allowPickle *py.Object, fixImports *py.Object, encoding *py.Object) *py.Object - -// Construct an array from a text file, using regular expression parsing. -// -// The returned array is always a structured array, and is constructed from -// all matches of the regular expression in the file. Groups in the regular -// expression are converted to fields of the structured array. -// -// Parameters -// ---------- -// file : path or file -// -// Filename or file object to read. -// -// .. versionchanged:: 1.22.0 -// Now accepts `os.PathLike` implementations. -// -// regexp : str or regexp -// -// Regular expression used to parse the file. -// Groups in the regular expression correspond to fields in the dtype. -// -// dtype : dtype or list of dtypes -// -// Dtype for the structured array; must be a structured datatype. -// -// encoding : str, optional -// -// Encoding used to decode the inputfile. Does not apply to input streams. -// -// .. versionadded:: 1.14.0 -// -// Returns -// ------- -// output : ndarray -// -// The output array, containing the part of the content of `file` that -// was matched by `regexp`. `output` is always a structured array. -// -// Raises -// ------ -// TypeError -// -// When `dtype` is not a valid dtype for a structured array. -// -// See Also -// -------- -// fromstring, loadtxt -// -// Notes -// ----- -// Dtypes for structured arrays can be specified in several forms, but all -// forms specify at least the data type and field name. For details see -// `basics.rec`. -// -// Examples -// -------- -// >>> from io import StringIO -// >>> text = StringIO("1312 foo\n1534 bar\n444 qux") -// -// >>> regexp = r"(\d+)\s+(...)" # match [digits, whitespace, anything] -// >>> output = np.fromregex(text, regexp, -// ... [('num', np.int64), ('key', 'S3')]) -// >>> output -// array([(1312, b'foo'), (1534, b'bar'), ( 444, b'qux')], -// -// dtype=[('num', '>> output['num'] -// array([1312, 1534, 444]) -// -//go:linkname Fromregex py.fromregex -func Fromregex(file *py.Object, regexp *py.Object, dtype *py.Object, encoding *py.Object) *py.Object - -// Build a matrix object from a string, nested sequence, or array. -// -// Parameters -// ---------- -// obj : str or array_like -// -// Input data. If a string, variables in the current scope may be -// referenced by name. -// -// ldict : dict, optional -// -// A dictionary that replaces local operands in current frame. -// Ignored if `obj` is not a string or `gdict` is None. -// -// gdict : dict, optional -// -// A dictionary that replaces global operands in current frame. -// Ignored if `obj` is not a string. -// -// Returns -// ------- -// out : matrix -// -// Returns a matrix object, which is a specialized 2-D array. -// -// See Also -// -------- -// block : -// -// A generalization of this function for N-d arrays, that returns normal -// ndarrays. -// -// Examples -// -------- -// >>> A = np.mat('1 1; 1 1') -// >>> B = np.mat('2 2; 2 2') -// >>> C = np.mat('3 4; 5 6') -// >>> D = np.mat('7 8; 9 0') -// -// All the following expressions construct the same block matrix: -// -// >>> np.bmat([[A, B], [C, D]]) -// matrix([[1, 1, 2, 2], -// -// [1, 1, 2, 2], -// [3, 4, 7, 8], -// [5, 6, 9, 0]]) -// -// >>> np.bmat(np.r_[np.c_[A, B], np.c_[C, D]]) -// matrix([[1, 1, 2, 2], -// -// [1, 1, 2, 2], -// [3, 4, 7, 8], -// [5, 6, 9, 0]]) -// -// >>> np.bmat('A,B; C,D') -// matrix([[1, 1, 2, 2], -// -// [1, 1, 2, 2], -// [3, 4, 7, 8], -// [5, 6, 9, 0]]) -// -//go:linkname Bmat py.bmat -func Bmat(obj *py.Object, ldict *py.Object, gdict *py.Object) *py.Object - -// Interpret the input as a matrix. -// -// Unlike `matrix`, `asmatrix` does not make a copy if the input is already -// a matrix or an ndarray. Equivalent to “matrix(data, copy=False)“. -// -// Parameters -// ---------- -// data : array_like -// -// Input data. -// -// dtype : data-type -// -// Data-type of the output matrix. -// -// Returns -// ------- -// mat : matrix -// -// `data` interpreted as a matrix. -// -// Examples -// -------- -// >>> x = np.array([[1, 2], [3, 4]]) -// -// >>> m = np.asmatrix(x) -// -// >>> x[0,0] = 5 -// -// >>> m -// matrix([[5, 2], -// -// [3, 4]]) -// -//go:linkname Mat py.mat -func Mat(data *py.Object, dtype *py.Object) *py.Object - -// Interpret the input as a matrix. -// -// Unlike `matrix`, `asmatrix` does not make a copy if the input is already -// a matrix or an ndarray. Equivalent to “matrix(data, copy=False)“. -// -// Parameters -// ---------- -// data : array_like -// -// Input data. -// -// dtype : data-type -// -// Data-type of the output matrix. -// -// Returns -// ------- -// mat : matrix -// -// `data` interpreted as a matrix. -// -// Examples -// -------- -// >>> x = np.array([[1, 2], [3, 4]]) -// -// >>> m = np.asmatrix(x) -// -// >>> x[0,0] = 5 -// -// >>> m -// matrix([[5, 2], -// -// [3, 4]]) -// -//go:linkname Asmatrix py.asmatrix -func Asmatrix(data *py.Object, dtype *py.Object) *py.Object - -// absolute(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) -// -// Calculate the absolute value element-wise. -// -// “np.abs“ is a shorthand for this function. -// -// Parameters -// ---------- -// x : array_like -// -// Input array. -// -// out : ndarray, None, or tuple of ndarray and None, optional -// -// A location into which the result is stored. If provided, it must have -// a shape that the inputs broadcast to. If not provided or None, -// a freshly-allocated array is returned. A tuple (possible only as a -// keyword argument) must have length equal to the number of outputs. -// -// where : array_like, optional -// -// This condition is broadcast over the input. At locations where the -// condition is True, the `out` array will be set to the ufunc result. -// Elsewhere, the `out` array will retain its original value. -// Note that if an uninitialized `out` array is created via the default -// ``out=None``, locations within it where the condition is False will -// remain uninitialized. -// -// **kwargs -// -// For other keyword-only arguments, see the -// :ref:`ufunc docs `. -// -// Returns -// ------- -// absolute : ndarray -// -// An ndarray containing the absolute value of -// each element in `x`. For complex input, ``a + ib``, the -// absolute value is :math:`\sqrt{ a^2 + b^2 }`. -// This is a scalar if `x` is a scalar. -// -// Examples -// -------- -// >>> x = np.array([-1.2, 1.2]) -// >>> np.absolute(x) -// array([ 1.2, 1.2]) -// >>> np.absolute(1.2 + 1j) -// 1.5620499351813308 -// -// Plot the function over “[-10, 10]“: -// -// >>> import matplotlib.pyplot as plt -// -// >>> x = np.linspace(start=-10, stop=10, num=101) -// >>> plt.plot(x, np.absolute(x)) -// >>> plt.show() -// -// Plot the function over the complex plane: -// -// >>> xx = x + 1j * x[:, np.newaxis] -// >>> plt.imshow(np.abs(xx), extent=[-10, 10, -10, 10], cmap='gray') -// >>> plt.show() -// -// The `abs` function can be used as a shorthand for “np.absolute“ on -// ndarrays. -// -// >>> x = np.array([-1.2, 1.2]) -// >>> abs(x) -// array([1.2, 1.2]) -// -//go:linkname Abs py.abs -func Abs(__llgo_va_list ...interface{}) *py.Object diff --git a/py/numpy/numpy.go b/py/numpy/numpy.go deleted file mode 100644 index 319edd1f..00000000 --- a/py/numpy/numpy.go +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package numpy - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -// https://numpy.org/doc/stable/reference/index.html#reference - -// Return evenly spaced values within a given interval. -// -// numpy.arange([start, ]stop, [step, ]dtype=None, *, like=None) -// -// See https://numpy.org/doc/stable/reference/generated/numpy.arange.html#numpy-arange -// -//go:linkname Arange py.arange -func Arange(start, stop, step, dtype *py.Object) *py.Object - -// Return a new array of given shape and type, without initializing entries. -// -// numpy.empty(shape, dtype=float, order='C', *, like=None) -// -// See https://numpy.org/doc/stable/reference/generated/numpy.empty.html#numpy-empty -// -//go:linkname Empty py.empty -func Empty(shape, dtype, order *py.Object) *py.Object - -// Return a new array of given shape and type, filled with zeros. -// -// numpy.zeros(shape, dtype=float, order='C', *, like=None) -// -// See https://numpy.org/doc/stable/reference/generated/numpy.zeros.html#numpy-zeros -// -//go:linkname Zeros py.zeros -func Zeros(shape, dtype, order *py.Object) *py.Object - -// Create an array. -// -// numpy.array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0, like=None) -// -// See https://numpy.org/doc/stable/reference/generated/numpy.array.html#numpy-array -// -//go:linkname Array py.array -func Array(object, dtype *py.Object) *py.Object - -// Convert the input to an array. -// -// numpy.asarray(a, dtype=None, order=None, *, like=None) -// -// See https://numpy.org/doc/stable/reference/generated/numpy.asarray.html#numpy-asarray -// -//go:linkname AsArray py.asarray -func AsArray(a, dtype, order *py.Object) *py.Object diff --git a/py/object.go b/py/object.go deleted file mode 100644 index 56309d72..00000000 --- a/py/object.go +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/object.html - -// Object represents a Python object. -type Object struct { - Unused [8]byte -} - -// llgo:link (*Object).DecRef C.Py_DecRef -func (o *Object) DecRef() {} - -// llgo:link (*Object).Type C.PyObject_Type -func (o *Object) Type() *Object { return nil } - -// Compute a string representation of object o. Returns the string representation on -// success, nil on failure. This is the equivalent of the Python expression str(o). -// Called by the str() built-in function and, therefore, by the print() function. -// -// llgo:link (*Object).Str C.PyObject_Str -func (o *Object) Str() *Object { return nil } - -// Returns 1 if the object o is considered to be true, and 0 otherwise. This is equivalent -// to the Python expression not not o. On failure, return -1. -// -// llgo:link (*Object).IsTrue C.PyObject_IsTrue -func (o *Object) IsTrue() c.Int { return -1 } - -// Returns 0 if the object o is considered to be true, and 1 otherwise. This is equivalent -// to the Python expression not o. On failure, return -1. -// -// llgo:link (*Object).NotTrue C.PyObject_Not -func (o *Object) NotTrue() c.Int { return -1 } - -// ----------------------------------------------------------------------------- - -// Retrieve an attribute named attrName from object o. Returns the attribute value on success, -// or nil on failure. This is the equivalent of the Python expression o.attrName. -// -// llgo:link (*Object).GetAttr C.PyObject_GetAttr -func (o *Object) GetAttr(attrName *Object) *Object { return nil } - -// llgo:link (*Object).GetAttrString C.PyObject_GetAttrString -func (o *Object) GetAttrString(attrName *c.Char) *Object { return nil } - -// ----------------------------------------------------------------------------- diff --git a/py/os/gen.go b/py/os/gen.go deleted file mode 100644 index 8e3f3b68..00000000 --- a/py/os/gen.go +++ /dev/null @@ -1,1429 +0,0 @@ -package os - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.os" - -// Perform a stat system call on the given path. -// -// path -// Path to be examined; can be string, bytes, a path-like object or -// open-file-descriptor int. -// dir_fd -// If not None, it should be a file descriptor open to a directory, -// and path should be a relative string; path will then be relative to -// that directory. -// follow_symlinks -// If False, and the last element of the path is a symbolic link, -// stat will examine the symbolic link itself instead of the file -// the link points to. -// -// dir_fd and follow_symlinks may not be implemented -// -// on your platform. If they are unavailable, using them will raise a -// NotImplementedError. -// -// It's an error to use dir_fd or follow_symlinks when specifying path as -// -// an open file descriptor. -// -//go:linkname Stat py.stat -func Stat(path *py.Object) *py.Object - -// Use the real uid/gid to test for access to a path. -// -// path -// Path to be tested; can be string, bytes, or a path-like object. -// mode -// Operating-system mode bitfield. Can be F_OK to test existence, -// or the inclusive-OR of R_OK, W_OK, and X_OK. -// dir_fd -// If not None, it should be a file descriptor open to a directory, -// and path should be relative; path will then be relative to that -// directory. -// effective_ids -// If True, access will use the effective uid/gid instead of -// the real uid/gid. -// follow_symlinks -// If False, and the last element of the path is a symbolic link, -// access will examine the symbolic link itself instead of the file -// the link points to. -// -// dir_fd, effective_ids, and follow_symlinks may not be implemented -// -// on your platform. If they are unavailable, using them will raise a -// NotImplementedError. -// -// Note that most operations will use the effective uid/gid, therefore this -// -// routine can be used in a suid/sgid environment to test if the invoking user -// has the specified access to the path. -// -//go:linkname Access py.access -func Access(path *py.Object, mode *py.Object) *py.Object - -// Return the name of the terminal device connected to 'fd'. -// -// fd -// Integer file descriptor handle. -// -//go:linkname Ttyname py.ttyname -func Ttyname(fd *py.Object) *py.Object - -// Change the current working directory to the specified path. -// -// path may always be specified as a string. -// On some platforms, path may also be specified as an open file descriptor. -// -// If this functionality is unavailable, using it raises an exception. -// -//go:linkname Chdir py.chdir -func Chdir(path *py.Object) *py.Object - -// Set file flags. -// -// If follow_symlinks is False, and the last element of the path is a symbolic -// -// link, chflags will change flags on the symbolic link itself instead of the -// file the link points to. -// -// follow_symlinks may not be implemented on your platform. If it is -// unavailable, using it will raise a NotImplementedError. -// -//go:linkname Chflags py.chflags -func Chflags(path *py.Object, flags *py.Object, followSymlinks *py.Object) *py.Object - -// Change the access permissions of a file. -// -// path -// Path to be modified. May always be specified as a str, bytes, or a path-like object. -// On some platforms, path may also be specified as an open file descriptor. -// If this functionality is unavailable, using it raises an exception. -// mode -// Operating-system mode bitfield. -// Be careful when using number literals for *mode*. The conventional UNIX notation for -// numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in -// Python. -// dir_fd -// If not None, it should be a file descriptor open to a directory, -// and path should be relative; path will then be relative to that -// directory. -// follow_symlinks -// If False, and the last element of the path is a symbolic link, -// chmod will modify the symbolic link itself instead of the file -// the link points to. -// -// It is an error to use dir_fd or follow_symlinks when specifying path as -// -// an open file descriptor. -// -// dir_fd and follow_symlinks may not be implemented on your platform. -// -// If they are unavailable, using them will raise a NotImplementedError. -// -//go:linkname Chmod py.chmod -func Chmod(path *py.Object, mode *py.Object) *py.Object - -// Change the access permissions of the file given by file descriptor fd. -// -// fd -// The file descriptor of the file to be modified. -// mode -// Operating-system mode bitfield. -// Be careful when using number literals for *mode*. The conventional UNIX notation for -// numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in -// Python. -// -// Equivalent to os.chmod(fd, mode). -// -//go:linkname Fchmod py.fchmod -func Fchmod(fd *py.Object, mode *py.Object) *py.Object - -// Change the access permissions of a file, without following symbolic links. -// -// If path is a symlink, this affects the link itself rather than the target. -// Equivalent to chmod(path, mode, follow_symlinks=False)." -// -//go:linkname Lchmod py.lchmod -func Lchmod(path *py.Object, mode *py.Object) *py.Object - -// Change the owner and group id of path to the numeric uid and gid.\ -// -// path -// Path to be examined; can be string, bytes, a path-like object, or open-file-descriptor int. -// dir_fd -// If not None, it should be a file descriptor open to a directory, -// and path should be relative; path will then be relative to that -// directory. -// follow_symlinks -// If False, and the last element of the path is a symbolic link, -// stat will examine the symbolic link itself instead of the file -// the link points to. -// -// path may always be specified as a string. -// On some platforms, path may also be specified as an open file descriptor. -// -// If this functionality is unavailable, using it raises an exception. -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// If follow_symlinks is False, and the last element of the path is a symbolic -// -// link, chown will modify the symbolic link itself instead of the file the -// link points to. -// -// It is an error to use dir_fd or follow_symlinks when specifying path as -// -// an open file descriptor. -// -// dir_fd and follow_symlinks may not be implemented on your platform. -// -// If they are unavailable, using them will raise a NotImplementedError. -// -//go:linkname Chown py.chown -func Chown(path *py.Object, uid *py.Object, gid *py.Object) *py.Object - -// Change the owner and group id of the file specified by file descriptor. -// -// Equivalent to os.chown(fd, uid, gid). -// -//go:linkname Fchown py.fchown -func Fchown(fd *py.Object, uid *py.Object, gid *py.Object) *py.Object - -// Change the owner and group id of path to the numeric uid and gid. -// -// This function will not follow symbolic links. -// Equivalent to os.chown(path, uid, gid, follow_symlinks=False). -// -//go:linkname Lchown py.lchown -func Lchown(path *py.Object, uid *py.Object, gid *py.Object) *py.Object - -// Set file flags. -// -// This function will not follow symbolic links. -// Equivalent to chflags(path, flags, follow_symlinks=False). -// -//go:linkname Lchflags py.lchflags -func Lchflags(path *py.Object, flags *py.Object) *py.Object - -// Change root directory to path. -// -//go:linkname Chroot py.chroot -func Chroot(path *py.Object) *py.Object - -// Return the name of the controlling terminal for this process. -// -//go:linkname Ctermid py.ctermid -func Ctermid() *py.Object - -// Return a unicode string representing the current working directory. -// -//go:linkname Getcwd py.getcwd -func Getcwd() *py.Object - -// Return a bytes string representing the current working directory. -// -//go:linkname Getcwdb py.getcwdb -func Getcwdb() *py.Object - -// Create a hard link to a file. -// -// If either src_dir_fd or dst_dir_fd is not None, it should be a file -// -// descriptor open to a directory, and the respective path string (src or dst) -// should be relative; the path will then be relative to that directory. -// -// If follow_symlinks is False, and the last element of src is a symbolic -// -// link, link will create a link to the symbolic link itself instead of the -// file the link points to. -// -// src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your -// -// platform. If they are unavailable, using them will raise a -// NotImplementedError. -// -//go:linkname Link py.link -func Link(src *py.Object, dst *py.Object) *py.Object - -// Return a list containing the names of the files in the directory. -// -// path can be specified as either str, bytes, or a path-like object. If path is bytes, -// -// the filenames returned will also be bytes; in all other circumstances -// the filenames returned will be str. -// -// If path is None, uses the path='.'. -// -// On some platforms, path may also be specified as an open file descriptor;\ -// the file descriptor must refer to a directory. -// If this functionality is unavailable, using it raises NotImplementedError. -// -// The list is in arbitrary order. It does not include the special -// entries '.' and '..' even if they are present in the directory. -// -//go:linkname Listdir py.listdir -func Listdir(path *py.Object) *py.Object - -// Perform a stat system call on the given path, without following symbolic links. -// -// Like stat(), but do not follow symbolic links. -// Equivalent to stat(path, follow_symlinks=False). -// -//go:linkname Lstat py.lstat -func Lstat(path *py.Object) *py.Object - -// Create a directory. -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -// The mode argument is ignored on Windows. Where it is used, the current umask -// value is first masked out. -// -//go:linkname Mkdir py.mkdir -func Mkdir(path *py.Object, mode *py.Object) *py.Object - -// Add increment to the priority of process and return the new priority. -// -//go:linkname Nice py.nice -func Nice(increment *py.Object) *py.Object - -// Return program scheduling priority. -// -//go:linkname Getpriority py.getpriority -func Getpriority(which *py.Object, who *py.Object) *py.Object - -// Set program scheduling priority. -// -//go:linkname Setpriority py.setpriority -func Setpriority(which *py.Object, who *py.Object, priority *py.Object) *py.Object - -// Remove a directory. -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Rmdir py.rmdir -func Rmdir(path *py.Object) *py.Object - -// Create a symbolic link pointing to src named dst. -// -// target_is_directory is required on Windows if the target is to be -// -// interpreted as a directory. (On Windows, symlink requires -// Windows 6.0 or greater, and raises a NotImplementedError otherwise.) -// target_is_directory is ignored on non-Windows platforms. -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Symlink py.symlink -func Symlink(src *py.Object, dst *py.Object, targetIsDirectory *py.Object) *py.Object - -// Execute the command in a subshell. -// -//go:linkname System py.system -func System(command *py.Object) *py.Object - -// Set the current numeric umask and return the previous umask. -// -//go:linkname Umask py.umask -func Umask(mask *py.Object) *py.Object - -// Return an object identifying the current operating system. -// -// The object behaves like a named tuple with the following fields: -// -// (sysname, nodename, release, version, machine) -// -//go:linkname Uname py.uname -func Uname() *py.Object - -// Remove a file (same as remove()). -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Unlink py.unlink -func Unlink(path *py.Object) *py.Object - -// Remove a file (same as unlink()). -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Remove py.remove -func Remove(path *py.Object) *py.Object - -// Return a collection containing process timing information. -// -// The object returned behaves like a named tuple with these fields: -// -// (utime, stime, cutime, cstime, elapsed_time) -// -// All fields are floating point numbers. -// -//go:linkname Times py.times -func Times() *py.Object - -// Execute an executable path with arguments, replacing current process. -// -// path -// Path of executable file. -// argv -// Tuple or list of strings. -// -//go:linkname Execv py.execv -func Execv(path *py.Object, argv *py.Object) *py.Object - -// Execute an executable path with arguments, replacing current process. -// -// path -// Path of executable file. -// argv -// Tuple or list of strings. -// env -// Dictionary of strings mapping to strings. -// -//go:linkname Execve py.execve -func Execve(path *py.Object, argv *py.Object, env *py.Object) *py.Object - -// Fork a child process. -// -// Return 0 to child process and PID of child to parent process. -// -//go:linkname Fork py.fork -func Fork() *py.Object - -// Get the minimum scheduling priority for policy. -// -//go:linkname SchedGetPriorityMin py.sched_get_priority_min -func SchedGetPriorityMin(policy *py.Object) *py.Object - -// Voluntarily relinquish the CPU. -// -//go:linkname SchedYield py.sched_yield -func SchedYield() *py.Object - -// Open a pseudo-terminal. -// -// Return a tuple of (master_fd, slave_fd) containing open file descriptors -// for both the master and slave ends. -// -//go:linkname Openpty py.openpty -func Openpty() *py.Object - -// Prepare the tty of which fd is a file descriptor for a new login session. -// -// Make the calling process a session leader; make the tty the -// controlling tty, the stdin, the stdout, and the stderr of the -// calling process; close fd. -// -//go:linkname LoginTty py.login_tty -func LoginTty(fd *py.Object) *py.Object - -// Fork a new process with a new pseudo-terminal as controlling tty. -// -// Returns a tuple of (pid, master_fd). -// Like fork(), return pid of 0 to the child process, -// and pid of child to the parent process. -// To both, return fd of newly opened pseudo-terminal. -// -//go:linkname Forkpty py.forkpty -func Forkpty() *py.Object - -// Return the current process's effective group id. -// -//go:linkname Getegid py.getegid -func Getegid() *py.Object - -// Return the current process's effective user id. -// -//go:linkname Geteuid py.geteuid -func Geteuid() *py.Object - -// Return the current process's group id. -// -//go:linkname Getgid py.getgid -func Getgid() *py.Object - -// Returns a list of groups to which a user belongs. -// -// user -// username to lookup -// group -// base group id of the user -// -//go:linkname Getgrouplist py.getgrouplist -func Getgrouplist(user *py.Object, group *py.Object) *py.Object - -// Return list of supplemental group IDs for the process. -// -//go:linkname Getgroups py.getgroups -func Getgroups() *py.Object - -// Return the current process id. -// -//go:linkname Getpid py.getpid -func Getpid() *py.Object - -// Return the current process group id. -// -//go:linkname Getpgrp py.getpgrp -func Getpgrp() *py.Object - -// Return the parent's process id. -// -// If the parent process has already exited, Windows machines will still -// return its id; others systems will return the id of the 'init' process (1). -// -//go:linkname Getppid py.getppid -func Getppid() *py.Object - -// Return the current process's user id. -// -//go:linkname Getuid py.getuid -func Getuid() *py.Object - -// Return the actual login name. -// -//go:linkname Getlogin py.getlogin -func Getlogin() *py.Object - -// Kill a process with a signal. -// -//go:linkname Kill py.kill -func Kill(pid *py.Object, signal *py.Object) *py.Object - -// Kill a process group with a signal. -// -//go:linkname Killpg py.killpg -func Killpg(pgid *py.Object, signal *py.Object) *py.Object - -// Set the current process's user id. -// -//go:linkname Setuid py.setuid -func Setuid(uid *py.Object) *py.Object - -// Set the current process's effective user id. -// -//go:linkname Seteuid py.seteuid -func Seteuid(euid *py.Object) *py.Object - -// Set the current process's real and effective user ids. -// -//go:linkname Setreuid py.setreuid -func Setreuid(ruid *py.Object, euid *py.Object) *py.Object - -// Set the current process's group id. -// -//go:linkname Setgid py.setgid -func Setgid(gid *py.Object) *py.Object - -// Set the current process's effective group id. -// -//go:linkname Setegid py.setegid -func Setegid(egid *py.Object) *py.Object - -// Set the current process's real and effective group ids. -// -//go:linkname Setregid py.setregid -func Setregid(rgid *py.Object, egid *py.Object) *py.Object - -// Set the groups of the current process to list. -// -//go:linkname Setgroups py.setgroups -func Setgroups(groups *py.Object) *py.Object - -// Initialize the group access list. -// -// Call the system initgroups() to initialize the group access list with all of -// the groups of which the specified username is a member, plus the specified -// group id. -// -//go:linkname Initgroups py.initgroups -func Initgroups(username *py.Object, gid *py.Object) *py.Object - -// Call the system call getpgid(), and return the result. -// -//go:linkname Getpgid py.getpgid -func Getpgid(pid *py.Object) *py.Object - -// Make the current process the leader of its process group. -// -//go:linkname Setpgrp py.setpgrp -func Setpgrp() *py.Object - -// Wait for completion of a child process. -// -// Returns a tuple of information about the child process: -// -// (pid, status) -// -//go:linkname Wait py.wait -func Wait() *py.Object - -// Wait for completion of a child process. -// -// Returns a tuple of information about the child process: -// -// (pid, status, rusage) -// -//go:linkname Wait3 py.wait3 -func Wait3(options *py.Object) *py.Object - -// Wait for completion of a specific child process. -// -// Returns a tuple of information about the child process: -// -// (pid, status, rusage) -// -//go:linkname Wait4 py.wait4 -func Wait4(pid *py.Object, options *py.Object) *py.Object - -// Wait for completion of a given child process. -// -// Returns a tuple of information regarding the child process: -// -// (pid, status) -// -// The options argument is ignored on Windows. -// -//go:linkname Waitpid py.waitpid -func Waitpid(pid *py.Object, options *py.Object) *py.Object - -// Call the system call getsid(pid) and return the result. -// -//go:linkname Getsid py.getsid -func Getsid(pid *py.Object) *py.Object - -// Call the system call setsid(). -// -//go:linkname Setsid py.setsid -func Setsid() *py.Object - -// Call the system call setpgid(pid, pgrp). -// -//go:linkname Setpgid py.setpgid -func Setpgid(pid *py.Object, pgrp *py.Object) *py.Object - -// Return the process group associated with the terminal specified by fd. -// -//go:linkname Tcgetpgrp py.tcgetpgrp -func Tcgetpgrp(fd *py.Object) *py.Object - -// Set the process group associated with the terminal specified by fd. -// -//go:linkname Tcsetpgrp py.tcsetpgrp -func Tcsetpgrp(fd *py.Object, pgid *py.Object) *py.Object - -// Open a file for low level IO. Returns a file descriptor (integer). -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Open py.open -func Open(path *py.Object, flags *py.Object, mode *py.Object) *py.Object - -// Close a file descriptor. -// -//go:linkname Close py.close -func Close(fd *py.Object) *py.Object - -// Closes all file descriptors in [fd_low, fd_high), ignoring errors. -// -//go:linkname Closerange py.closerange -func Closerange(fdLow *py.Object, fdHigh *py.Object) *py.Object - -// Return a string describing the encoding of a terminal's file descriptor. -// -// The file descriptor must be attached to a terminal. -// If the device is not a terminal, return None. -// -//go:linkname DeviceEncoding py.device_encoding -func DeviceEncoding(fd *py.Object) *py.Object - -// Return a duplicate of a file descriptor. -// -//go:linkname Dup py.dup -func Dup(fd *py.Object) *py.Object - -// Duplicate file descriptor. -// -//go:linkname Dup2 py.dup2 -func Dup2(fd *py.Object, fd2 *py.Object, inheritable *py.Object) *py.Object - -// Apply, test or remove a POSIX lock on an open file descriptor. -// -// fd -// An open file descriptor. -// command -// One of F_LOCK, F_TLOCK, F_ULOCK or F_TEST. -// length -// The number of bytes to lock, starting at the current position. -// -//go:linkname Lockf py.lockf -func Lockf(fd *py.Object, command *py.Object, length *py.Object) *py.Object - -// Set the position of a file descriptor. Return the new position. -// -// fd -// An open file descriptor, as returned by os.open(). -// position -// Position, interpreted relative to 'whence'. -// whence -// The relative position to seek from. Valid values are: -// - SEEK_SET: seek from the start of the file. -// - SEEK_CUR: seek from the current file position. -// - SEEK_END: seek from the end of the file. -// -// The return value is the number of bytes relative to the beginning of the file. -// -//go:linkname Lseek py.lseek -func Lseek(fd *py.Object, position *py.Object, whence *py.Object) *py.Object - -// Read from a file descriptor. Returns a bytes object. -// -//go:linkname Read py.read -func Read(fd *py.Object, length *py.Object) *py.Object - -// Read from a file descriptor fd into an iterable of buffers. -// -// The buffers should be mutable buffers accepting bytes. -// readv will transfer data into each buffer until it is full -// and then move on to the next buffer in the sequence to hold -// the rest of the data. -// -// readv returns the total number of bytes read, -// which may be less than the total capacity of all the buffers. -// -//go:linkname Readv py.readv -func Readv(fd *py.Object, buffers *py.Object) *py.Object - -// Read a number of bytes from a file descriptor starting at a particular offset. -// -// Read length bytes from file descriptor fd, starting at offset bytes from -// the beginning of the file. The file offset remains unchanged. -// -//go:linkname Pread py.pread -func Pread(fd *py.Object, length *py.Object, offset *py.Object) *py.Object - -// Reads from a file descriptor into a number of mutable bytes-like objects. -// -// Combines the functionality of readv() and pread(). As readv(), it will -// transfer data into each buffer until it is full and then move on to the next -// buffer in the sequence to hold the rest of the data. Its fourth argument, -// specifies the file offset at which the input operation is to be performed. It -// will return the total number of bytes read (which can be less than the total -// capacity of all the objects). -// -// The flags argument contains a bitwise OR of zero or more of the following flags: -// -// - RWF_HIPRI -// - RWF_NOWAIT -// -// Using non-zero flags requires Linux 4.6 or newer. -// -//go:linkname Preadv py.preadv -func Preadv(fd *py.Object, buffers *py.Object, offset *py.Object, flags *py.Object) *py.Object - -// Write a bytes object to a file descriptor. -// -//go:linkname Write py.write -func Write(fd *py.Object, data *py.Object) *py.Object - -// Iterate over buffers, and write the contents of each to a file descriptor. -// -// Returns the total number of bytes written. -// buffers must be a sequence of bytes-like objects. -// -//go:linkname Writev py.writev -func Writev(fd *py.Object, buffers *py.Object) *py.Object - -// Write bytes to a file descriptor starting at a particular offset. -// -// Write buffer to fd, starting at offset bytes from the beginning of -// the file. Returns the number of bytes writte. Does not change the -// current file offset. -// -//go:linkname Pwrite py.pwrite -func Pwrite(fd *py.Object, buffer *py.Object, offset *py.Object) *py.Object - -// Writes the contents of bytes-like objects to a file descriptor at a given offset. -// -// Combines the functionality of writev() and pwrite(). All buffers must be a sequence -// of bytes-like objects. Buffers are processed in array order. Entire contents of first -// buffer is written before proceeding to second, and so on. The operating system may -// set a limit (sysconf() value SC_IOV_MAX) on the number of buffers that can be used. -// This function writes the contents of each object to the file descriptor and returns -// the total number of bytes written. -// -// The flags argument contains a bitwise OR of zero or more of the following flags: -// -// - RWF_DSYNC -// - RWF_SYNC -// - RWF_APPEND -// -// Using non-zero flags requires Linux 4.7 or newer. -// -//go:linkname Pwritev py.pwritev -func Pwritev(fd *py.Object, buffers *py.Object, offset *py.Object, flags *py.Object) *py.Object - -// Copy count bytes from file descriptor in_fd to file descriptor out_fd. -// -//go:linkname Sendfile py.sendfile -func Sendfile(outFd *py.Object, inFd *py.Object, offset *py.Object, count *py.Object, headers *py.Object, trailers *py.Object, flags *py.Object) *py.Object - -// Perform a stat system call on the given file descriptor. -// -// Like stat(), but for an open file descriptor. -// Equivalent to os.stat(fd). -// -//go:linkname Fstat py.fstat -func Fstat(fd *py.Object) *py.Object - -// Return True if the fd is connected to a terminal. -// -// Return True if the file descriptor is an open file descriptor -// connected to the slave end of a terminal. -// -//go:linkname Isatty py.isatty -func Isatty(fd *py.Object) *py.Object - -// Create a pipe. -// -// Returns a tuple of two file descriptors: -// -// (read_fd, write_fd) -// -//go:linkname Pipe py.pipe -func Pipe() *py.Object - -// Create a "fifo" (a POSIX named pipe). -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Mkfifo py.mkfifo -func Mkfifo(path *py.Object, mode *py.Object) *py.Object - -// Create a node in the file system. -// -// Create a node in the file system (file, device special file or named pipe) -// at path. mode specifies both the permissions to use and the -// type of node to be created, being combined (bitwise OR) with one of -// S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. If S_IFCHR or S_IFBLK is set on mode, -// device defines the newly created device special file (probably using -// os.makedev()). Otherwise device is ignored. -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// -// and path should be relative; path will then be relative to that directory. -// -// dir_fd may not be implemented on your platform. -// -// If it is unavailable, using it will raise a NotImplementedError. -// -//go:linkname Mknod py.mknod -func Mknod(path *py.Object, mode *py.Object, device *py.Object) *py.Object - -// Extracts a device major number from a raw device number. -// -//go:linkname Major py.major -func Major(device *py.Object) *py.Object - -// Extracts a device minor number from a raw device number. -// -//go:linkname Minor py.minor -func Minor(device *py.Object) *py.Object - -// Composes a raw device number from the major and minor device numbers. -// -//go:linkname Makedev py.makedev -func Makedev(major *py.Object, minor *py.Object) *py.Object - -// Truncate a file, specified by file descriptor, to a specific length. -// -//go:linkname Ftruncate py.ftruncate -func Ftruncate(fd *py.Object, length *py.Object) *py.Object - -// Truncate a file, specified by path, to a specific length. -// -// On some platforms, path may also be specified as an open file descriptor. -// -// If this functionality is unavailable, using it raises an exception. -// -//go:linkname Truncate py.truncate -func Truncate(path *py.Object, length *py.Object) *py.Object - -// Change or add an environment variable. -// -//go:linkname Putenv py.putenv -func Putenv(name *py.Object, value *py.Object) *py.Object - -// Delete an environment variable. -// -//go:linkname Unsetenv py.unsetenv -func Unsetenv(name *py.Object) *py.Object - -// Translate an error code to a message string. -// -//go:linkname Strerror py.strerror -func Strerror(code *py.Object) *py.Object - -// Change to the directory of the given file descriptor. -// -// fd must be opened on a directory, not a file. -// Equivalent to os.chdir(fd). -// -//go:linkname Fchdir py.fchdir -func Fchdir(fd *py.Object) *py.Object - -// Force write of fd to disk. -// -//go:linkname Fsync py.fsync -func Fsync(fd *py.Object) *py.Object - -// Force write of everything to disk. -// -//go:linkname Sync py.sync -func Sync() *py.Object - -// Return True if the process returning status was dumped to a core file. -// -//go:linkname WCOREDUMP py.WCOREDUMP -func WCOREDUMP(status *py.Object) *py.Object - -// Return True if a particular process was continued from a job control stop. -// -// Return True if the process returning status was continued from a -// job control stop. -// -//go:linkname WIFCONTINUED py.WIFCONTINUED -func WIFCONTINUED(status *py.Object) *py.Object - -// Return True if the process returning status was stopped. -// -//go:linkname WIFSTOPPED py.WIFSTOPPED -func WIFSTOPPED(status *py.Object) *py.Object - -// Return True if the process returning status was terminated by a signal. -// -//go:linkname WIFSIGNALED py.WIFSIGNALED -func WIFSIGNALED(status *py.Object) *py.Object - -// Return True if the process returning status exited via the exit() system call. -// -//go:linkname WIFEXITED py.WIFEXITED -func WIFEXITED(status *py.Object) *py.Object - -// Return the process return code from status. -// -//go:linkname WEXITSTATUS py.WEXITSTATUS -func WEXITSTATUS(status *py.Object) *py.Object - -// Return the signal that terminated the process that provided the status value. -// -//go:linkname WTERMSIG py.WTERMSIG -func WTERMSIG(status *py.Object) *py.Object - -// Return the signal that stopped the process that provided the status value. -// -//go:linkname WSTOPSIG py.WSTOPSIG -func WSTOPSIG(status *py.Object) *py.Object - -// Perform an fstatvfs system call on the given fd. -// -// Equivalent to statvfs(fd). -// -//go:linkname Fstatvfs py.fstatvfs -func Fstatvfs(fd *py.Object) *py.Object - -// Perform a statvfs system call on the given path. -// -// path may always be specified as a string. -// On some platforms, path may also be specified as an open file descriptor. -// -// If this functionality is unavailable, using it raises an exception. -// -//go:linkname Statvfs py.statvfs -func Statvfs(path *py.Object) *py.Object - -// Return a string-valued system configuration variable. -// -//go:linkname Confstr py.confstr -func Confstr(name *py.Object) *py.Object - -// Return an integer-valued system configuration variable. -// -//go:linkname Sysconf py.sysconf -func Sysconf(name *py.Object) *py.Object - -// Return the configuration limit name for the file descriptor fd. -// -// If there is no limit, return -1. -// -//go:linkname Fpathconf py.fpathconf -func Fpathconf(fd *py.Object, name *py.Object) *py.Object - -// Return the configuration limit name for the file or directory path. -// -// If there is no limit, return -1. -// On some platforms, path may also be specified as an open file descriptor. -// -// If this functionality is unavailable, using it raises an exception. -// -//go:linkname Pathconf py.pathconf -func Pathconf(path *py.Object, name *py.Object) *py.Object - -// Abort the interpreter immediately. -// -// This function 'dumps core' or otherwise fails in the hardest way possible -// on the hosting operating system. This function never returns. -// -//go:linkname Abort py.abort -func Abort() *py.Object - -// Return average recent system load information. -// -// Return the number of processes in the system run queue averaged over -// the last 1, 5, and 15 minutes as a tuple of three floats. -// Raises OSError if the load average was unobtainable. -// -//go:linkname Getloadavg py.getloadavg -func Getloadavg() *py.Object - -// Return a bytes object containing random bytes suitable for cryptographic use. -// -//go:linkname Urandom py.urandom -func Urandom(size *py.Object) *py.Object - -// Return the number of CPUs in the system; return None if indeterminable. -// -// This number is not equivalent to the number of CPUs the current process can -// use. The number of usable CPUs can be obtained with -// “len(os.sched_getaffinity(0))“ -// -//go:linkname CpuCount py.cpu_count -func CpuCount() *py.Object - -// Get the close-on-exe flag of the specified file descriptor. -// -//go:linkname GetInheritable py.get_inheritable -func GetInheritable(fd *py.Object) *py.Object - -// Set the inheritable flag of the specified file descriptor. -// -//go:linkname SetInheritable py.set_inheritable -func SetInheritable(fd *py.Object, inheritable *py.Object) *py.Object - -// Get the blocking mode of the file descriptor. -// -// Return False if the O_NONBLOCK flag is set, True if the flag is cleared. -// -//go:linkname GetBlocking py.get_blocking -func GetBlocking(fd *py.Object) *py.Object - -// Set the blocking mode of the specified file descriptor. -// -// Set the O_NONBLOCK flag if blocking is False, -// clear the O_NONBLOCK flag otherwise. -// -//go:linkname SetBlocking py.set_blocking -func SetBlocking(fd *py.Object, blocking *py.Object) *py.Object - -// Return an iterator of DirEntry objects for given path. -// -// path can be specified as either str, bytes, or a path-like object. If path -// is bytes, the names of yielded DirEntry objects will also be bytes; in -// all other circumstances they will be str. -// -// If path is None, uses the path='.'. -// -//go:linkname Scandir py.scandir -func Scandir(path *py.Object) *py.Object - -// Return the file system path representation of the object. -// -// If the object is str or bytes, then allow it to pass through as-is. If the -// object defines __fspath__(), then return the result of that method. All other -// types raise a TypeError. -// -//go:linkname Fspath py.fspath -func Fspath(path *py.Object) *py.Object - -// Convert a wait status to an exit code. -// -// On Unix: -// -// * If WIFEXITED(status) is true, return WEXITSTATUS(status). -// * If WIFSIGNALED(status) is true, return -WTERMSIG(status). -// * Otherwise, raise a ValueError. -// -// On Windows, return status shifted right by 8 bits. -// -// On Unix, if the process is being traced or if waitpid() was called with -// WUNTRACED option, the caller must first check if WIFSTOPPED(status) is true. -// This function must not be called if WIFSTOPPED(status) is true. -// -//go:linkname WaitstatusToExitcode py.waitstatus_to_exitcode -func WaitstatusToExitcode(status *py.Object) *py.Object - -// makedirs(name [, mode=0o777][, exist_ok=False]) -// -// Super-mkdir; create a leaf directory and all intermediate ones. Works like -// mkdir, except that any intermediate path segment (not just the rightmost) -// will be created if it does not exist. If the target directory already -// exists, raise an OSError if exist_ok is False. Otherwise no exception is -// raised. This is recursive. -// -//go:linkname Makedirs py.makedirs -func Makedirs(name *py.Object, mode *py.Object, existOk *py.Object) *py.Object - -// removedirs(name) -// -// Super-rmdir; remove a leaf directory and all empty intermediate -// ones. Works like rmdir except that, if the leaf directory is -// successfully removed, directories corresponding to rightmost path -// segments will be pruned away until either the whole path is -// consumed or an error occurs. Errors during this latter phase are -// ignored -- they generally mean that a directory was not empty. -// -//go:linkname Removedirs py.removedirs -func Removedirs(name *py.Object) *py.Object - -// renames(old, new) -// -// Super-rename; create directories as necessary and delete any left -// empty. Works like rename, except creation of any intermediate -// directories needed to make the new pathname good is attempted -// first. After the rename, directories corresponding to rightmost -// path segments of the old name will be pruned until either the -// whole path is consumed or a nonempty directory is found. -// -// Note: this function can fail with the new directory structure made -// if you lack permissions needed to unlink the leaf directory or -// file. -// -//go:linkname Renames py.renames -func Renames(old *py.Object, new *py.Object) *py.Object - -// Directory tree generator. -// -// For each directory in the directory tree rooted at top (including top -// itself, but excluding '.' and '..'), yields a 3-tuple -// -// dirpath, dirnames, filenames -// -// dirpath is a string, the path to the directory. dirnames is a list of -// the names of the subdirectories in dirpath (including symlinks to directories, -// and excluding '.' and '..'). -// filenames is a list of the names of the non-directory files in dirpath. -// Note that the names in the lists are just names, with no path components. -// To get a full path (which begins with top) to a file or directory in -// dirpath, do os.path.join(dirpath, name). -// -// If optional arg 'topdown' is true or not specified, the triple for a -// directory is generated before the triples for any of its subdirectories -// (directories are generated top down). If topdown is false, the triple -// for a directory is generated after the triples for all of its -// subdirectories (directories are generated bottom up). -// -// When topdown is true, the caller can modify the dirnames list in-place -// (e.g., via del or slice assignment), and walk will only recurse into the -// subdirectories whose names remain in dirnames; this can be used to prune the -// search, or to impose a specific order of visiting. Modifying dirnames when -// topdown is false has no effect on the behavior of os.walk(), since the -// directories in dirnames have already been generated by the time dirnames -// itself is generated. No matter the value of topdown, the list of -// subdirectories is retrieved before the tuples for the directory and its -// subdirectories are generated. -// -// By default errors from the os.scandir() call are ignored. If -// optional arg 'onerror' is specified, it should be a function; it -// will be called with one argument, an OSError instance. It can -// report the error to continue with the walk, or raise the exception -// to abort the walk. Note that the filename is available as the -// filename attribute of the exception object. -// -// By default, os.walk does not follow symbolic links to subdirectories on -// systems that support them. In order to get this functionality, set the -// optional argument 'followlinks' to true. -// -// Caution: if you pass a relative pathname for top, don't change the -// current working directory between resumptions of walk. walk never -// changes the current directory, and assumes that the client doesn't -// either. -// -// Example: -// -// import os -// from os.path import join, getsize -// for root, dirs, files in os.walk('python/Lib/email'): -// print(root, "consumes ") -// print(sum(getsize(join(root, name)) for name in files), end=" ") -// print("bytes in", len(files), "non-directory files") -// if 'CVS' in dirs: -// dirs.remove('CVS') # don't visit CVS directories -// -//go:linkname Walk py.walk -func Walk(top *py.Object, topdown *py.Object, onerror *py.Object, followlinks *py.Object) *py.Object - -// Directory tree generator. -// -// This behaves exactly like walk(), except that it yields a 4-tuple -// -// dirpath, dirnames, filenames, dirfd -// -// `dirpath`, `dirnames` and `filenames` are identical to walk() output, -// and `dirfd` is a file descriptor referring to the directory `dirpath`. -// -// The advantage of fwalk() over walk() is that it's safe against symlink -// races (when follow_symlinks is False). -// -// If dir_fd is not None, it should be a file descriptor open to a directory, -// and top should be relative; top will then be relative to that directory. -// (dir_fd is always supported for fwalk.) -// -// Caution: -// Since fwalk() yields file descriptors, those are only valid until the -// next iteration step, so you should dup() them if you want to keep them -// for a longer period. -// -// Example: -// -// import os -// for root, dirs, files, rootfd in os.fwalk('python/Lib/email'): -// print(root, "consumes", end="") -// print(sum(os.stat(name, dir_fd=rootfd).st_size for name in files), -// end="") -// print("bytes in", len(files), "non-directory files") -// if 'CVS' in dirs: -// dirs.remove('CVS') # don't visit CVS directories -// -//go:linkname Fwalk py.fwalk -func Fwalk(top *py.Object, topdown *py.Object, onerror *py.Object) *py.Object - -// execl(file, *args) -// -// Execute the executable file with argument list args, replacing the -// current process. -// -//go:linkname Execl py.execl -func Execl(file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// execle(file, *args, env) -// -// Execute the executable file with argument list args and -// environment env, replacing the current process. -// -//go:linkname Execle py.execle -func Execle(file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// execlp(file, *args) -// -// Execute the executable file (which is searched for along $PATH) -// with argument list args, replacing the current process. -// -//go:linkname Execlp py.execlp -func Execlp(file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// execlpe(file, *args, env) -// -// Execute the executable file (which is searched for along $PATH) -// with argument list args and environment env, replacing the current -// process. -// -//go:linkname Execlpe py.execlpe -func Execlpe(file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// execvp(file, args) -// -// Execute the executable file (which is searched for along $PATH) -// with argument list args, replacing the current process. -// args may be a list or tuple of strings. -// -//go:linkname Execvp py.execvp -func Execvp(file *py.Object, args *py.Object) *py.Object - -// execvpe(file, args, env) -// -// Execute the executable file (which is searched for along $PATH) -// with argument list args and environment env, replacing the -// current process. -// args may be a list or tuple of strings. -// -//go:linkname Execvpe py.execvpe -func Execvpe(file *py.Object, args *py.Object, env *py.Object) *py.Object - -// Returns the sequence of directories that will be searched for the -// -// named executable (similar to a shell) when launching a process. -// -// *env* must be an environment variable dict or None. If *env* is None, -// os.environ will be used. -// -//go:linkname GetExecPath py.get_exec_path -func GetExecPath(env *py.Object) *py.Object - -// Get an environment variable, return None if it doesn't exist. -// -// The optional second argument can specify an alternate default. -// key, default and the result are str. -// -//go:linkname Getenv py.getenv -func Getenv(key *py.Object, default_ *py.Object) *py.Object - -// Get an environment variable, return None if it doesn't exist. -// -// The optional second argument can specify an alternate default. -// key, default and the result are bytes. -// -//go:linkname Getenvb py.getenvb -func Getenvb(key *py.Object, default_ *py.Object) *py.Object - -// Encode filename (an os.PathLike, bytes, or str) to the filesystem -// -// encoding with 'surrogateescape' error handler, return bytes unchanged. -// On Windows, use 'strict' error handler if the file system encoding is -// 'mbcs' (which is the default encoding). -// -//go:linkname Fsencode py.fsencode -func Fsencode(filename *py.Object) *py.Object - -// Decode filename (an os.PathLike, bytes, or str) from the filesystem -// -// encoding with 'surrogateescape' error handler, return str unchanged. On -// Windows, use 'strict' error handler if the file system encoding is -// 'mbcs' (which is the default encoding). -// -//go:linkname Fsdecode py.fsdecode -func Fsdecode(filename *py.Object) *py.Object - -// spawnv(mode, file, args) -> integer -// -// Execute file with arguments from args in a subprocess. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnv py.spawnv -func Spawnv(mode *py.Object, file *py.Object, args *py.Object) *py.Object - -// spawnve(mode, file, args, env) -> integer -// -// Execute file with arguments from args in a subprocess with the -// specified environment. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnve py.spawnve -func Spawnve(mode *py.Object, file *py.Object, args *py.Object, env *py.Object) *py.Object - -// spawnvp(mode, file, args) -> integer -// -// Execute file (which is looked for along $PATH) with arguments from -// args in a subprocess. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnvp py.spawnvp -func Spawnvp(mode *py.Object, file *py.Object, args *py.Object) *py.Object - -// spawnvpe(mode, file, args, env) -> integer -// -// Execute file (which is looked for along $PATH) with arguments from -// args in a subprocess with the supplied environment. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnvpe py.spawnvpe -func Spawnvpe(mode *py.Object, file *py.Object, args *py.Object, env *py.Object) *py.Object - -// spawnl(mode, file, *args) -> integer -// -// Execute file with arguments from args in a subprocess. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnl py.spawnl -func Spawnl(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// spawnle(mode, file, *args, env) -> integer -// -// Execute file with arguments from args in a subprocess with the -// supplied environment. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnle py.spawnle -func Spawnle(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// spawnlp(mode, file, *args) -> integer -// -// Execute file (which is looked for along $PATH) with arguments from -// args in a subprocess with the supplied environment. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnlp py.spawnlp -func Spawnlp(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object - -// spawnlpe(mode, file, *args, env) -> integer -// -// Execute file (which is looked for along $PATH) with arguments from -// args in a subprocess with the supplied environment. -// If mode == P_NOWAIT return the pid of the process. -// If mode == P_WAIT return the process's exit code if it exits normally; -// otherwise return -SIG, where SIG is the signal that killed it. -// -//go:linkname Spawnlpe py.spawnlpe -func Spawnlpe(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object diff --git a/py/os/os.go b/py/os/os.go deleted file mode 100644 index cbd2c72f..00000000 --- a/py/os/os.go +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package os - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -// https://docs.python.org/3/library/os.html - -// Rename the file or directory src to dst. If dst exists, the operation will -// fail with an OSError subclass in a number of cases: -// -// On Windows, if dst exists a FileExistsError is always raised. The operation -// may fail if src and dst are on different filesystems. Use shutil.move() to -// support moves to a different filesystem. -// -// On Unix, if src is a file and dst is a directory or vice-versa, an IsADirectoryError -// or a NotADirectoryError will be raised respectively. If both are directories and dst -// is empty, dst will be silently replaced. If dst is a non-empty directory, an OSError -// is raised. If both are files, dst will be replaced silently if the user has permission. -// The operation may fail on some Unix flavors if src and dst are on different filesystems. -// If successful, the renaming will be an atomic operation (this is a POSIX requirement). -// -//go:linkname Rename py.rename -func Rename(src, dst *py.Object) *py.Object diff --git a/py/pandas/gen.go b/py/pandas/gen.go deleted file mode 100644 index 6106c0fd..00000000 --- a/py/pandas/gen.go +++ /dev/null @@ -1,7351 +0,0 @@ -package pandas - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.pandas" - -// Detect missing values for an array-like object. -// -// This function takes a scalar or array-like object and indicates -// whether values are missing (“NaN“ in numeric arrays, “None“ or “NaN“ -// in object arrays, “NaT“ in datetimelike). -// -// Parameters -// ---------- -// obj : scalar or array-like -// -// Object to check for null or missing values. -// -// Returns -// ------- -// bool or array-like of bool -// -// For scalar input, returns a scalar boolean. -// For array input, returns an array of boolean indicating whether each -// corresponding element is missing. -// -// See Also -// -------- -// notna : Boolean inverse of pandas.isna. -// Series.isna : Detect missing values in a Series. -// DataFrame.isna : Detect missing values in a DataFrame. -// Index.isna : Detect missing values in an Index. -// -// Examples -// -------- -// Scalar arguments (including strings) result in a scalar boolean. -// -// >>> pd.isna('dog') -// False -// -// >>> pd.isna(pd.NA) -// True -// -// >>> pd.isna(np.nan) -// True -// -// ndarrays result in an ndarray of booleans. -// -// >>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]]) -// >>> array -// array([[ 1., nan, 3.], -// -// [ 4., 5., nan]]) -// -// >>> pd.isna(array) -// array([[False, True, False], -// -// [False, False, True]]) -// -// For indexes, an ndarray of booleans is returned. -// -// >>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None, -// ... "2017-07-08"]) -// >>> index -// DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'], -// -// dtype='datetime64[ns]', freq=None) -// -// >>> pd.isna(index) -// array([False, False, True, False]) -// -// For Series and DataFrame, the same type is returned, containing booleans. -// -// >>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']]) -// >>> df -// -// 0 1 2 -// -// 0 ant bee cat -// 1 dog None fly -// >>> pd.isna(df) -// -// 0 1 2 -// -// 0 False False False -// 1 False True False -// -// >>> pd.isna(df[1]) -// 0 False -// 1 True -// Name: 1, dtype: bool -// -//go:linkname Isna py.isna -func Isna(obj *py.Object) *py.Object - -// Detect missing values for an array-like object. -// -// This function takes a scalar or array-like object and indicates -// whether values are missing (“NaN“ in numeric arrays, “None“ or “NaN“ -// in object arrays, “NaT“ in datetimelike). -// -// Parameters -// ---------- -// obj : scalar or array-like -// -// Object to check for null or missing values. -// -// Returns -// ------- -// bool or array-like of bool -// -// For scalar input, returns a scalar boolean. -// For array input, returns an array of boolean indicating whether each -// corresponding element is missing. -// -// See Also -// -------- -// notna : Boolean inverse of pandas.isna. -// Series.isna : Detect missing values in a Series. -// DataFrame.isna : Detect missing values in a DataFrame. -// Index.isna : Detect missing values in an Index. -// -// Examples -// -------- -// Scalar arguments (including strings) result in a scalar boolean. -// -// >>> pd.isna('dog') -// False -// -// >>> pd.isna(pd.NA) -// True -// -// >>> pd.isna(np.nan) -// True -// -// ndarrays result in an ndarray of booleans. -// -// >>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]]) -// >>> array -// array([[ 1., nan, 3.], -// -// [ 4., 5., nan]]) -// -// >>> pd.isna(array) -// array([[False, True, False], -// -// [False, False, True]]) -// -// For indexes, an ndarray of booleans is returned. -// -// >>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None, -// ... "2017-07-08"]) -// >>> index -// DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'], -// -// dtype='datetime64[ns]', freq=None) -// -// >>> pd.isna(index) -// array([False, False, True, False]) -// -// For Series and DataFrame, the same type is returned, containing booleans. -// -// >>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']]) -// >>> df -// -// 0 1 2 -// -// 0 ant bee cat -// 1 dog None fly -// >>> pd.isna(df) -// -// 0 1 2 -// -// 0 False False False -// 1 False True False -// -// >>> pd.isna(df[1]) -// 0 False -// 1 True -// Name: 1, dtype: bool -// -//go:linkname Isnull py.isnull -func Isnull(obj *py.Object) *py.Object - -// Detect non-missing values for an array-like object. -// -// This function takes a scalar or array-like object and indicates -// whether values are valid (not missing, which is “NaN“ in numeric -// arrays, “None“ or “NaN“ in object arrays, “NaT“ in datetimelike). -// -// Parameters -// ---------- -// obj : array-like or object value -// -// Object to check for *not* null or *non*-missing values. -// -// Returns -// ------- -// bool or array-like of bool -// -// For scalar input, returns a scalar boolean. -// For array input, returns an array of boolean indicating whether each -// corresponding element is valid. -// -// See Also -// -------- -// isna : Boolean inverse of pandas.notna. -// Series.notna : Detect valid values in a Series. -// DataFrame.notna : Detect valid values in a DataFrame. -// Index.notna : Detect valid values in an Index. -// -// Examples -// -------- -// Scalar arguments (including strings) result in a scalar boolean. -// -// >>> pd.notna('dog') -// True -// -// >>> pd.notna(pd.NA) -// False -// -// >>> pd.notna(np.nan) -// False -// -// ndarrays result in an ndarray of booleans. -// -// >>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]]) -// >>> array -// array([[ 1., nan, 3.], -// -// [ 4., 5., nan]]) -// -// >>> pd.notna(array) -// array([[ True, False, True], -// -// [ True, True, False]]) -// -// For indexes, an ndarray of booleans is returned. -// -// >>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None, -// ... "2017-07-08"]) -// >>> index -// DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'], -// -// dtype='datetime64[ns]', freq=None) -// -// >>> pd.notna(index) -// array([ True, True, False, True]) -// -// For Series and DataFrame, the same type is returned, containing booleans. -// -// >>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']]) -// >>> df -// -// 0 1 2 -// -// 0 ant bee cat -// 1 dog None fly -// >>> pd.notna(df) -// -// 0 1 2 -// -// 0 True True True -// 1 True False True -// -// >>> pd.notna(df[1]) -// 0 True -// 1 False -// Name: 1, dtype: bool -// -//go:linkname Notna py.notna -func Notna(obj *py.Object) *py.Object - -// Detect non-missing values for an array-like object. -// -// This function takes a scalar or array-like object and indicates -// whether values are valid (not missing, which is “NaN“ in numeric -// arrays, “None“ or “NaN“ in object arrays, “NaT“ in datetimelike). -// -// Parameters -// ---------- -// obj : array-like or object value -// -// Object to check for *not* null or *non*-missing values. -// -// Returns -// ------- -// bool or array-like of bool -// -// For scalar input, returns a scalar boolean. -// For array input, returns an array of boolean indicating whether each -// corresponding element is valid. -// -// See Also -// -------- -// isna : Boolean inverse of pandas.notna. -// Series.notna : Detect valid values in a Series. -// DataFrame.notna : Detect valid values in a DataFrame. -// Index.notna : Detect valid values in an Index. -// -// Examples -// -------- -// Scalar arguments (including strings) result in a scalar boolean. -// -// >>> pd.notna('dog') -// True -// -// >>> pd.notna(pd.NA) -// False -// -// >>> pd.notna(np.nan) -// False -// -// ndarrays result in an ndarray of booleans. -// -// >>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]]) -// >>> array -// array([[ 1., nan, 3.], -// -// [ 4., 5., nan]]) -// -// >>> pd.notna(array) -// array([[ True, False, True], -// -// [ True, True, False]]) -// -// For indexes, an ndarray of booleans is returned. -// -// >>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None, -// ... "2017-07-08"]) -// >>> index -// DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'], -// -// dtype='datetime64[ns]', freq=None) -// -// >>> pd.notna(index) -// array([ True, True, False, True]) -// -// For Series and DataFrame, the same type is returned, containing booleans. -// -// >>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']]) -// >>> df -// -// 0 1 2 -// -// 0 ant bee cat -// 1 dog None fly -// >>> pd.notna(df) -// -// 0 1 2 -// -// 0 True True True -// 1 True False True -// -// >>> pd.notna(df[1]) -// 0 True -// 1 False -// Name: 1, dtype: bool -// -//go:linkname Notnull py.notnull -func Notnull(obj *py.Object) *py.Object - -// Return a fixed frequency PeriodIndex. -// -// The day (calendar) is the default frequency. -// -// Parameters -// ---------- -// start : str, datetime, date, pandas.Timestamp, or period-like, default None -// -// Left bound for generating periods. -// -// end : str, datetime, date, pandas.Timestamp, or period-like, default None -// -// Right bound for generating periods. -// -// periods : int, default None -// -// Number of periods to generate. -// -// freq : str or DateOffset, optional -// -// Frequency alias. By default the freq is taken from `start` or `end` -// if those are Period objects. Otherwise, the default is ``"D"`` for -// daily frequency. -// -// name : str, default None -// -// Name of the resulting PeriodIndex. -// -// Returns -// ------- -// PeriodIndex -// -// Notes -// ----- -// Of the three parameters: “start“, “end“, and “periods“, exactly two -// must be specified. -// -// To learn more about the frequency strings, please see `this link -// `__. -// -// Examples -// -------- -// >>> pd.period_range(start='2017-01-01', end='2018-01-01', freq='M') -// PeriodIndex(['2017-01', '2017-02', '2017-03', '2017-04', '2017-05', '2017-06', -// -// '2017-07', '2017-08', '2017-09', '2017-10', '2017-11', '2017-12', -// '2018-01'], -// dtype='period[M]') -// -// If “start“ or “end“ are “Period“ objects, they will be used as anchor -// endpoints for a “PeriodIndex“ with frequency matching that of the -// “period_range“ constructor. -// -// >>> pd.period_range(start=pd.Period('2017Q1', freq='Q'), -// ... end=pd.Period('2017Q2', freq='Q'), freq='M') -// PeriodIndex(['2017-03', '2017-04', '2017-05', '2017-06'], -// -// dtype='period[M]') -// -//go:linkname PeriodRange py.period_range -func PeriodRange(start *py.Object, end *py.Object, periods *py.Object, freq *py.Object, name *py.Object) *py.Object - -// Return a fixed frequency TimedeltaIndex with day as the default. -// -// Parameters -// ---------- -// start : str or timedelta-like, default None -// -// Left bound for generating timedeltas. -// -// end : str or timedelta-like, default None -// -// Right bound for generating timedeltas. -// -// periods : int, default None -// -// Number of periods to generate. -// -// freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'D' -// -// Frequency strings can have multiples, e.g. '5h'. -// -// name : str, default None -// -// Name of the resulting TimedeltaIndex. -// -// closed : str, default None -// -// Make the interval closed with respect to the given frequency to -// the 'left', 'right', or both sides (None). -// -// unit : str, default None -// -// Specify the desired resolution of the result. -// -// .. versionadded:: 2.0.0 -// -// Returns -// ------- -// TimedeltaIndex -// -// Notes -// ----- -// Of the four parameters “start“, “end“, “periods“, and “freq“, -// exactly three must be specified. If “freq“ is omitted, the resulting -// “TimedeltaIndex“ will have “periods“ linearly spaced elements between -// “start“ and “end“ (closed on both sides). -// -// To learn more about the frequency strings, please see `this link -// `__. -// -// Examples -// -------- -// >>> pd.timedelta_range(start='1 day', periods=4) -// TimedeltaIndex(['1 days', '2 days', '3 days', '4 days'], -// -// dtype='timedelta64[ns]', freq='D') -// -// The “closed“ parameter specifies which endpoint is included. The default -// behavior is to include both endpoints. -// -// >>> pd.timedelta_range(start='1 day', periods=4, closed='right') -// TimedeltaIndex(['2 days', '3 days', '4 days'], -// -// dtype='timedelta64[ns]', freq='D') -// -// The “freq“ parameter specifies the frequency of the TimedeltaIndex. -// Only fixed frequencies can be passed, non-fixed frequencies such as -// 'M' (month end) will raise. -// -// >>> pd.timedelta_range(start='1 day', end='2 days', freq='6h') -// TimedeltaIndex(['1 days 00:00:00', '1 days 06:00:00', '1 days 12:00:00', -// -// '1 days 18:00:00', '2 days 00:00:00'], -// dtype='timedelta64[ns]', freq='6h') -// -// Specify “start“, “end“, and “periods“; the frequency is generated -// automatically (linearly spaced). -// -// >>> pd.timedelta_range(start='1 day', end='5 days', periods=4) -// TimedeltaIndex(['1 days 00:00:00', '2 days 08:00:00', '3 days 16:00:00', -// -// '5 days 00:00:00'], -// dtype='timedelta64[ns]', freq=None) -// -// **Specify a unit** -// -// >>> pd.timedelta_range("1 Day", periods=3, freq="100000D", unit="s") -// TimedeltaIndex(['1 days', '100001 days', '200001 days'], -// -// dtype='timedelta64[s]', freq='100000D') -// -//go:linkname TimedeltaRange py.timedelta_range -func TimedeltaRange(start *py.Object, end *py.Object, periods *py.Object, freq *py.Object, name *py.Object, closed *py.Object) *py.Object - -// Return a fixed frequency DatetimeIndex. -// -// Returns the range of equally spaced time points (where the difference between any -// two adjacent points is specified by the given frequency) such that they all -// satisfy `start <[=] x <[=] end`, where the first one and the last one are, resp., -// the first and last time points in that range that fall on the boundary of “freq“ -// (if given as a frequency string) or that are valid for “freq“ (if given as a -// :class:`pandas.tseries.offsets.DateOffset`). (If exactly one of “start“, -// “end“, or “freq“ is *not* specified, this missing parameter can be computed -// given “periods“, the number of timesteps in the range. See the note below.) -// -// Parameters -// ---------- -// start : str or datetime-like, optional -// -// Left bound for generating dates. -// -// end : str or datetime-like, optional -// -// Right bound for generating dates. -// -// periods : int, optional -// -// Number of periods to generate. -// -// freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'D' -// -// Frequency strings can have multiples, e.g. '5h'. See -// :ref:`here ` for a list of -// frequency aliases. -// -// tz : str or tzinfo, optional -// -// Time zone name for returning localized DatetimeIndex, for example -// 'Asia/Hong_Kong'. By default, the resulting DatetimeIndex is -// timezone-naive unless timezone-aware datetime-likes are passed. -// -// normalize : bool, default False -// -// Normalize start/end dates to midnight before generating date range. -// -// name : str, default None -// -// Name of the resulting DatetimeIndex. -// -// inclusive : {"both", "neither", "left", "right"}, default "both" -// -// Include boundaries; Whether to set each bound as closed or open. -// -// .. versionadded:: 1.4.0 -// -// unit : str, default None -// -// Specify the desired resolution of the result. -// -// .. versionadded:: 2.0.0 -// -// **kwargs -// -// For compatibility. Has no effect on the result. -// -// Returns -// ------- -// DatetimeIndex -// -// See Also -// -------- -// DatetimeIndex : An immutable container for datetimes. -// timedelta_range : Return a fixed frequency TimedeltaIndex. -// period_range : Return a fixed frequency PeriodIndex. -// interval_range : Return a fixed frequency IntervalIndex. -// -// Notes -// ----- -// Of the four parameters “start“, “end“, “periods“, and “freq“, -// exactly three must be specified. If “freq“ is omitted, the resulting -// “DatetimeIndex“ will have “periods“ linearly spaced elements between -// “start“ and “end“ (closed on both sides). -// -// To learn more about the frequency strings, please see `this link -// `__. -// -// Examples -// -------- -// **Specifying the values** -// -// The next four examples generate the same `DatetimeIndex`, but vary -// the combination of `start`, `end` and `periods`. -// -// Specify `start` and `end`, with the default daily frequency. -// -// >>> pd.date_range(start='1/1/2018', end='1/08/2018') -// DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04', -// -// '2018-01-05', '2018-01-06', '2018-01-07', '2018-01-08'], -// dtype='datetime64[ns]', freq='D') -// -// Specify timezone-aware `start` and `end`, with the default daily frequency. -// -// >>> pd.date_range( -// ... start=pd.to_datetime("1/1/2018").tz_localize("Europe/Berlin"), -// ... end=pd.to_datetime("1/08/2018").tz_localize("Europe/Berlin"), -// ... ) -// DatetimeIndex(['2018-01-01 00:00:00+01:00', '2018-01-02 00:00:00+01:00', -// -// '2018-01-03 00:00:00+01:00', '2018-01-04 00:00:00+01:00', -// '2018-01-05 00:00:00+01:00', '2018-01-06 00:00:00+01:00', -// '2018-01-07 00:00:00+01:00', '2018-01-08 00:00:00+01:00'], -// dtype='datetime64[ns, Europe/Berlin]', freq='D') -// -// Specify `start` and `periods`, the number of periods (days). -// -// >>> pd.date_range(start='1/1/2018', periods=8) -// DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04', -// -// '2018-01-05', '2018-01-06', '2018-01-07', '2018-01-08'], -// dtype='datetime64[ns]', freq='D') -// -// Specify `end` and `periods`, the number of periods (days). -// -// >>> pd.date_range(end='1/1/2018', periods=8) -// DatetimeIndex(['2017-12-25', '2017-12-26', '2017-12-27', '2017-12-28', -// -// '2017-12-29', '2017-12-30', '2017-12-31', '2018-01-01'], -// dtype='datetime64[ns]', freq='D') -// -// Specify `start`, `end`, and `periods`; the frequency is generated -// automatically (linearly spaced). -// -// >>> pd.date_range(start='2018-04-24', end='2018-04-27', periods=3) -// DatetimeIndex(['2018-04-24 00:00:00', '2018-04-25 12:00:00', -// -// '2018-04-27 00:00:00'], -// dtype='datetime64[ns]', freq=None) -// -// **Other Parameters** -// -// Changed the `freq` (frequency) to “'ME'“ (month end frequency). -// -// >>> pd.date_range(start='1/1/2018', periods=5, freq='ME') -// DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31', '2018-04-30', -// -// '2018-05-31'], -// dtype='datetime64[ns]', freq='ME') -// -// # Multiples are allowed -// -// >>> pd.date_range(start='1/1/2018', periods=5, freq='3ME') -// DatetimeIndex(['2018-01-31', '2018-04-30', '2018-07-31', '2018-10-31', -// -// '2019-01-31'], -// dtype='datetime64[ns]', freq='3ME') -// -// `freq` can also be specified as an Offset object. -// -// >>> pd.date_range(start='1/1/2018', periods=5, freq=pd.offsets.MonthEnd(3)) -// DatetimeIndex(['2018-01-31', '2018-04-30', '2018-07-31', '2018-10-31', -// -// '2019-01-31'], -// dtype='datetime64[ns]', freq='3ME') -// -// Specify `tz` to set the timezone. -// -// >>> pd.date_range(start='1/1/2018', periods=5, tz='Asia/Tokyo') -// DatetimeIndex(['2018-01-01 00:00:00+09:00', '2018-01-02 00:00:00+09:00', -// -// '2018-01-03 00:00:00+09:00', '2018-01-04 00:00:00+09:00', -// '2018-01-05 00:00:00+09:00'], -// dtype='datetime64[ns, Asia/Tokyo]', freq='D') -// -// `inclusive` controls whether to include `start` and `end` that are on the -// boundary. The default, "both", includes boundary points on either end. -// -// >>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive="both") -// DatetimeIndex(['2017-01-01', '2017-01-02', '2017-01-03', '2017-01-04'], -// -// dtype='datetime64[ns]', freq='D') -// -// Use “inclusive='left'“ to exclude `end` if it falls on the boundary. -// -// >>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive='left') -// DatetimeIndex(['2017-01-01', '2017-01-02', '2017-01-03'], -// -// dtype='datetime64[ns]', freq='D') -// -// Use “inclusive='right'“ to exclude `start` if it falls on the boundary, and -// similarly “inclusive='neither'“ will exclude both `start` and `end`. -// -// >>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive='right') -// DatetimeIndex(['2017-01-02', '2017-01-03', '2017-01-04'], -// -// dtype='datetime64[ns]', freq='D') -// -// **Specify a unit** -// -// >>> pd.date_range(start="2017-01-01", periods=10, freq="100YS", unit="s") -// DatetimeIndex(['2017-01-01', '2117-01-01', '2217-01-01', '2317-01-01', -// -// '2417-01-01', '2517-01-01', '2617-01-01', '2717-01-01', -// '2817-01-01', '2917-01-01'], -// dtype='datetime64[s]', freq='100YS-JAN') -// -//go:linkname DateRange py.date_range -func DateRange(start *py.Object, end *py.Object, periods *py.Object, freq *py.Object, tz *py.Object, normalize *py.Object, name *py.Object, inclusive *py.Object) *py.Object - -// Return a fixed frequency DatetimeIndex with business day as the default. -// -// Parameters -// ---------- -// start : str or datetime-like, default None -// -// Left bound for generating dates. -// -// end : str or datetime-like, default None -// -// Right bound for generating dates. -// -// periods : int, default None -// -// Number of periods to generate. -// -// freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'B' -// -// Frequency strings can have multiples, e.g. '5h'. The default is -// business daily ('B'). -// -// tz : str or None -// -// Time zone name for returning localized DatetimeIndex, for example -// Asia/Beijing. -// -// normalize : bool, default False -// -// Normalize start/end dates to midnight before generating date range. -// -// name : str, default None -// -// Name of the resulting DatetimeIndex. -// -// weekmask : str or None, default None -// -// Weekmask of valid business days, passed to ``numpy.busdaycalendar``, -// only used when custom frequency strings are passed. The default -// value None is equivalent to 'Mon Tue Wed Thu Fri'. -// -// holidays : list-like or None, default None -// -// Dates to exclude from the set of valid business days, passed to -// ``numpy.busdaycalendar``, only used when custom frequency strings -// are passed. -// -// inclusive : {"both", "neither", "left", "right"}, default "both" -// -// Include boundaries; Whether to set each bound as closed or open. -// -// .. versionadded:: 1.4.0 -// -// **kwargs -// -// For compatibility. Has no effect on the result. -// -// Returns -// ------- -// DatetimeIndex -// -// Notes -// ----- -// Of the four parameters: “start“, “end“, “periods“, and “freq“, -// exactly three must be specified. Specifying “freq“ is a requirement -// for “bdate_range“. Use “date_range“ if specifying “freq“ is not -// desired. -// -// To learn more about the frequency strings, please see `this link -// `__. -// -// Examples -// -------- -// Note how the two weekend days are skipped in the result. -// -// >>> pd.bdate_range(start='1/1/2018', end='1/08/2018') -// DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04', -// -// '2018-01-05', '2018-01-08'], -// dtype='datetime64[ns]', freq='B') -// -//go:linkname BdateRange py.bdate_range -func BdateRange(start *py.Object, end *py.Object, periods *py.Object, freq *py.Object, tz *py.Object, normalize *py.Object, name *py.Object, weekmask *py.Object, holidays *py.Object, inclusive *py.Object) *py.Object - -// Return a fixed frequency IntervalIndex. -// -// Parameters -// ---------- -// start : numeric or datetime-like, default None -// -// Left bound for generating intervals. -// -// end : numeric or datetime-like, default None -// -// Right bound for generating intervals. -// -// periods : int, default None -// -// Number of periods to generate. -// -// freq : numeric, str, Timedelta, datetime.timedelta, or DateOffset, default None -// -// The length of each interval. Must be consistent with the type of start -// and end, e.g. 2 for numeric, or '5H' for datetime-like. Default is 1 -// for numeric and 'D' for datetime-like. -// -// name : str, default None -// -// Name of the resulting IntervalIndex. -// -// closed : {'left', 'right', 'both', 'neither'}, default 'right' -// -// Whether the intervals are closed on the left-side, right-side, both -// or neither. -// -// Returns -// ------- -// IntervalIndex -// -// See Also -// -------- -// IntervalIndex : An Index of intervals that are all closed on the same side. -// -// Notes -// ----- -// Of the four parameters “start“, “end“, “periods“, and “freq“, -// exactly three must be specified. If “freq“ is omitted, the resulting -// “IntervalIndex“ will have “periods“ linearly spaced elements between -// “start“ and “end“, inclusively. -// -// To learn more about datetime-like frequency strings, please see `this link -// `__. -// -// Examples -// -------- -// Numeric “start“ and “end“ is supported. -// -// >>> pd.interval_range(start=0, end=5) -// IntervalIndex([(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]], -// -// dtype='interval[int64, right]') -// -// Additionally, datetime-like input is also supported. -// -// >>> pd.interval_range(start=pd.Timestamp('2017-01-01'), -// ... end=pd.Timestamp('2017-01-04')) -// IntervalIndex([(2017-01-01 00:00:00, 2017-01-02 00:00:00], -// -// (2017-01-02 00:00:00, 2017-01-03 00:00:00], -// (2017-01-03 00:00:00, 2017-01-04 00:00:00]], -// dtype='interval[datetime64[ns], right]') -// -// The “freq“ parameter specifies the frequency between the left and right. -// endpoints of the individual intervals within the “IntervalIndex“. For -// numeric “start“ and “end“, the frequency must also be numeric. -// -// >>> pd.interval_range(start=0, periods=4, freq=1.5) -// IntervalIndex([(0.0, 1.5], (1.5, 3.0], (3.0, 4.5], (4.5, 6.0]], -// -// dtype='interval[float64, right]') -// -// Similarly, for datetime-like “start“ and “end“, the frequency must be -// convertible to a DateOffset. -// -// >>> pd.interval_range(start=pd.Timestamp('2017-01-01'), -// ... periods=3, freq='MS') -// IntervalIndex([(2017-01-01 00:00:00, 2017-02-01 00:00:00], -// -// (2017-02-01 00:00:00, 2017-03-01 00:00:00], -// (2017-03-01 00:00:00, 2017-04-01 00:00:00]], -// dtype='interval[datetime64[ns], right]') -// -// Specify “start“, “end“, and “periods“; the frequency is generated -// automatically (linearly spaced). -// -// >>> pd.interval_range(start=0, end=6, periods=4) -// IntervalIndex([(0.0, 1.5], (1.5, 3.0], (3.0, 4.5], (4.5, 6.0]], -// -// dtype='interval[float64, right]') -// -// The “closed“ parameter specifies which endpoints of the individual -// intervals within the “IntervalIndex“ are closed. -// -// >>> pd.interval_range(end=5, periods=4, closed='both') -// IntervalIndex([[1, 2], [2, 3], [3, 4], [4, 5]], -// -// dtype='interval[int64, both]') -// -//go:linkname IntervalRange py.interval_range -func IntervalRange(start *py.Object, end *py.Object, periods *py.Object, freq *py.Object, name *py.Object, closed *py.Object) *py.Object - -// Convert argument to a numeric type. -// -// The default return dtype is `float64` or `int64` -// depending on the data supplied. Use the `downcast` parameter -// to obtain other dtypes. -// -// Please note that precision loss may occur if really large numbers -// are passed in. Due to the internal limitations of `ndarray`, if -// numbers smaller than `-9223372036854775808` (np.iinfo(np.int64).min) -// or larger than `18446744073709551615` (np.iinfo(np.uint64).max) are -// passed in, it is very likely they will be converted to float so that -// they can be stored in an `ndarray`. These warnings apply similarly to -// `Series` since it internally leverages `ndarray`. -// -// Parameters -// ---------- -// arg : scalar, list, tuple, 1-d array, or Series -// -// Argument to be converted. -// -// errors : {'ignore', 'raise', 'coerce'}, default 'raise' -// -// - If 'raise', then invalid parsing will raise an exception. -// -// - If 'coerce', then invalid parsing will be set as NaN. -// -// - If 'ignore', then invalid parsing will return the input. -// -// .. versionchanged:: 2.2 -// -// "ignore" is deprecated. Catch exceptions explicitly instead. -// -// downcast : str, default None -// -// Can be 'integer', 'signed', 'unsigned', or 'float'. -// If not None, and if the data has been successfully cast to a -// numerical dtype (or if the data was numeric to begin with), -// downcast that resulting data to the smallest numerical dtype -// possible according to the following rules: -// -// - 'integer' or 'signed': smallest signed int dtype (min.: np.int8) -// - 'unsigned': smallest unsigned int dtype (min.: np.uint8) -// - 'float': smallest float dtype (min.: np.float32) -// -// As this behaviour is separate from the core conversion to -// numeric values, any errors raised during the downcasting -// will be surfaced regardless of the value of the 'errors' input. -// -// In addition, downcasting will only occur if the size -// of the resulting data's dtype is strictly larger than -// the dtype it is to be cast to, so if none of the dtypes -// checked satisfy that specification, no downcasting will be -// performed on the data. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// ret -// -// Numeric if parsing succeeded. -// Return type depends on input. Series if Series, otherwise ndarray. -// -// See Also -// -------- -// DataFrame.astype : Cast argument to a specified dtype. -// to_datetime : Convert argument to datetime. -// to_timedelta : Convert argument to timedelta. -// numpy.ndarray.astype : Cast a numpy array to a specified type. -// DataFrame.convert_dtypes : Convert dtypes. -// -// Examples -// -------- -// Take separate series and convert to numeric, coercing when told to -// -// >>> s = pd.Series(['1.0', '2', -3]) -// >>> pd.to_numeric(s) -// 0 1.0 -// 1 2.0 -// 2 -3.0 -// dtype: float64 -// >>> pd.to_numeric(s, downcast='float') -// 0 1.0 -// 1 2.0 -// 2 -3.0 -// dtype: float32 -// >>> pd.to_numeric(s, downcast='signed') -// 0 1 -// 1 2 -// 2 -3 -// dtype: int8 -// >>> s = pd.Series(['apple', '1.0', '2', -3]) -// >>> pd.to_numeric(s, errors='coerce') -// 0 NaN -// 1 1.0 -// 2 2.0 -// 3 -3.0 -// dtype: float64 -// -// Downcasting of nullable integer and floating dtypes is supported: -// -// >>> s = pd.Series([1, 2, 3], dtype="Int64") -// >>> pd.to_numeric(s, downcast="integer") -// 0 1 -// 1 2 -// 2 3 -// dtype: Int8 -// >>> s = pd.Series([1.0, 2.1, 3.0], dtype="Float64") -// >>> pd.to_numeric(s, downcast="float") -// 0 1.0 -// 1 2.1 -// 2 3.0 -// dtype: Float32 -// -//go:linkname ToNumeric py.to_numeric -func ToNumeric(arg *py.Object, errors *py.Object, downcast *py.Object, dtypeBackend *py.Object) *py.Object - -// Convert argument to datetime. -// -// This function converts a scalar, array-like, :class:`Series` or -// :class:`DataFrame`/dict-like to a pandas datetime object. -// -// Parameters -// ---------- -// arg : int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like -// -// The object to convert to a datetime. If a :class:`DataFrame` is provided, the -// method expects minimally the following columns: :const:`"year"`, -// :const:`"month"`, :const:`"day"`. The column "year" -// must be specified in 4-digit format. -// -// errors : {'ignore', 'raise', 'coerce'}, default 'raise' -// - If :const:`'raise'`, then invalid parsing will raise an exception. -// - If :const:`'coerce'`, then invalid parsing will be set as :const:`NaT`. -// - If :const:`'ignore'`, then invalid parsing will return the input. -// -// dayfirst : bool, default False -// -// Specify a date parse order if `arg` is str or is list-like. -// If :const:`True`, parses dates with the day first, e.g. :const:`"10/11/12"` -// is parsed as :const:`2012-11-10`. -// -// .. warning:: -// -// ``dayfirst=True`` is not strict, but will prefer to parse -// with day first. -// -// yearfirst : bool, default False -// -// Specify a date parse order if `arg` is str or is list-like. -// -// - If :const:`True` parses dates with the year first, e.g. -// :const:`"10/11/12"` is parsed as :const:`2010-11-12`. -// - If both `dayfirst` and `yearfirst` are :const:`True`, `yearfirst` is -// preceded (same as :mod:`dateutil`). -// -// .. warning:: -// -// ``yearfirst=True`` is not strict, but will prefer to parse -// with year first. -// -// utc : bool, default False -// -// Control timezone-related parsing, localization and conversion. -// -// - If :const:`True`, the function *always* returns a timezone-aware -// UTC-localized :class:`Timestamp`, :class:`Series` or -// :class:`DatetimeIndex`. To do this, timezone-naive inputs are -// *localized* as UTC, while timezone-aware inputs are *converted* to UTC. -// -// - If :const:`False` (default), inputs will not be coerced to UTC. -// Timezone-naive inputs will remain naive, while timezone-aware ones -// will keep their time offsets. Limitations exist for mixed -// offsets (typically, daylight savings), see :ref:`Examples -// ` section for details. -// -// .. warning:: -// -// In a future version of pandas, parsing datetimes with mixed time -// zones will raise an error unless `utc=True`. -// Please specify `utc=True` to opt in to the new behaviour -// and silence this warning. To create a `Series` with mixed offsets and -// `object` dtype, please use `apply` and `datetime.datetime.strptime`. -// -// See also: pandas general documentation about `timezone conversion and -// localization -// `_. -// -// format : str, default None -// -// The strftime to parse time, e.g. :const:`"%d/%m/%Y"`. See -// `strftime documentation -// `_ for more information on choices, though -// note that :const:`"%f"` will parse all the way up to nanoseconds. -// You can also pass: -// -// - "ISO8601", to parse any `ISO8601 `_ -// time string (not necessarily in exactly the same format); -// - "mixed", to infer the format for each element individually. This is risky, -// and you should probably use it along with `dayfirst`. -// -// .. note:: -// -// If a :class:`DataFrame` is passed, then `format` has no effect. -// -// exact : bool, default True -// -// Control how `format` is used: -// -// - If :const:`True`, require an exact `format` match. -// - If :const:`False`, allow the `format` to match anywhere in the target -// string. -// -// Cannot be used alongside ``format='ISO8601'`` or ``format='mixed'``. -// -// unit : str, default 'ns' -// -// The unit of the arg (D,s,ms,us,ns) denote the unit, which is an -// integer or float number. This will be based off the origin. -// Example, with ``unit='ms'`` and ``origin='unix'``, this would calculate -// the number of milliseconds to the unix epoch start. -// -// infer_datetime_format : bool, default False -// -// If :const:`True` and no `format` is given, attempt to infer the format -// of the datetime strings based on the first non-NaN element, -// and if it can be inferred, switch to a faster method of parsing them. -// In some cases this can increase the parsing speed by ~5-10x. -// -// .. deprecated:: 2.0.0 -// A strict version of this argument is now the default, passing it has -// no effect. -// -// origin : scalar, default 'unix' -// -// Define the reference date. The numeric values would be parsed as number -// of units (defined by `unit`) since this reference date. -// -// - If :const:`'unix'` (or POSIX) time; origin is set to 1970-01-01. -// - If :const:`'julian'`, unit must be :const:`'D'`, and origin is set to -// beginning of Julian Calendar. Julian day number :const:`0` is assigned -// to the day starting at noon on January 1, 4713 BC. -// - If Timestamp convertible (Timestamp, dt.datetime, np.datetimt64 or date -// string), origin is set to Timestamp identified by origin. -// - If a float or integer, origin is the difference -// (in units determined by the ``unit`` argument) relative to 1970-01-01. -// -// cache : bool, default True -// -// If :const:`True`, use a cache of unique, converted dates to apply the -// datetime conversion. May produce significant speed-up when parsing -// duplicate date strings, especially ones with timezone offsets. The cache -// is only used when there are at least 50 values. The presence of -// out-of-bounds values will render the cache unusable and may slow down -// parsing. -// -// Returns -// ------- -// datetime -// -// If parsing succeeded. -// Return type depends on input (types in parenthesis correspond to -// fallback in case of unsuccessful timezone or out-of-range timestamp -// parsing): -// -// - scalar: :class:`Timestamp` (or :class:`datetime.datetime`) -// - array-like: :class:`DatetimeIndex` (or :class:`Series` with -// :class:`object` dtype containing :class:`datetime.datetime`) -// - Series: :class:`Series` of :class:`datetime64` dtype (or -// :class:`Series` of :class:`object` dtype containing -// :class:`datetime.datetime`) -// - DataFrame: :class:`Series` of :class:`datetime64` dtype (or -// :class:`Series` of :class:`object` dtype containing -// :class:`datetime.datetime`) -// -// Raises -// ------ -// ParserError -// -// When parsing a date from string fails. -// -// ValueError -// -// When another datetime conversion error happens. For example when one -// of 'year', 'month', day' columns is missing in a :class:`DataFrame`, or -// when a Timezone-aware :class:`datetime.datetime` is found in an array-like -// of mixed time offsets, and ``utc=False``. -// -// See Also -// -------- -// DataFrame.astype : Cast argument to a specified dtype. -// to_timedelta : Convert argument to timedelta. -// convert_dtypes : Convert dtypes. -// -// Notes -// ----- -// -// Many input types are supported, and lead to different output types: -// -// - **scalars** can be int, float, str, datetime object (from stdlib :mod:`datetime` -// module or :mod:`numpy`). They are converted to :class:`Timestamp` when -// possible, otherwise they are converted to :class:`datetime.datetime`. -// None/NaN/null scalars are converted to :const:`NaT`. -// -// - **array-like** can contain int, float, str, datetime objects. They are -// converted to :class:`DatetimeIndex` when possible, otherwise they are -// converted to :class:`Index` with :class:`object` dtype, containing -// :class:`datetime.datetime`. None/NaN/null entries are converted to -// :const:`NaT` in both cases. -// -// - **Series** are converted to :class:`Series` with :class:`datetime64` -// dtype when possible, otherwise they are converted to :class:`Series` with -// :class:`object` dtype, containing :class:`datetime.datetime`. None/NaN/null -// entries are converted to :const:`NaT` in both cases. -// -// - **DataFrame/dict-like** are converted to :class:`Series` with -// :class:`datetime64` dtype. For each row a datetime is created from assembling -// the various dataframe columns. Column keys can be common abbreviations -// like ['year', 'month', 'day', 'minute', 'second', 'ms', 'us', 'ns']) or -// plurals of the same. -// -// The following causes are responsible for :class:`datetime.datetime` objects -// being returned (possibly inside an :class:`Index` or a :class:`Series` with -// :class:`object` dtype) instead of a proper pandas designated type -// (:class:`Timestamp`, :class:`DatetimeIndex` or :class:`Series` -// with :class:`datetime64` dtype): -// -// - when any input element is before :const:`Timestamp.min` or after -// :const:`Timestamp.max`, see `timestamp limitations -// `_. -// -// - when “utc=False“ (default) and the input is an array-like or -// :class:`Series` containing mixed naive/aware datetime, or aware with mixed -// time offsets. Note that this happens in the (quite frequent) situation when -// the timezone has a daylight savings policy. In that case you may wish to -// use “utc=True“. -// -// Examples -// -------- -// -// **Handling various input formats** -// -// Assembling a datetime from multiple columns of a :class:`DataFrame`. The keys -// can be common abbreviations like ['year', 'month', 'day', 'minute', 'second', -// 'ms', 'us', 'ns']) or plurals of the same -// -// >>> df = pd.DataFrame({'year': [2015, 2016], -// ... 'month': [2, 3], -// ... 'day': [4, 5]}) -// >>> pd.to_datetime(df) -// 0 2015-02-04 -// 1 2016-03-05 -// dtype: datetime64[ns] -// -// # Using a unix epoch time -// -// >>> pd.to_datetime(1490195805, unit='s') -// Timestamp('2017-03-22 15:16:45') -// >>> pd.to_datetime(1490195805433502912, unit='ns') -// Timestamp('2017-03-22 15:16:45.433502912') -// -// .. warning:: For float arg, precision rounding might happen. To prevent -// -// unexpected behavior use a fixed-width exact type. -// -// # Using a non-unix epoch origin -// -// >>> pd.to_datetime([1, 2, 3], unit='D', -// ... origin=pd.Timestamp('1960-01-01')) -// DatetimeIndex(['1960-01-02', '1960-01-03', '1960-01-04'], -// -// dtype='datetime64[ns]', freq=None) -// -// **Differences with strptime behavior** -// -// :const:`"%f"` will parse all the way up to nanoseconds. -// -// >>> pd.to_datetime('2018-10-26 12:00:00.0000000011', -// ... format='%Y-%m-%d %H:%M:%S.%f') -// Timestamp('2018-10-26 12:00:00.000000001') -// -// **Non-convertible date/times** -// -// Passing “errors='coerce'“ will force an out-of-bounds date to :const:`NaT`, -// in addition to forcing non-dates (or non-parseable dates) to :const:`NaT`. -// -// >>> pd.to_datetime('13000101', format='%Y%m%d', errors='coerce') -// NaT -// -// .. _to_datetime_tz_examples: -// -// **Timezones and time offsets** -// -// The default behaviour (“utc=False“) is as follows: -// -// - Timezone-naive inputs are converted to timezone-naive :class:`DatetimeIndex`: -// -// >>> pd.to_datetime(['2018-10-26 12:00:00', '2018-10-26 13:00:15']) -// DatetimeIndex(['2018-10-26 12:00:00', '2018-10-26 13:00:15'], -// -// dtype='datetime64[ns]', freq=None) -// -// - Timezone-aware inputs *with constant time offset* are converted to -// timezone-aware :class:`DatetimeIndex`: -// -// >>> pd.to_datetime(['2018-10-26 12:00 -0500', '2018-10-26 13:00 -0500']) -// DatetimeIndex(['2018-10-26 12:00:00-05:00', '2018-10-26 13:00:00-05:00'], -// -// dtype='datetime64[ns, UTC-05:00]', freq=None) -// -// - However, timezone-aware inputs *with mixed time offsets* (for example -// issued from a timezone with daylight savings, such as Europe/Paris) -// are **not successfully converted** to a :class:`DatetimeIndex`. -// Parsing datetimes with mixed time zones will show a warning unless -// `utc=True`. If you specify `utc=False` the warning below will be shown -// and a simple :class:`Index` containing :class:`datetime.datetime` -// objects will be returned: -// -// >>> pd.to_datetime(['2020-10-25 02:00 +0200', -// ... '2020-10-25 04:00 +0100']) # doctest: +SKIP -// FutureWarning: In a future version of pandas, parsing datetimes with mixed -// time zones will raise an error unless `utc=True`. Please specify `utc=True` -// to opt in to the new behaviour and silence this warning. To create a `Series` -// with mixed offsets and `object` dtype, please use `apply` and -// `datetime.datetime.strptime`. -// Index([2020-10-25 02:00:00+02:00, 2020-10-25 04:00:00+01:00], -// -// dtype='object') -// -// - A mix of timezone-aware and timezone-naive inputs is also converted to -// a simple :class:`Index` containing :class:`datetime.datetime` objects: -// -// >>> from datetime import datetime -// >>> pd.to_datetime(["2020-01-01 01:00:00-01:00", -// ... datetime(2020, 1, 1, 3, 0)]) # doctest: +SKIP -// FutureWarning: In a future version of pandas, parsing datetimes with mixed -// time zones will raise an error unless `utc=True`. Please specify `utc=True` -// to opt in to the new behaviour and silence this warning. To create a `Series` -// with mixed offsets and `object` dtype, please use `apply` and -// `datetime.datetime.strptime`. -// Index([2020-01-01 01:00:00-01:00, 2020-01-01 03:00:00], dtype='object') -// -// | -// -// Setting “utc=True“ solves most of the above issues: -// -// - Timezone-naive inputs are *localized* as UTC -// -// >>> pd.to_datetime(['2018-10-26 12:00', '2018-10-26 13:00'], utc=True) -// DatetimeIndex(['2018-10-26 12:00:00+00:00', '2018-10-26 13:00:00+00:00'], -// -// dtype='datetime64[ns, UTC]', freq=None) -// -// - Timezone-aware inputs are *converted* to UTC (the output represents the -// exact same datetime, but viewed from the UTC time offset `+00:00`). -// -// >>> pd.to_datetime(['2018-10-26 12:00 -0530', '2018-10-26 12:00 -0500'], -// ... utc=True) -// DatetimeIndex(['2018-10-26 17:30:00+00:00', '2018-10-26 17:00:00+00:00'], -// -// dtype='datetime64[ns, UTC]', freq=None) -// -// - Inputs can contain both string or datetime, the above -// rules still apply -// -// >>> pd.to_datetime(['2018-10-26 12:00', datetime(2020, 1, 1, 18)], utc=True) -// DatetimeIndex(['2018-10-26 12:00:00+00:00', '2020-01-01 18:00:00+00:00'], -// -// dtype='datetime64[ns, UTC]', freq=None) -// -//go:linkname ToDatetime py.to_datetime -func ToDatetime(arg *py.Object, errors *py.Object, dayfirst *py.Object, yearfirst *py.Object, utc *py.Object, format *py.Object, exact *py.Object, unit *py.Object, inferDatetimeFormat *py.Object, origin *py.Object, cache *py.Object) *py.Object - -// Convert argument to timedelta. -// -// Timedeltas are absolute differences in times, expressed in difference -// units (e.g. days, hours, minutes, seconds). This method converts -// an argument from a recognized timedelta format / value into -// a Timedelta type. -// -// Parameters -// ---------- -// arg : str, timedelta, list-like or Series -// -// The data to be converted to timedelta. -// -// .. versionchanged:: 2.0 -// Strings with units 'M', 'Y' and 'y' do not represent -// unambiguous timedelta values and will raise an exception. -// -// unit : str, optional -// -// Denotes the unit of the arg for numeric `arg`. Defaults to ``"ns"``. -// -// Possible values: -// -// * 'W' -// * 'D' / 'days' / 'day' -// * 'hours' / 'hour' / 'hr' / 'h' / 'H' -// * 'm' / 'minute' / 'min' / 'minutes' / 'T' -// * 's' / 'seconds' / 'sec' / 'second' / 'S' -// * 'ms' / 'milliseconds' / 'millisecond' / 'milli' / 'millis' / 'L' -// * 'us' / 'microseconds' / 'microsecond' / 'micro' / 'micros' / 'U' -// * 'ns' / 'nanoseconds' / 'nano' / 'nanos' / 'nanosecond' / 'N' -// -// Must not be specified when `arg` contains strings and ``errors="raise"``. -// -// .. deprecated:: 2.2.0 -// Units 'H', 'T', 'S', 'L', 'U' and 'N' are deprecated and will be removed -// in a future version. Please use 'h', 'min', 's', 'ms', 'us', and 'ns' -// instead of 'H', 'T', 'S', 'L', 'U' and 'N'. -// -// errors : {'ignore', 'raise', 'coerce'}, default 'raise' -// - If 'raise', then invalid parsing will raise an exception. -// - If 'coerce', then invalid parsing will be set as NaT. -// - If 'ignore', then invalid parsing will return the input. -// -// Returns -// ------- -// timedelta -// -// If parsing succeeded. -// Return type depends on input: -// -// - list-like: TimedeltaIndex of timedelta64 dtype -// - Series: Series of timedelta64 dtype -// - scalar: Timedelta -// -// See Also -// -------- -// DataFrame.astype : Cast argument to a specified dtype. -// to_datetime : Convert argument to datetime. -// convert_dtypes : Convert dtypes. -// -// Notes -// ----- -// If the precision is higher than nanoseconds, the precision of the duration is -// truncated to nanoseconds for string inputs. -// -// Examples -// -------- -// Parsing a single string to a Timedelta: -// -// >>> pd.to_timedelta('1 days 06:05:01.00003') -// Timedelta('1 days 06:05:01.000030') -// >>> pd.to_timedelta('15.5us') -// Timedelta('0 days 00:00:00.000015500') -// -// Parsing a list or array of strings: -// -// >>> pd.to_timedelta(['1 days 06:05:01.00003', '15.5us', 'nan']) -// TimedeltaIndex(['1 days 06:05:01.000030', '0 days 00:00:00.000015500', NaT], -// -// dtype='timedelta64[ns]', freq=None) -// -// Converting numbers by specifying the `unit` keyword argument: -// -// >>> pd.to_timedelta(np.arange(5), unit='s') -// TimedeltaIndex(['0 days 00:00:00', '0 days 00:00:01', '0 days 00:00:02', -// -// '0 days 00:00:03', '0 days 00:00:04'], -// dtype='timedelta64[ns]', freq=None) -// -// >>> pd.to_timedelta(np.arange(5), unit='d') -// TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'], -// -// dtype='timedelta64[ns]', freq=None) -// -//go:linkname ToTimedelta py.to_timedelta -func ToTimedelta(arg *py.Object, unit *py.Object, errors *py.Object) *py.Object - -// Encode the object as an enumerated type or categorical variable. -// -// This method is useful for obtaining a numeric representation of an -// array when all that matters is identifying distinct values. `factorize` -// is available as both a top-level function :func:`pandas.factorize`, -// and as a method :meth:`Series.factorize` and :meth:`Index.factorize`. -// -// Parameters -// ---------- -// values : sequence -// -// A 1-D sequence. Sequences that aren't pandas objects are -// coerced to ndarrays before factorization. -// -// sort : bool, default False -// -// Sort `uniques` and shuffle `codes` to maintain the -// relationship. -// -// use_na_sentinel : bool, default True -// -// If True, the sentinel -1 will be used for NaN values. If False, -// NaN values will be encoded as non-negative integers and will not drop the -// NaN from the uniques of the values. -// -// .. versionadded:: 1.5.0 -// -// size_hint : int, optional -// -// Hint to the hashtable sizer. -// -// Returns -// ------- -// codes : ndarray -// -// An integer ndarray that's an indexer into `uniques`. -// ``uniques.take(codes)`` will have the same values as `values`. -// -// uniques : ndarray, Index, or Categorical -// -// The unique valid values. When `values` is Categorical, `uniques` -// is a Categorical. When `values` is some other pandas object, an -// `Index` is returned. Otherwise, a 1-D ndarray is returned. -// -// .. note:: -// -// Even if there's a missing value in `values`, `uniques` will -// *not* contain an entry for it. -// -// See Also -// -------- -// cut : Discretize continuous-valued array. -// unique : Find the unique value in an array. -// -// Notes -// ----- -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// These examples all show factorize as a top-level method like -// “pd.factorize(values)“. The results are identical for methods like -// :meth:`Series.factorize`. -// -// >>> codes, uniques = pd.factorize(np.array(['b', 'b', 'a', 'c', 'b'], dtype="O")) -// >>> codes -// array([0, 0, 1, 2, 0]) -// >>> uniques -// array(['b', 'a', 'c'], dtype=object) -// -// With “sort=True“, the `uniques` will be sorted, and `codes` will be -// shuffled so that the relationship is the maintained. -// -// >>> codes, uniques = pd.factorize(np.array(['b', 'b', 'a', 'c', 'b'], dtype="O"), -// ... sort=True) -// >>> codes -// array([1, 1, 0, 2, 1]) -// >>> uniques -// array(['a', 'b', 'c'], dtype=object) -// -// When “use_na_sentinel=True“ (the default), missing values are indicated in -// the `codes` with the sentinel value “-1“ and missing values are not -// included in `uniques`. -// -// >>> codes, uniques = pd.factorize(np.array(['b', None, 'a', 'c', 'b'], dtype="O")) -// >>> codes -// array([ 0, -1, 1, 2, 0]) -// >>> uniques -// array(['b', 'a', 'c'], dtype=object) -// -// Thus far, we've only factorized lists (which are internally coerced to -// NumPy arrays). When factorizing pandas objects, the type of `uniques` -// will differ. For Categoricals, a `Categorical` is returned. -// -// >>> cat = pd.Categorical(['a', 'a', 'c'], categories=['a', 'b', 'c']) -// >>> codes, uniques = pd.factorize(cat) -// >>> codes -// array([0, 0, 1]) -// >>> uniques -// ['a', 'c'] -// Categories (3, object): ['a', 'b', 'c'] -// -// Notice that “'b'“ is in “uniques.categories“, despite not being -// present in “cat.values“. -// -// For all other pandas objects, an Index of the appropriate type is -// returned. -// -// >>> cat = pd.Series(['a', 'a', 'c']) -// >>> codes, uniques = pd.factorize(cat) -// >>> codes -// array([0, 0, 1]) -// >>> uniques -// Index(['a', 'c'], dtype='object') -// -// If NaN is in the values, and we want to include NaN in the uniques of the -// values, it can be achieved by setting “use_na_sentinel=False“. -// -// >>> values = np.array([1, 2, 1, np.nan]) -// >>> codes, uniques = pd.factorize(values) # default: use_na_sentinel=True -// >>> codes -// array([ 0, 1, 0, -1]) -// >>> uniques -// array([1., 2.]) -// -// >>> codes, uniques = pd.factorize(values, use_na_sentinel=False) -// >>> codes -// array([0, 1, 0, 2]) -// >>> uniques -// array([ 1., 2., nan]) -// -//go:linkname Factorize py.factorize -func Factorize(values *py.Object, sort *py.Object, useNaSentinel *py.Object, sizeHint *py.Object) *py.Object - -// Return unique values based on a hash table. -// -// Uniques are returned in order of appearance. This does NOT sort. -// -// Significantly faster than numpy.unique for long enough sequences. -// Includes NA values. -// -// Parameters -// ---------- -// values : 1d array-like -// -// Returns -// ------- -// numpy.ndarray or ExtensionArray -// -// The return can be: -// -// * Index : when the input is an Index -// * Categorical : when the input is a Categorical dtype -// * ndarray : when the input is a Series/ndarray -// -// Return numpy.ndarray or ExtensionArray. -// -// See Also -// -------- -// Index.unique : Return unique values from an Index. -// Series.unique : Return unique values of Series object. -// -// Examples -// -------- -// >>> pd.unique(pd.Series([2, 1, 3, 3])) -// array([2, 1, 3]) -// -// >>> pd.unique(pd.Series([2] + [1] * 5)) -// array([2, 1]) -// -// >>> pd.unique(pd.Series([pd.Timestamp("20160101"), pd.Timestamp("20160101")])) -// array(['2016-01-01T00:00:00.000000000'], dtype='datetime64[ns]') -// -// >>> pd.unique( -// ... pd.Series( -// ... [ -// ... pd.Timestamp("20160101", tz="US/Eastern"), -// ... pd.Timestamp("20160101", tz="US/Eastern"), -// ... ] -// ... ) -// ... ) -// -// ['2016-01-01 00:00:00-05:00'] -// Length: 1, dtype: datetime64[ns, US/Eastern] -// -// >>> pd.unique( -// ... pd.Index( -// ... [ -// ... pd.Timestamp("20160101", tz="US/Eastern"), -// ... pd.Timestamp("20160101", tz="US/Eastern"), -// ... ] -// ... ) -// ... ) -// DatetimeIndex(['2016-01-01 00:00:00-05:00'], -// -// dtype='datetime64[ns, US/Eastern]', -// freq=None) -// -// >>> pd.unique(np.array(list("baabc"), dtype="O")) -// array(['b', 'a', 'c'], dtype=object) -// -// An unordered Categorical will return categories in the -// order of appearance. -// -// >>> pd.unique(pd.Series(pd.Categorical(list("baabc")))) -// ['b', 'a', 'c'] -// Categories (3, object): ['a', 'b', 'c'] -// -// >>> pd.unique(pd.Series(pd.Categorical(list("baabc"), categories=list("abc")))) -// ['b', 'a', 'c'] -// Categories (3, object): ['a', 'b', 'c'] -// -// An ordered Categorical preserves the category ordering. -// -// >>> pd.unique( -// ... pd.Series( -// ... pd.Categorical(list("baabc"), categories=list("abc"), ordered=True) -// ... ) -// ... ) -// ['b', 'a', 'c'] -// Categories (3, object): ['a' < 'b' < 'c'] -// -// # An array of tuples -// -// >>> pd.unique(pd.Series([("a", "b"), ("b", "a"), ("a", "c"), ("b", "a")]).values) -// array([('a', 'b'), ('b', 'a'), ('a', 'c')], dtype=object) -// -//go:linkname Unique py.unique -func Unique(values *py.Object) *py.Object - -// Compute a histogram of the counts of non-null values. -// -// Parameters -// ---------- -// values : ndarray (1-d) -// sort : bool, default True -// -// Sort by values -// -// ascending : bool, default False -// -// Sort in ascending order -// -// normalize: bool, default False -// -// If True then compute a relative histogram -// -// bins : integer, optional -// -// Rather than count values, group them into half-open bins, -// convenience for pd.cut, only works with numeric data -// -// dropna : bool, default True -// -// Don't include counts of NaN -// -// Returns -// ------- -// Series -// -//go:linkname ValueCounts py.value_counts -func ValueCounts(values *py.Object, sort *py.Object, ascending *py.Object, normalize *py.Object, bins *py.Object, dropna *py.Object) *py.Object - -// Create an array. -// -// Parameters -// ---------- -// data : Sequence of objects -// -// The scalars inside `data` should be instances of the -// scalar type for `dtype`. It's expected that `data` -// represents a 1-dimensional array of data. -// -// When `data` is an Index or Series, the underlying array -// will be extracted from `data`. -// -// dtype : str, np.dtype, or ExtensionDtype, optional -// -// The dtype to use for the array. This may be a NumPy -// dtype or an extension type registered with pandas using -// :meth:`pandas.api.extensions.register_extension_dtype`. -// -// If not specified, there are two possibilities: -// -// 1. When `data` is a :class:`Series`, :class:`Index`, or -// :class:`ExtensionArray`, the `dtype` will be taken -// from the data. -// 2. Otherwise, pandas will attempt to infer the `dtype` -// from the data. -// -// Note that when `data` is a NumPy array, ``data.dtype`` is -// *not* used for inferring the array type. This is because -// NumPy cannot represent all the types of data that can be -// held in extension arrays. -// -// Currently, pandas will infer an extension dtype for sequences of -// -// ============================== ======================================= -// Scalar Type Array Type -// ============================== ======================================= -// :class:`pandas.Interval` :class:`pandas.arrays.IntervalArray` -// :class:`pandas.Period` :class:`pandas.arrays.PeriodArray` -// :class:`datetime.datetime` :class:`pandas.arrays.DatetimeArray` -// :class:`datetime.timedelta` :class:`pandas.arrays.TimedeltaArray` -// :class:`int` :class:`pandas.arrays.IntegerArray` -// :class:`float` :class:`pandas.arrays.FloatingArray` -// :class:`str` :class:`pandas.arrays.StringArray` or -// :class:`pandas.arrays.ArrowStringArray` -// :class:`bool` :class:`pandas.arrays.BooleanArray` -// ============================== ======================================= -// -// The ExtensionArray created when the scalar type is :class:`str` is determined by -// ``pd.options.mode.string_storage`` if the dtype is not explicitly given. -// -// For all other cases, NumPy's usual inference rules will be used. -// -// copy : bool, default True -// -// Whether to copy the data, even if not necessary. Depending -// on the type of `data`, creating the new array may require -// copying data, even if ``copy=False``. -// -// Returns -// ------- -// ExtensionArray -// -// The newly created array. -// -// Raises -// ------ -// ValueError -// -// When `data` is not 1-dimensional. -// -// See Also -// -------- -// numpy.array : Construct a NumPy array. -// Series : Construct a pandas Series. -// Index : Construct a pandas Index. -// arrays.NumpyExtensionArray : ExtensionArray wrapping a NumPy array. -// Series.array : Extract the array stored within a Series. -// -// Notes -// ----- -// Omitting the `dtype` argument means pandas will attempt to infer the -// best array type from the values in the data. As new array types are -// added by pandas and 3rd party libraries, the "best" array type may -// change. We recommend specifying `dtype` to ensure that -// -// 1. the correct array type for the data is returned -// 2. the returned array type doesn't change as new extension types -// are added by pandas and third-party libraries -// -// Additionally, if the underlying memory representation of the returned -// array matters, we recommend specifying the `dtype` as a concrete object -// rather than a string alias or allowing it to be inferred. For example, -// a future version of pandas or a 3rd-party library may include a -// dedicated ExtensionArray for string data. In this event, the following -// would no longer return a :class:`arrays.NumpyExtensionArray` backed by a -// NumPy array. -// -// >>> pd.array(['a', 'b'], dtype=str) -// -// ['a', 'b'] -// Length: 2, dtype: str32 -// -// This would instead return the new ExtensionArray dedicated for string -// data. If you really need the new array to be backed by a NumPy array, -// specify that in the dtype. -// -// >>> pd.array(['a', 'b'], dtype=np.dtype(" -// ['a', 'b'] -// Length: 2, dtype: str32 -// -// Finally, Pandas has arrays that mostly overlap with NumPy -// -// - :class:`arrays.DatetimeArray` -// - :class:`arrays.TimedeltaArray` -// -// When data with a “datetime64[ns]“ or “timedelta64[ns]“ dtype is -// passed, pandas will always return a “DatetimeArray“ or “TimedeltaArray“ -// rather than a “NumpyExtensionArray“. This is for symmetry with the case of -// timezone-aware data, which NumPy does not natively support. -// -// >>> pd.array(['2015', '2016'], dtype='datetime64[ns]') -// -// ['2015-01-01 00:00:00', '2016-01-01 00:00:00'] -// Length: 2, dtype: datetime64[ns] -// -// >>> pd.array(["1h", "2h"], dtype='timedelta64[ns]') -// -// ['0 days 01:00:00', '0 days 02:00:00'] -// Length: 2, dtype: timedelta64[ns] -// -// Examples -// -------- -// If a dtype is not specified, pandas will infer the best dtype from the values. -// See the description of `dtype` for the types pandas infers for. -// -// >>> pd.array([1, 2]) -// -// [1, 2] -// Length: 2, dtype: Int64 -// -// >>> pd.array([1, 2, np.nan]) -// -// [1, 2, ] -// Length: 3, dtype: Int64 -// -// >>> pd.array([1.1, 2.2]) -// -// [1.1, 2.2] -// Length: 2, dtype: Float64 -// -// >>> pd.array(["a", None, "c"]) -// -// ['a', , 'c'] -// Length: 3, dtype: string -// -// >>> with pd.option_context("string_storage", "pyarrow"): -// ... arr = pd.array(["a", None, "c"]) -// ... -// >>> arr -// -// ['a', , 'c'] -// Length: 3, dtype: string -// -// >>> pd.array([pd.Period('2000', freq="D"), pd.Period("2000", freq="D")]) -// -// ['2000-01-01', '2000-01-01'] -// Length: 2, dtype: period[D] -// -// You can use the string alias for `dtype` -// -// >>> pd.array(['a', 'b', 'a'], dtype='category') -// ['a', 'b', 'a'] -// Categories (2, object): ['a', 'b'] -// -// # Or specify the actual dtype -// -// >>> pd.array(['a', 'b', 'a'], -// ... dtype=pd.CategoricalDtype(['a', 'b', 'c'], ordered=True)) -// ['a', 'b', 'a'] -// Categories (3, object): ['a' < 'b' < 'c'] -// -// If pandas does not infer a dedicated extension type a -// :class:`arrays.NumpyExtensionArray` is returned. -// -// >>> pd.array([1 + 1j, 3 + 2j]) -// -// [(1+1j), (3+2j)] -// Length: 2, dtype: complex128 -// -// As mentioned in the "Notes" section, new extension types may be added -// in the future (by pandas or 3rd party libraries), causing the return -// value to no longer be a :class:`arrays.NumpyExtensionArray`. Specify the -// `dtype` as a NumPy dtype if you need to ensure there's no future change in -// behavior. -// -// >>> pd.array([1, 2], dtype=np.dtype("int32")) -// -// [1, 2] -// Length: 2, dtype: int32 -// -// `data` must be 1-dimensional. A ValueError is raised when the input -// has the wrong dimensionality. -// -// >>> pd.array(1) -// Traceback (most recent call last): -// -// ... -// -// ValueError: Cannot pass scalar '1' to 'pandas.array'. -// -//go:linkname Array py.array -func Array(data *py.Object, dtype *py.Object, copy *py.Object) *py.Object - -// Format float representation in DataFrame with SI notation. -// -// Parameters -// ---------- -// accuracy : int, default 3 -// -// Number of decimal digits after the floating point. -// -// use_eng_prefix : bool, default False -// -// Whether to represent a value with SI prefixes. -// -// Returns -// ------- -// None -// -// Examples -// -------- -// >>> df = pd.DataFrame([1e-9, 1e-3, 1, 1e3, 1e6]) -// >>> df -// -// 0 -// -// 0 1.000000e-09 -// 1 1.000000e-03 -// 2 1.000000e+00 -// 3 1.000000e+03 -// 4 1.000000e+06 -// -// >>> pd.set_eng_float_format(accuracy=1) -// >>> df -// -// 0 -// -// 0 1.0E-09 -// 1 1.0E-03 -// 2 1.0E+00 -// 3 1.0E+03 -// 4 1.0E+06 -// -// >>> pd.set_eng_float_format(use_eng_prefix=True) -// >>> df -// -// 0 -// -// 0 1.000n -// 1 1.000m -// 2 1.000 -// 3 1.000k -// 4 1.000M -// -// >>> pd.set_eng_float_format(accuracy=1, use_eng_prefix=True) -// >>> df -// -// 0 -// -// 0 1.0n -// 1 1.0m -// 2 1.0 -// 3 1.0k -// 4 1.0M -// -// >>> pd.set_option("display.float_format", None) # unset option -// -//go:linkname SetEngFloatFormat py.set_eng_float_format -func SetEngFloatFormat(accuracy *py.Object, useEngPrefix *py.Object) *py.Object - -// Infer the most likely frequency given the input index. -// -// Parameters -// ---------- -// index : DatetimeIndex, TimedeltaIndex, Series or array-like -// -// If passed a Series will use the values of the series (NOT THE INDEX). -// -// Returns -// ------- -// str or None -// -// None if no discernible frequency. -// -// Raises -// ------ -// TypeError -// -// If the index is not datetime-like. -// -// ValueError -// -// If there are fewer than three values. -// -// Examples -// -------- -// >>> idx = pd.date_range(start='2020/12/01', end='2020/12/30', periods=30) -// >>> pd.infer_freq(idx) -// 'D' -// -//go:linkname InferFreq py.infer_freq -func InferFreq(index *py.Object) *py.Object - -// Concatenate pandas objects along a particular axis. -// -// Allows optional set logic along the other axes. -// -// Can also add a layer of hierarchical indexing on the concatenation axis, -// which may be useful if the labels are the same (or overlapping) on -// the passed axis number. -// -// Parameters -// ---------- -// objs : a sequence or mapping of Series or DataFrame objects -// -// If a mapping is passed, the sorted keys will be used as the `keys` -// argument, unless it is passed, in which case the values will be -// selected (see below). Any None objects will be dropped silently unless -// they are all None in which case a ValueError will be raised. -// -// axis : {0/'index', 1/'columns'}, default 0 -// -// The axis to concatenate along. -// -// join : {'inner', 'outer'}, default 'outer' -// -// How to handle indexes on other axis (or axes). -// -// ignore_index : bool, default False -// -// If True, do not use the index values along the concatenation axis. The -// resulting axis will be labeled 0, ..., n - 1. This is useful if you are -// concatenating objects where the concatenation axis does not have -// meaningful indexing information. Note the index values on the other -// axes are still respected in the join. -// -// keys : sequence, default None -// -// If multiple levels passed, should contain tuples. Construct -// hierarchical index using the passed keys as the outermost level. -// -// levels : list of sequences, default None -// -// Specific levels (unique values) to use for constructing a -// MultiIndex. Otherwise they will be inferred from the keys. -// -// names : list, default None -// -// Names for the levels in the resulting hierarchical index. -// -// verify_integrity : bool, default False -// -// Check whether the new concatenated axis contains duplicates. This can -// be very expensive relative to the actual data concatenation. -// -// sort : bool, default False -// -// Sort non-concatenation axis if it is not already aligned. One exception to -// this is when the non-concatentation axis is a DatetimeIndex and join='outer' -// and the axis is not already aligned. In that case, the non-concatenation -// axis is always sorted lexicographically. -// -// copy : bool, default True -// -// If False, do not copy data unnecessarily. -// -// Returns -// ------- -// object, type of objs -// -// When concatenating all ``Series`` along the index (axis=0), a -// ``Series`` is returned. When ``objs`` contains at least one -// ``DataFrame``, a ``DataFrame`` is returned. When concatenating along -// the columns (axis=1), a ``DataFrame`` is returned. -// -// See Also -// -------- -// DataFrame.join : Join DataFrames using indexes. -// DataFrame.merge : Merge DataFrames by indexes or columns. -// -// Notes -// ----- -// The keys, levels, and names arguments are all optional. -// -// A walkthrough of how this method fits in with other tools for combining -// pandas objects can be found `here -// `__. -// -// It is not recommended to build DataFrames by adding single rows in a -// for loop. Build a list of rows and make a DataFrame in a single concat. -// -// Examples -// -------- -// Combine two “Series“. -// -// >>> s1 = pd.Series(['a', 'b']) -// >>> s2 = pd.Series(['c', 'd']) -// >>> pd.concat([s1, s2]) -// 0 a -// 1 b -// 0 c -// 1 d -// dtype: object -// -// Clear the existing index and reset it in the result -// by setting the “ignore_index“ option to “True“. -// -// >>> pd.concat([s1, s2], ignore_index=True) -// 0 a -// 1 b -// 2 c -// 3 d -// dtype: object -// -// Add a hierarchical index at the outermost level of -// the data with the “keys“ option. -// -// >>> pd.concat([s1, s2], keys=['s1', 's2']) -// s1 0 a -// -// 1 b -// -// s2 0 c -// -// 1 d -// -// dtype: object -// -// Label the index keys you create with the “names“ option. -// -// >>> pd.concat([s1, s2], keys=['s1', 's2'], -// ... names=['Series name', 'Row ID']) -// Series name Row ID -// s1 0 a -// -// 1 b -// -// s2 0 c -// -// 1 d -// -// dtype: object -// -// Combine two “DataFrame“ objects with identical columns. -// -// >>> df1 = pd.DataFrame([['a', 1], ['b', 2]], -// ... columns=['letter', 'number']) -// >>> df1 -// -// letter number -// -// 0 a 1 -// 1 b 2 -// >>> df2 = pd.DataFrame([['c', 3], ['d', 4]], -// ... columns=['letter', 'number']) -// >>> df2 -// -// letter number -// -// 0 c 3 -// 1 d 4 -// >>> pd.concat([df1, df2]) -// -// letter number -// -// 0 a 1 -// 1 b 2 -// 0 c 3 -// 1 d 4 -// -// Combine “DataFrame“ objects with overlapping columns -// and return everything. Columns outside the intersection will -// be filled with “NaN“ values. -// -// >>> df3 = pd.DataFrame([['c', 3, 'cat'], ['d', 4, 'dog']], -// ... columns=['letter', 'number', 'animal']) -// >>> df3 -// -// letter number animal -// -// 0 c 3 cat -// 1 d 4 dog -// >>> pd.concat([df1, df3], sort=False) -// -// letter number animal -// -// 0 a 1 NaN -// 1 b 2 NaN -// 0 c 3 cat -// 1 d 4 dog -// -// Combine “DataFrame“ objects with overlapping columns -// and return only those that are shared by passing “inner“ to -// the “join“ keyword argument. -// -// >>> pd.concat([df1, df3], join="inner") -// -// letter number -// -// 0 a 1 -// 1 b 2 -// 0 c 3 -// 1 d 4 -// -// Combine “DataFrame“ objects horizontally along the x axis by -// passing in “axis=1“. -// -// >>> df4 = pd.DataFrame([['bird', 'polly'], ['monkey', 'george']], -// ... columns=['animal', 'name']) -// >>> pd.concat([df1, df4], axis=1) -// -// letter number animal name -// -// 0 a 1 bird polly -// 1 b 2 monkey george -// -// Prevent the result from including duplicate index values with the -// “verify_integrity“ option. -// -// >>> df5 = pd.DataFrame([1], index=['a']) -// >>> df5 -// -// 0 -// -// a 1 -// >>> df6 = pd.DataFrame([2], index=['a']) -// >>> df6 -// -// 0 -// -// a 2 -// >>> pd.concat([df5, df6], verify_integrity=True) -// Traceback (most recent call last): -// -// ... -// -// ValueError: Indexes have overlapping values: ['a'] -// -// Append a single row to the end of a “DataFrame“ object. -// -// >>> df7 = pd.DataFrame({'a': 1, 'b': 2}, index=[0]) -// >>> df7 -// -// a b -// -// 0 1 2 -// >>> new_row = pd.Series({'a': 3, 'b': 4}) -// >>> new_row -// a 3 -// b 4 -// dtype: int64 -// >>> pd.concat([df7, new_row.to_frame().T], ignore_index=True) -// -// a b -// -// 0 1 2 -// 1 3 4 -// -//go:linkname Concat py.concat -func Concat(objs *py.Object) *py.Object - -// Reshape wide-format data to long. Generalized inverse of DataFrame.pivot. -// -// Accepts a dictionary, “groups“, in which each key is a new column name -// and each value is a list of old column names that will be "melted" under -// the new column name as part of the reshape. -// -// Parameters -// ---------- -// data : DataFrame -// -// The wide-format DataFrame. -// -// groups : dict -// -// {new_name : list_of_columns}. -// -// dropna : bool, default True -// -// Do not include columns whose entries are all NaN. -// -// Returns -// ------- -// DataFrame -// -// Reshaped DataFrame. -// -// See Also -// -------- -// melt : Unpivot a DataFrame from wide to long format, optionally leaving -// -// identifiers set. -// -// pivot : Create a spreadsheet-style pivot table as a DataFrame. -// DataFrame.pivot : Pivot without aggregation that can handle -// -// non-numeric data. -// -// DataFrame.pivot_table : Generalization of pivot that can handle -// -// duplicate values for one index/column pair. -// -// DataFrame.unstack : Pivot based on the index values instead of a -// -// column. -// -// wide_to_long : Wide panel to long format. Less flexible but more -// -// user-friendly than melt. -// -// Examples -// -------- -// >>> data = pd.DataFrame({'hr1': [514, 573], 'hr2': [545, 526], -// ... 'team': ['Red Sox', 'Yankees'], -// ... 'year1': [2007, 2007], 'year2': [2008, 2008]}) -// >>> data -// -// hr1 hr2 team year1 year2 -// -// 0 514 545 Red Sox 2007 2008 -// 1 573 526 Yankees 2007 2008 -// -// >>> pd.lreshape(data, {'year': ['year1', 'year2'], 'hr': ['hr1', 'hr2']}) -// -// team year hr -// -// 0 Red Sox 2007 514 -// 1 Yankees 2007 573 -// 2 Red Sox 2008 545 -// 3 Yankees 2008 526 -// -//go:linkname Lreshape py.lreshape -func Lreshape(data *py.Object, groups *py.Object, dropna *py.Object) *py.Object - -// Unpivot a DataFrame from wide to long format, optionally leaving identifiers set. -// -// This function is useful to massage a DataFrame into a format where one -// or more columns are identifier variables (`id_vars`), while all other -// columns, considered measured variables (`value_vars`), are "unpivoted" to -// the row axis, leaving just two non-identifier columns, 'variable' and -// 'value'. -// -// Parameters -// ---------- -// id_vars : scalar, tuple, list, or ndarray, optional -// -// Column(s) to use as identifier variables. -// -// value_vars : scalar, tuple, list, or ndarray, optional -// -// Column(s) to unpivot. If not specified, uses all columns that -// are not set as `id_vars`. -// -// var_name : scalar, default None -// -// Name to use for the 'variable' column. If None it uses -// ``frame.columns.name`` or 'variable'. -// -// value_name : scalar, default 'value' -// -// Name to use for the 'value' column, can't be an existing column label. -// -// col_level : scalar, optional -// -// If columns are a MultiIndex then use this level to melt. -// -// ignore_index : bool, default True -// -// If True, original index is ignored. If False, the original index is retained. -// Index labels will be repeated as necessary. -// -// Returns -// ------- -// DataFrame -// -// Unpivoted DataFrame. -// -// See Also -// -------- -// DataFrame.melt : Identical method. -// pivot_table : Create a spreadsheet-style pivot table as a DataFrame. -// DataFrame.pivot : Return reshaped DataFrame organized -// -// by given index / column values. -// -// DataFrame.explode : Explode a DataFrame from list-like -// -// columns to long format. -// -// Notes -// ----- -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// >>> df = pd.DataFrame({'A': {0: 'a', 1: 'b', 2: 'c'}, -// ... 'B': {0: 1, 1: 3, 2: 5}, -// ... 'C': {0: 2, 1: 4, 2: 6}}) -// >>> df -// -// A B C -// -// 0 a 1 2 -// 1 b 3 4 -// 2 c 5 6 -// -// >>> pd.melt(df, id_vars=['A'], value_vars=['B']) -// -// A variable value -// -// 0 a B 1 -// 1 b B 3 -// 2 c B 5 -// -// >>> pd.melt(df, id_vars=['A'], value_vars=['B', 'C']) -// -// A variable value -// -// 0 a B 1 -// 1 b B 3 -// 2 c B 5 -// 3 a C 2 -// 4 b C 4 -// 5 c C 6 -// -// The names of 'variable' and 'value' columns can be customized: -// -// >>> pd.melt(df, id_vars=['A'], value_vars=['B'], -// ... var_name='myVarname', value_name='myValname') -// -// A myVarname myValname -// -// 0 a B 1 -// 1 b B 3 -// 2 c B 5 -// -// Original index values can be kept around: -// -// >>> pd.melt(df, id_vars=['A'], value_vars=['B', 'C'], ignore_index=False) -// -// A variable value -// -// 0 a B 1 -// 1 b B 3 -// 2 c B 5 -// 0 a C 2 -// 1 b C 4 -// 2 c C 6 -// -// If you have multi-index columns: -// -// >>> df.columns = [list('ABC'), list('DEF')] -// >>> df -// -// A B C -// D E F -// -// 0 a 1 2 -// 1 b 3 4 -// 2 c 5 6 -// -// >>> pd.melt(df, col_level=0, id_vars=['A'], value_vars=['B']) -// -// A variable value -// -// 0 a B 1 -// 1 b B 3 -// 2 c B 5 -// -// >>> pd.melt(df, id_vars=[('A', 'D')], value_vars=[('B', 'E')]) -// -// (A, D) variable_0 variable_1 value -// -// 0 a B E 1 -// 1 b B E 3 -// 2 c B E 5 -// -//go:linkname Melt py.melt -func Melt(frame *py.Object, idVars *py.Object, valueVars *py.Object, varName *py.Object, valueName *py.Object, colLevel *py.Object, ignoreIndex *py.Object) *py.Object - -// Unpivot a DataFrame from wide to long format. -// -// Less flexible but more user-friendly than melt. -// -// With stubnames ['A', 'B'], this function expects to find one or more -// group of columns with format -// A-suffix1, A-suffix2,..., B-suffix1, B-suffix2,... -// You specify what you want to call this suffix in the resulting long format -// with `j` (for example `j='year'`) -// -// Each row of these wide variables are assumed to be uniquely identified by -// `i` (can be a single column name or a list of column names) -// -// All remaining variables in the data frame are left intact. -// -// Parameters -// ---------- -// df : DataFrame -// -// The wide-format DataFrame. -// -// stubnames : str or list-like -// -// The stub name(s). The wide format variables are assumed to -// start with the stub names. -// -// i : str or list-like -// -// Column(s) to use as id variable(s). -// -// j : str -// -// The name of the sub-observation variable. What you wish to name your -// suffix in the long format. -// -// sep : str, default "" -// -// A character indicating the separation of the variable names -// in the wide format, to be stripped from the names in the long format. -// For example, if your column names are A-suffix1, A-suffix2, you -// can strip the hyphen by specifying `sep='-'`. -// -// suffix : str, default '\\d+' -// -// A regular expression capturing the wanted suffixes. '\\d+' captures -// numeric suffixes. Suffixes with no numbers could be specified with the -// negated character class '\\D+'. You can also further disambiguate -// suffixes, for example, if your wide variables are of the form A-one, -// B-two,.., and you have an unrelated column A-rating, you can ignore the -// last one by specifying `suffix='(!?one|two)'`. When all suffixes are -// numeric, they are cast to int64/float64. -// -// Returns -// ------- -// DataFrame -// -// A DataFrame that contains each stub name as a variable, with new index -// (i, j). -// -// See Also -// -------- -// melt : Unpivot a DataFrame from wide to long format, optionally leaving -// -// identifiers set. -// -// pivot : Create a spreadsheet-style pivot table as a DataFrame. -// DataFrame.pivot : Pivot without aggregation that can handle -// -// non-numeric data. -// -// DataFrame.pivot_table : Generalization of pivot that can handle -// -// duplicate values for one index/column pair. -// -// DataFrame.unstack : Pivot based on the index values instead of a -// -// column. -// -// Notes -// ----- -// All extra variables are left untouched. This simply uses -// `pandas.melt` under the hood, but is hard-coded to "do the right thing" -// in a typical case. -// -// Examples -// -------- -// >>> np.random.seed(123) -// >>> df = pd.DataFrame({"A1970" : {0 : "a", 1 : "b", 2 : "c"}, -// ... "A1980" : {0 : "d", 1 : "e", 2 : "f"}, -// ... "B1970" : {0 : 2.5, 1 : 1.2, 2 : .7}, -// ... "B1980" : {0 : 3.2, 1 : 1.3, 2 : .1}, -// ... "X" : dict(zip(range(3), np.random.randn(3))) -// ... }) -// >>> df["id"] = df.index -// >>> df -// -// A1970 A1980 B1970 B1980 X id -// -// 0 a d 2.5 3.2 -1.085631 0 -// 1 b e 1.2 1.3 0.997345 1 -// 2 c f 0.7 0.1 0.282978 2 -// >>> pd.wide_to_long(df, ["A", "B"], i="id", j="year") -// ... # doctest: +NORMALIZE_WHITESPACE -// -// X A B -// -// id year -// 0 1970 -1.085631 a 2.5 -// 1 1970 0.997345 b 1.2 -// 2 1970 0.282978 c 0.7 -// 0 1980 -1.085631 d 3.2 -// 1 1980 0.997345 e 1.3 -// 2 1980 0.282978 f 0.1 -// -// # With multiple id columns -// -// >>> df = pd.DataFrame({ -// ... 'famid': [1, 1, 1, 2, 2, 2, 3, 3, 3], -// ... 'birth': [1, 2, 3, 1, 2, 3, 1, 2, 3], -// ... 'ht1': [2.8, 2.9, 2.2, 2, 1.8, 1.9, 2.2, 2.3, 2.1], -// ... 'ht2': [3.4, 3.8, 2.9, 3.2, 2.8, 2.4, 3.3, 3.4, 2.9] -// ... }) -// >>> df -// -// famid birth ht1 ht2 -// -// 0 1 1 2.8 3.4 -// 1 1 2 2.9 3.8 -// 2 1 3 2.2 2.9 -// 3 2 1 2.0 3.2 -// 4 2 2 1.8 2.8 -// 5 2 3 1.9 2.4 -// 6 3 1 2.2 3.3 -// 7 3 2 2.3 3.4 -// 8 3 3 2.1 2.9 -// >>> l = pd.wide_to_long(df, stubnames='ht', i=['famid', 'birth'], j='age') -// >>> l -// ... # doctest: +NORMALIZE_WHITESPACE -// -// ht -// -// famid birth age -// 1 1 1 2.8 -// -// 2 3.4 -// 2 1 2.9 -// 2 3.8 -// 3 1 2.2 -// 2 2.9 -// -// 2 1 1 2.0 -// -// 2 3.2 -// 2 1 1.8 -// 2 2.8 -// 3 1 1.9 -// 2 2.4 -// -// 3 1 1 2.2 -// -// 2 3.3 -// 2 1 2.3 -// 2 3.4 -// 3 1 2.1 -// 2 2.9 -// -// Going from long back to wide just takes some creative use of `unstack` -// -// >>> w = l.unstack() -// >>> w.columns = w.columns.map('{0[0]}{0[1]}'.format) -// >>> w.reset_index() -// -// famid birth ht1 ht2 -// -// 0 1 1 2.8 3.4 -// 1 1 2 2.9 3.8 -// 2 1 3 2.2 2.9 -// 3 2 1 2.0 3.2 -// 4 2 2 1.8 2.8 -// 5 2 3 1.9 2.4 -// 6 3 1 2.2 3.3 -// 7 3 2 2.3 3.4 -// 8 3 3 2.1 2.9 -// -// # Less wieldy column names are also handled -// -// >>> np.random.seed(0) -// >>> df = pd.DataFrame({'A(weekly)-2010': np.random.rand(3), -// ... 'A(weekly)-2011': np.random.rand(3), -// ... 'B(weekly)-2010': np.random.rand(3), -// ... 'B(weekly)-2011': np.random.rand(3), -// ... 'X' : np.random.randint(3, size=3)}) -// >>> df['id'] = df.index -// >>> df # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS -// -// A(weekly)-2010 A(weekly)-2011 B(weekly)-2010 B(weekly)-2011 X id -// -// 0 0.548814 0.544883 0.437587 0.383442 0 0 -// 1 0.715189 0.423655 0.891773 0.791725 1 1 -// 2 0.602763 0.645894 0.963663 0.528895 1 2 -// -// >>> pd.wide_to_long(df, ['A(weekly)', 'B(weekly)'], i='id', -// ... j='year', sep='-') -// ... # doctest: +NORMALIZE_WHITESPACE -// -// X A(weekly) B(weekly) -// -// id year -// 0 2010 0 0.548814 0.437587 -// 1 2010 1 0.715189 0.891773 -// 2 2010 1 0.602763 0.963663 -// 0 2011 0 0.544883 0.383442 -// 1 2011 1 0.423655 0.791725 -// 2 2011 1 0.645894 0.528895 -// -// If we have many columns, we could also use a regex to find our -// stubnames and pass that list on to wide_to_long -// -// >>> stubnames = sorted( -// ... set([match[0] for match in df.columns.str.findall( -// ... r'[A-B]\(.*\)').values if match != []]) -// ... ) -// >>> list(stubnames) -// ['A(weekly)', 'B(weekly)'] -// -// All of the above examples have integers as suffixes. It is possible to -// have non-integers as suffixes. -// -// >>> df = pd.DataFrame({ -// ... 'famid': [1, 1, 1, 2, 2, 2, 3, 3, 3], -// ... 'birth': [1, 2, 3, 1, 2, 3, 1, 2, 3], -// ... 'ht_one': [2.8, 2.9, 2.2, 2, 1.8, 1.9, 2.2, 2.3, 2.1], -// ... 'ht_two': [3.4, 3.8, 2.9, 3.2, 2.8, 2.4, 3.3, 3.4, 2.9] -// ... }) -// >>> df -// -// famid birth ht_one ht_two -// -// 0 1 1 2.8 3.4 -// 1 1 2 2.9 3.8 -// 2 1 3 2.2 2.9 -// 3 2 1 2.0 3.2 -// 4 2 2 1.8 2.8 -// 5 2 3 1.9 2.4 -// 6 3 1 2.2 3.3 -// 7 3 2 2.3 3.4 -// 8 3 3 2.1 2.9 -// -// >>> l = pd.wide_to_long(df, stubnames='ht', i=['famid', 'birth'], j='age', -// ... sep='_', suffix=r'\w+') -// >>> l -// ... # doctest: +NORMALIZE_WHITESPACE -// -// ht -// -// famid birth age -// 1 1 one 2.8 -// -// two 3.4 -// 2 one 2.9 -// two 3.8 -// 3 one 2.2 -// two 2.9 -// -// 2 1 one 2.0 -// -// two 3.2 -// 2 one 1.8 -// two 2.8 -// 3 one 1.9 -// two 2.4 -// -// 3 1 one 2.2 -// -// two 3.3 -// 2 one 2.3 -// two 3.4 -// 3 one 2.1 -// two 2.9 -// -//go:linkname WideToLong py.wide_to_long -func WideToLong(df *py.Object, stubnames *py.Object, i *py.Object, j *py.Object, sep *py.Object, suffix *py.Object) *py.Object - -// Merge DataFrame or named Series objects with a database-style join. -// -// A named Series object is treated as a DataFrame with a single named column. -// -// The join is done on columns or indexes. If joining columns on -// columns, the DataFrame indexes *will be ignored*. Otherwise if joining indexes -// on indexes or indexes on a column or columns, the index will be passed on. -// When performing a cross merge, no column specifications to merge on are -// allowed. -// -// .. warning:: -// -// If both key columns contain rows where the key is a null value, those -// rows will be matched against each other. This is different from usual SQL -// join behaviour and can lead to unexpected results. -// -// Parameters -// ---------- -// left : DataFrame or named Series -// right : DataFrame or named Series -// -// Object to merge with. -// -// how : {'left', 'right', 'outer', 'inner', 'cross'}, default 'inner' -// -// Type of merge to be performed. -// -// * left: use only keys from left frame, similar to a SQL left outer join; -// preserve key order. -// * right: use only keys from right frame, similar to a SQL right outer join; -// preserve key order. -// * outer: use union of keys from both frames, similar to a SQL full outer -// join; sort keys lexicographically. -// * inner: use intersection of keys from both frames, similar to a SQL inner -// join; preserve the order of the left keys. -// * cross: creates the cartesian product from both frames, preserves the order -// of the left keys. -// -// on : label or list -// -// Column or index level names to join on. These must be found in both -// DataFrames. If `on` is None and not merging on indexes then this defaults -// to the intersection of the columns in both DataFrames. -// -// left_on : label or list, or array-like -// -// Column or index level names to join on in the left DataFrame. Can also -// be an array or list of arrays of the length of the left DataFrame. -// These arrays are treated as if they are columns. -// -// right_on : label or list, or array-like -// -// Column or index level names to join on in the right DataFrame. Can also -// be an array or list of arrays of the length of the right DataFrame. -// These arrays are treated as if they are columns. -// -// left_index : bool, default False -// -// Use the index from the left DataFrame as the join key(s). If it is a -// MultiIndex, the number of keys in the other DataFrame (either the index -// or a number of columns) must match the number of levels. -// -// right_index : bool, default False -// -// Use the index from the right DataFrame as the join key. Same caveats as -// left_index. -// -// sort : bool, default False -// -// Sort the join keys lexicographically in the result DataFrame. If False, -// the order of the join keys depends on the join type (how keyword). -// -// suffixes : list-like, default is ("_x", "_y") -// -// A length-2 sequence where each element is optionally a string -// indicating the suffix to add to overlapping column names in -// `left` and `right` respectively. Pass a value of `None` instead -// of a string to indicate that the column name from `left` or -// `right` should be left as-is, with no suffix. At least one of the -// values must not be None. -// -// copy : bool, default True -// -// If False, avoid copy if possible. -// -// .. note:: -// The `copy` keyword will change behavior in pandas 3.0. -// `Copy-on-Write -// `__ -// will be enabled by default, which means that all methods with a -// `copy` keyword will use a lazy copy mechanism to defer the copy and -// ignore the `copy` keyword. The `copy` keyword will be removed in a -// future version of pandas. -// -// You can already get the future behavior and improvements through -// enabling copy on write ``pd.options.mode.copy_on_write = True`` -// -// indicator : bool or str, default False -// -// If True, adds a column to the output DataFrame called "_merge" with -// information on the source of each row. The column can be given a different -// name by providing a string argument. The column will have a Categorical -// type with the value of "left_only" for observations whose merge key only -// appears in the left DataFrame, "right_only" for observations -// whose merge key only appears in the right DataFrame, and "both" -// if the observation's merge key is found in both DataFrames. -// -// validate : str, optional -// -// If specified, checks if merge is of specified type. -// -// * "one_to_one" or "1:1": check if merge keys are unique in both -// left and right datasets. -// * "one_to_many" or "1:m": check if merge keys are unique in left -// dataset. -// * "many_to_one" or "m:1": check if merge keys are unique in right -// dataset. -// * "many_to_many" or "m:m": allowed, but does not result in checks. -// -// Returns -// ------- -// DataFrame -// -// A DataFrame of the two merged objects. -// -// See Also -// -------- -// merge_ordered : Merge with optional filling/interpolation. -// merge_asof : Merge on nearest keys. -// DataFrame.join : Similar method using indices. -// -// Examples -// -------- -// >>> df1 = pd.DataFrame({'lkey': ['foo', 'bar', 'baz', 'foo'], -// ... 'value': [1, 2, 3, 5]}) -// >>> df2 = pd.DataFrame({'rkey': ['foo', 'bar', 'baz', 'foo'], -// ... 'value': [5, 6, 7, 8]}) -// >>> df1 -// -// lkey value -// -// 0 foo 1 -// 1 bar 2 -// 2 baz 3 -// 3 foo 5 -// >>> df2 -// -// rkey value -// -// 0 foo 5 -// 1 bar 6 -// 2 baz 7 -// 3 foo 8 -// -// Merge df1 and df2 on the lkey and rkey columns. The value columns have -// the default suffixes, _x and _y, appended. -// -// >>> df1.merge(df2, left_on='lkey', right_on='rkey') -// -// lkey value_x rkey value_y -// -// 0 foo 1 foo 5 -// 1 foo 1 foo 8 -// 2 bar 2 bar 6 -// 3 baz 3 baz 7 -// 4 foo 5 foo 5 -// 5 foo 5 foo 8 -// -// Merge DataFrames df1 and df2 with specified left and right suffixes -// appended to any overlapping columns. -// -// >>> df1.merge(df2, left_on='lkey', right_on='rkey', -// ... suffixes=('_left', '_right')) -// -// lkey value_left rkey value_right -// -// 0 foo 1 foo 5 -// 1 foo 1 foo 8 -// 2 bar 2 bar 6 -// 3 baz 3 baz 7 -// 4 foo 5 foo 5 -// 5 foo 5 foo 8 -// -// Merge DataFrames df1 and df2, but raise an exception if the DataFrames have -// any overlapping columns. -// -// >>> df1.merge(df2, left_on='lkey', right_on='rkey', suffixes=(False, False)) -// Traceback (most recent call last): -// ... -// ValueError: columns overlap but no suffix specified: -// -// Index(['value'], dtype='object') -// -// >>> df1 = pd.DataFrame({'a': ['foo', 'bar'], 'b': [1, 2]}) -// >>> df2 = pd.DataFrame({'a': ['foo', 'baz'], 'c': [3, 4]}) -// >>> df1 -// -// a b -// -// 0 foo 1 -// 1 bar 2 -// >>> df2 -// -// a c -// -// 0 foo 3 -// 1 baz 4 -// -// >>> df1.merge(df2, how='inner', on='a') -// -// a b c -// -// 0 foo 1 3 -// -// >>> df1.merge(df2, how='left', on='a') -// -// a b c -// -// 0 foo 1 3.0 -// 1 bar 2 NaN -// -// >>> df1 = pd.DataFrame({'left': ['foo', 'bar']}) -// >>> df2 = pd.DataFrame({'right': [7, 8]}) -// >>> df1 -// -// left -// -// 0 foo -// 1 bar -// >>> df2 -// -// right -// -// 0 7 -// 1 8 -// -// >>> df1.merge(df2, how='cross') -// -// left right -// -// 0 foo 7 -// 1 foo 8 -// 2 bar 7 -// 3 bar 8 -// -//go:linkname Merge py.merge -func Merge(left *py.Object, right *py.Object, how *py.Object, on *py.Object, leftOn *py.Object, rightOn *py.Object, leftIndex *py.Object, rightIndex *py.Object, sort *py.Object, suffixes *py.Object, copy *py.Object, indicator *py.Object, validate *py.Object) *py.Object - -// Perform a merge by key distance. -// -// This is similar to a left-join except that we match on nearest -// key rather than equal keys. Both DataFrames must be sorted by the key. -// -// For each row in the left DataFrame: -// -// - A "backward" search selects the last row in the right DataFrame whose -// 'on' key is less than or equal to the left's key. -// -// - A "forward" search selects the first row in the right DataFrame whose -// 'on' key is greater than or equal to the left's key. -// -// - A "nearest" search selects the row in the right DataFrame whose 'on' -// key is closest in absolute distance to the left's key. -// -// Optionally match on equivalent keys with 'by' before searching with 'on'. -// -// Parameters -// ---------- -// left : DataFrame or named Series -// right : DataFrame or named Series -// on : label -// -// Field name to join on. Must be found in both DataFrames. -// The data MUST be ordered. Furthermore this must be a numeric column, -// such as datetimelike, integer, or float. On or left_on/right_on -// must be given. -// -// left_on : label -// -// Field name to join on in left DataFrame. -// -// right_on : label -// -// Field name to join on in right DataFrame. -// -// left_index : bool -// -// Use the index of the left DataFrame as the join key. -// -// right_index : bool -// -// Use the index of the right DataFrame as the join key. -// -// by : column name or list of column names -// -// Match on these columns before performing merge operation. -// -// left_by : column name -// -// Field names to match on in the left DataFrame. -// -// right_by : column name -// -// Field names to match on in the right DataFrame. -// -// suffixes : 2-length sequence (tuple, list, ...) -// -// Suffix to apply to overlapping column names in the left and right -// side, respectively. -// -// tolerance : int or Timedelta, optional, default None -// -// Select asof tolerance within this range; must be compatible -// with the merge index. -// -// allow_exact_matches : bool, default True -// -// - If True, allow matching with the same 'on' value -// (i.e. less-than-or-equal-to / greater-than-or-equal-to) -// - If False, don't match the same 'on' value -// (i.e., strictly less-than / strictly greater-than). -// -// direction : 'backward' (default), 'forward', or 'nearest' -// -// Whether to search for prior, subsequent, or closest matches. -// -// Returns -// ------- -// DataFrame -// -// See Also -// -------- -// merge : Merge with a database-style join. -// merge_ordered : Merge with optional filling/interpolation. -// -// Examples -// -------- -// >>> left = pd.DataFrame({"a": [1, 5, 10], "left_val": ["a", "b", "c"]}) -// >>> left -// -// a left_val -// -// 0 1 a -// 1 5 b -// 2 10 c -// -// >>> right = pd.DataFrame({"a": [1, 2, 3, 6, 7], "right_val": [1, 2, 3, 6, 7]}) -// >>> right -// -// a right_val -// -// 0 1 1 -// 1 2 2 -// 2 3 3 -// 3 6 6 -// 4 7 7 -// -// >>> pd.merge_asof(left, right, on="a") -// -// a left_val right_val -// -// 0 1 a 1 -// 1 5 b 3 -// 2 10 c 7 -// -// >>> pd.merge_asof(left, right, on="a", allow_exact_matches=False) -// -// a left_val right_val -// -// 0 1 a NaN -// 1 5 b 3.0 -// 2 10 c 7.0 -// -// >>> pd.merge_asof(left, right, on="a", direction="forward") -// -// a left_val right_val -// -// 0 1 a 1.0 -// 1 5 b 6.0 -// 2 10 c NaN -// -// >>> pd.merge_asof(left, right, on="a", direction="nearest") -// -// a left_val right_val -// -// 0 1 a 1 -// 1 5 b 6 -// 2 10 c 7 -// -// We can use indexed DataFrames as well. -// -// >>> left = pd.DataFrame({"left_val": ["a", "b", "c"]}, index=[1, 5, 10]) -// >>> left -// -// left_val -// -// 1 a -// 5 b -// 10 c -// -// >>> right = pd.DataFrame({"right_val": [1, 2, 3, 6, 7]}, index=[1, 2, 3, 6, 7]) -// >>> right -// -// right_val -// -// 1 1 -// 2 2 -// 3 3 -// 6 6 -// 7 7 -// -// >>> pd.merge_asof(left, right, left_index=True, right_index=True) -// -// left_val right_val -// -// 1 a 1 -// 5 b 3 -// 10 c 7 -// -// # Here is a real-world times-series example -// -// >>> quotes = pd.DataFrame( -// ... { -// ... "time": [ -// ... pd.Timestamp("2016-05-25 13:30:00.023"), -// ... pd.Timestamp("2016-05-25 13:30:00.023"), -// ... pd.Timestamp("2016-05-25 13:30:00.030"), -// ... pd.Timestamp("2016-05-25 13:30:00.041"), -// ... pd.Timestamp("2016-05-25 13:30:00.048"), -// ... pd.Timestamp("2016-05-25 13:30:00.049"), -// ... pd.Timestamp("2016-05-25 13:30:00.072"), -// ... pd.Timestamp("2016-05-25 13:30:00.075") -// ... ], -// ... "ticker": [ -// ... "GOOG", -// ... "MSFT", -// ... "MSFT", -// ... "MSFT", -// ... "GOOG", -// ... "AAPL", -// ... "GOOG", -// ... "MSFT" -// ... ], -// ... "bid": [720.50, 51.95, 51.97, 51.99, 720.50, 97.99, 720.50, 52.01], -// ... "ask": [720.93, 51.96, 51.98, 52.00, 720.93, 98.01, 720.88, 52.03] -// ... } -// ... ) -// >>> quotes -// -// time ticker bid ask -// -// 0 2016-05-25 13:30:00.023 GOOG 720.50 720.93 -// 1 2016-05-25 13:30:00.023 MSFT 51.95 51.96 -// 2 2016-05-25 13:30:00.030 MSFT 51.97 51.98 -// 3 2016-05-25 13:30:00.041 MSFT 51.99 52.00 -// 4 2016-05-25 13:30:00.048 GOOG 720.50 720.93 -// 5 2016-05-25 13:30:00.049 AAPL 97.99 98.01 -// 6 2016-05-25 13:30:00.072 GOOG 720.50 720.88 -// 7 2016-05-25 13:30:00.075 MSFT 52.01 52.03 -// -// >>> trades = pd.DataFrame( -// ... { -// ... "time": [ -// ... pd.Timestamp("2016-05-25 13:30:00.023"), -// ... pd.Timestamp("2016-05-25 13:30:00.038"), -// ... pd.Timestamp("2016-05-25 13:30:00.048"), -// ... pd.Timestamp("2016-05-25 13:30:00.048"), -// ... pd.Timestamp("2016-05-25 13:30:00.048") -// ... ], -// ... "ticker": ["MSFT", "MSFT", "GOOG", "GOOG", "AAPL"], -// ... "price": [51.95, 51.95, 720.77, 720.92, 98.0], -// ... "quantity": [75, 155, 100, 100, 100] -// ... } -// ... ) -// >>> trades -// -// time ticker price quantity -// -// 0 2016-05-25 13:30:00.023 MSFT 51.95 75 -// 1 2016-05-25 13:30:00.038 MSFT 51.95 155 -// 2 2016-05-25 13:30:00.048 GOOG 720.77 100 -// 3 2016-05-25 13:30:00.048 GOOG 720.92 100 -// 4 2016-05-25 13:30:00.048 AAPL 98.00 100 -// -// # By default we are taking the asof of the quotes -// -// >>> pd.merge_asof(trades, quotes, on="time", by="ticker") -// -// time ticker price quantity bid ask -// -// 0 2016-05-25 13:30:00.023 MSFT 51.95 75 51.95 51.96 -// 1 2016-05-25 13:30:00.038 MSFT 51.95 155 51.97 51.98 -// 2 2016-05-25 13:30:00.048 GOOG 720.77 100 720.50 720.93 -// 3 2016-05-25 13:30:00.048 GOOG 720.92 100 720.50 720.93 -// 4 2016-05-25 13:30:00.048 AAPL 98.00 100 NaN NaN -// -// # We only asof within 2ms between the quote time and the trade time -// -// >>> pd.merge_asof( -// ... trades, quotes, on="time", by="ticker", tolerance=pd.Timedelta("2ms") -// ... ) -// -// time ticker price quantity bid ask -// -// 0 2016-05-25 13:30:00.023 MSFT 51.95 75 51.95 51.96 -// 1 2016-05-25 13:30:00.038 MSFT 51.95 155 NaN NaN -// 2 2016-05-25 13:30:00.048 GOOG 720.77 100 720.50 720.93 -// 3 2016-05-25 13:30:00.048 GOOG 720.92 100 720.50 720.93 -// 4 2016-05-25 13:30:00.048 AAPL 98.00 100 NaN NaN -// -// We only asof within 10ms between the quote time and the trade time -// and we exclude exact matches on time. However *prior* data will -// propagate forward -// -// >>> pd.merge_asof( -// ... trades, -// ... quotes, -// ... on="time", -// ... by="ticker", -// ... tolerance=pd.Timedelta("10ms"), -// ... allow_exact_matches=False -// ... ) -// -// time ticker price quantity bid ask -// -// 0 2016-05-25 13:30:00.023 MSFT 51.95 75 NaN NaN -// 1 2016-05-25 13:30:00.038 MSFT 51.95 155 51.97 51.98 -// 2 2016-05-25 13:30:00.048 GOOG 720.77 100 NaN NaN -// 3 2016-05-25 13:30:00.048 GOOG 720.92 100 NaN NaN -// 4 2016-05-25 13:30:00.048 AAPL 98.00 100 NaN NaN -// -//go:linkname MergeAsof py.merge_asof -func MergeAsof(left *py.Object, right *py.Object, on *py.Object, leftOn *py.Object, rightOn *py.Object, leftIndex *py.Object, rightIndex *py.Object, by *py.Object, leftBy *py.Object, rightBy *py.Object, suffixes *py.Object, tolerance *py.Object, allowExactMatches *py.Object, direction *py.Object) *py.Object - -// Perform a merge for ordered data with optional filling/interpolation. -// -// Designed for ordered data like time series data. Optionally -// perform group-wise merge (see examples). -// -// Parameters -// ---------- -// left : DataFrame or named Series -// right : DataFrame or named Series -// on : label or list -// -// Field names to join on. Must be found in both DataFrames. -// -// left_on : label or list, or array-like -// -// Field names to join on in left DataFrame. Can be a vector or list of -// vectors of the length of the DataFrame to use a particular vector as -// the join key instead of columns. -// -// right_on : label or list, or array-like -// -// Field names to join on in right DataFrame or vector/list of vectors per -// left_on docs. -// -// left_by : column name or list of column names -// -// Group left DataFrame by group columns and merge piece by piece with -// right DataFrame. Must be None if either left or right are a Series. -// -// right_by : column name or list of column names -// -// Group right DataFrame by group columns and merge piece by piece with -// left DataFrame. Must be None if either left or right are a Series. -// -// fill_method : {'ffill', None}, default None -// -// Interpolation method for data. -// -// suffixes : list-like, default is ("_x", "_y") -// -// A length-2 sequence where each element is optionally a string -// indicating the suffix to add to overlapping column names in -// `left` and `right` respectively. Pass a value of `None` instead -// of a string to indicate that the column name from `left` or -// `right` should be left as-is, with no suffix. At least one of the -// values must not be None. -// -// how : {'left', 'right', 'outer', 'inner'}, default 'outer' -// - left: use only keys from left frame (SQL: left outer join) -// - right: use only keys from right frame (SQL: right outer join) -// - outer: use union of keys from both frames (SQL: full outer join) -// - inner: use intersection of keys from both frames (SQL: inner join). -// -// Returns -// ------- -// DataFrame -// -// The merged DataFrame output type will be the same as -// 'left', if it is a subclass of DataFrame. -// -// See Also -// -------- -// merge : Merge with a database-style join. -// merge_asof : Merge on nearest keys. -// -// Examples -// -------- -// >>> from pandas import merge_ordered -// >>> df1 = pd.DataFrame( -// ... { -// ... "key": ["a", "c", "e", "a", "c", "e"], -// ... "lvalue": [1, 2, 3, 1, 2, 3], -// ... "group": ["a", "a", "a", "b", "b", "b"] -// ... } -// ... ) -// >>> df1 -// -// key lvalue group -// -// 0 a 1 a -// 1 c 2 a -// 2 e 3 a -// 3 a 1 b -// 4 c 2 b -// 5 e 3 b -// -// >>> df2 = pd.DataFrame({"key": ["b", "c", "d"], "rvalue": [1, 2, 3]}) -// >>> df2 -// -// key rvalue -// -// 0 b 1 -// 1 c 2 -// 2 d 3 -// -// >>> merge_ordered(df1, df2, fill_method="ffill", left_by="group") -// -// key lvalue group rvalue -// -// 0 a 1 a NaN -// 1 b 1 a 1.0 -// 2 c 2 a 2.0 -// 3 d 2 a 3.0 -// 4 e 3 a 3.0 -// 5 a 1 b NaN -// 6 b 1 b 1.0 -// 7 c 2 b 2.0 -// 8 d 2 b 3.0 -// 9 e 3 b 3.0 -// -//go:linkname MergeOrdered py.merge_ordered -func MergeOrdered(left *py.Object, right *py.Object, on *py.Object, leftOn *py.Object, rightOn *py.Object, leftBy *py.Object, rightBy *py.Object, fillMethod *py.Object, suffixes *py.Object, how *py.Object) *py.Object - -// Compute a simple cross tabulation of two (or more) factors. -// -// By default, computes a frequency table of the factors unless an -// array of values and an aggregation function are passed. -// -// Parameters -// ---------- -// index : array-like, Series, or list of arrays/Series -// -// Values to group by in the rows. -// -// columns : array-like, Series, or list of arrays/Series -// -// Values to group by in the columns. -// -// values : array-like, optional -// -// Array of values to aggregate according to the factors. -// Requires `aggfunc` be specified. -// -// rownames : sequence, default None -// -// If passed, must match number of row arrays passed. -// -// colnames : sequence, default None -// -// If passed, must match number of column arrays passed. -// -// aggfunc : function, optional -// -// If specified, requires `values` be specified as well. -// -// margins : bool, default False -// -// Add row/column margins (subtotals). -// -// margins_name : str, default 'All' -// -// Name of the row/column that will contain the totals -// when margins is True. -// -// dropna : bool, default True -// -// Do not include columns whose entries are all NaN. -// -// normalize : bool, {'all', 'index', 'columns'}, or {0,1}, default False -// -// Normalize by dividing all values by the sum of values. -// -// - If passed 'all' or `True`, will normalize over all values. -// - If passed 'index' will normalize over each row. -// - If passed 'columns' will normalize over each column. -// - If margins is `True`, will also normalize margin values. -// -// Returns -// ------- -// DataFrame -// -// Cross tabulation of the data. -// -// See Also -// -------- -// DataFrame.pivot : Reshape data based on column values. -// pivot_table : Create a pivot table as a DataFrame. -// -// Notes -// ----- -// Any Series passed will have their name attributes used unless row or column -// names for the cross-tabulation are specified. -// -// Any input passed containing Categorical data will have **all** of its -// categories included in the cross-tabulation, even if the actual data does -// not contain any instances of a particular category. -// -// In the event that there aren't overlapping indexes an empty DataFrame will -// be returned. -// -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// >>> a = np.array(["foo", "foo", "foo", "foo", "bar", "bar", -// ... "bar", "bar", "foo", "foo", "foo"], dtype=object) -// >>> b = np.array(["one", "one", "one", "two", "one", "one", -// ... "one", "two", "two", "two", "one"], dtype=object) -// >>> c = np.array(["dull", "dull", "shiny", "dull", "dull", "shiny", -// ... "shiny", "dull", "shiny", "shiny", "shiny"], -// ... dtype=object) -// >>> pd.crosstab(a, [b, c], rownames=['a'], colnames=['b', 'c']) -// b one two -// c dull shiny dull shiny -// a -// bar 1 2 1 0 -// foo 2 2 1 2 -// -// Here 'c' and 'f' are not represented in the data and will not be -// shown in the output because dropna is True by default. Set -// dropna=False to preserve categories with no data. -// -// >>> foo = pd.Categorical(['a', 'b'], categories=['a', 'b', 'c']) -// >>> bar = pd.Categorical(['d', 'e'], categories=['d', 'e', 'f']) -// >>> pd.crosstab(foo, bar) -// col_0 d e -// row_0 -// a 1 0 -// b 0 1 -// >>> pd.crosstab(foo, bar, dropna=False) -// col_0 d e f -// row_0 -// a 1 0 0 -// b 0 1 0 -// c 0 0 0 -// -//go:linkname Crosstab py.crosstab -func Crosstab(index *py.Object, columns *py.Object, values *py.Object, rownames *py.Object, colnames *py.Object, aggfunc *py.Object, margins *py.Object, marginsName *py.Object, dropna *py.Object, normalize *py.Object) *py.Object - -// Return reshaped DataFrame organized by given index / column values. -// -// Reshape data (produce a "pivot" table) based on column values. Uses -// unique values from specified `index` / `columns` to form axes of the -// resulting DataFrame. This function does not support data -// aggregation, multiple values will result in a MultiIndex in the -// columns. See the :ref:`User Guide ` for more on reshaping. -// -// Parameters -// ---------- -// data : DataFrame -// columns : str or object or a list of str -// -// Column to use to make new frame's columns. -// -// index : str or object or a list of str, optional -// -// Column to use to make new frame's index. If not given, uses existing index. -// -// values : str, object or a list of the previous, optional -// -// Column(s) to use for populating new frame's values. If not -// specified, all remaining columns will be used and the result will -// have hierarchically indexed columns. -// -// Returns -// ------- -// DataFrame -// -// Returns reshaped DataFrame. -// -// Raises -// ------ -// ValueError: -// -// When there are any `index`, `columns` combinations with multiple -// values. `DataFrame.pivot_table` when you need to aggregate. -// -// See Also -// -------- -// DataFrame.pivot_table : Generalization of pivot that can handle -// -// duplicate values for one index/column pair. -// -// DataFrame.unstack : Pivot based on the index values instead of a -// -// column. -// -// wide_to_long : Wide panel to long format. Less flexible but more -// -// user-friendly than melt. -// -// Notes -// ----- -// For finer-tuned control, see hierarchical indexing documentation along -// with the related stack/unstack methods. -// -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// >>> df = pd.DataFrame({'foo': ['one', 'one', 'one', 'two', 'two', -// ... 'two'], -// ... 'bar': ['A', 'B', 'C', 'A', 'B', 'C'], -// ... 'baz': [1, 2, 3, 4, 5, 6], -// ... 'zoo': ['x', 'y', 'z', 'q', 'w', 't']}) -// >>> df -// -// foo bar baz zoo -// -// 0 one A 1 x -// 1 one B 2 y -// 2 one C 3 z -// 3 two A 4 q -// 4 two B 5 w -// 5 two C 6 t -// -// >>> df.pivot(index='foo', columns='bar', values='baz') -// bar A B C -// foo -// one 1 2 3 -// two 4 5 6 -// -// >>> df.pivot(index='foo', columns='bar')['baz'] -// bar A B C -// foo -// one 1 2 3 -// two 4 5 6 -// -// >>> df.pivot(index='foo', columns='bar', values=['baz', 'zoo']) -// -// baz zoo -// -// bar A B C A B C -// foo -// one 1 2 3 x y z -// two 4 5 6 q w t -// -// You could also assign a list of column names or a list of index names. -// -// >>> df = pd.DataFrame({ -// ... "lev1": [1, 1, 1, 2, 2, 2], -// ... "lev2": [1, 1, 2, 1, 1, 2], -// ... "lev3": [1, 2, 1, 2, 1, 2], -// ... "lev4": [1, 2, 3, 4, 5, 6], -// ... "values": [0, 1, 2, 3, 4, 5]}) -// >>> df -// -// lev1 lev2 lev3 lev4 values -// -// 0 1 1 1 1 0 -// 1 1 1 2 2 1 -// 2 1 2 1 3 2 -// 3 2 1 2 4 3 -// 4 2 1 1 5 4 -// 5 2 2 2 6 5 -// -// >>> df.pivot(index="lev1", columns=["lev2", "lev3"], values="values") -// lev2 1 2 -// lev3 1 2 1 2 -// lev1 -// 1 0.0 1.0 2.0 NaN -// 2 4.0 3.0 NaN 5.0 -// -// >>> df.pivot(index=["lev1", "lev2"], columns=["lev3"], values="values") -// -// lev3 1 2 -// -// lev1 lev2 -// -// 1 1 0.0 1.0 -// 2 2.0 NaN -// 2 1 4.0 3.0 -// 2 NaN 5.0 -// -// A ValueError is raised if there are any duplicates. -// -// >>> df = pd.DataFrame({"foo": ['one', 'one', 'two', 'two'], -// ... "bar": ['A', 'A', 'B', 'C'], -// ... "baz": [1, 2, 3, 4]}) -// >>> df -// -// foo bar baz -// -// 0 one A 1 -// 1 one A 2 -// 2 two B 3 -// 3 two C 4 -// -// Notice that the first two rows are the same for our `index` -// and `columns` arguments. -// -// >>> df.pivot(index='foo', columns='bar', values='baz') -// Traceback (most recent call last): -// -// ... -// -// ValueError: Index contains duplicate entries, cannot reshape -// -//go:linkname Pivot py.pivot -func Pivot(data *py.Object) *py.Object - -// Create a spreadsheet-style pivot table as a DataFrame. -// -// The levels in the pivot table will be stored in MultiIndex objects -// (hierarchical indexes) on the index and columns of the result DataFrame. -// -// Parameters -// ---------- -// data : DataFrame -// values : list-like or scalar, optional -// -// Column or columns to aggregate. -// -// index : column, Grouper, array, or list of the previous -// -// Keys to group by on the pivot table index. If a list is passed, -// it can contain any of the other types (except list). If an array is -// passed, it must be the same length as the data and will be used in -// the same manner as column values. -// -// columns : column, Grouper, array, or list of the previous -// -// Keys to group by on the pivot table column. If a list is passed, -// it can contain any of the other types (except list). If an array is -// passed, it must be the same length as the data and will be used in -// the same manner as column values. -// -// aggfunc : function, list of functions, dict, default "mean" -// -// If a list of functions is passed, the resulting pivot table will have -// hierarchical columns whose top level are the function names -// (inferred from the function objects themselves). -// If a dict is passed, the key is column to aggregate and the value is -// function or list of functions. If ``margin=True``, aggfunc will be -// used to calculate the partial aggregates. -// -// fill_value : scalar, default None -// -// Value to replace missing values with (in the resulting pivot table, -// after aggregation). -// -// margins : bool, default False -// -// If ``margins=True``, special ``All`` columns and rows -// will be added with partial group aggregates across the categories -// on the rows and columns. -// -// dropna : bool, default True -// -// Do not include columns whose entries are all NaN. If True, -// rows with a NaN value in any column will be omitted before -// computing margins. -// -// margins_name : str, default 'All' -// -// Name of the row / column that will contain the totals -// when margins is True. -// -// observed : bool, default False -// -// This only applies if any of the groupers are Categoricals. -// If True: only show observed values for categorical groupers. -// If False: show all values for categorical groupers. -// -// .. deprecated:: 2.2.0 -// -// The default value of ``False`` is deprecated and will change to -// ``True`` in a future version of pandas. -// -// sort : bool, default True -// -// Specifies if the result should be sorted. -// -// .. versionadded:: 1.3.0 -// -// Returns -// ------- -// DataFrame -// -// An Excel style pivot table. -// -// See Also -// -------- -// DataFrame.pivot : Pivot without aggregation that can handle -// -// non-numeric data. -// -// DataFrame.melt: Unpivot a DataFrame from wide to long format, -// -// optionally leaving identifiers set. -// -// wide_to_long : Wide panel to long format. Less flexible but more -// -// user-friendly than melt. -// -// Notes -// ----- -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// >>> df = pd.DataFrame({"A": ["foo", "foo", "foo", "foo", "foo", -// ... "bar", "bar", "bar", "bar"], -// ... "B": ["one", "one", "one", "two", "two", -// ... "one", "one", "two", "two"], -// ... "C": ["small", "large", "large", "small", -// ... "small", "large", "small", "small", -// ... "large"], -// ... "D": [1, 2, 2, 3, 3, 4, 5, 6, 7], -// ... "E": [2, 4, 5, 5, 6, 6, 8, 9, 9]}) -// >>> df -// -// A B C D E -// -// 0 foo one small 1 2 -// 1 foo one large 2 4 -// 2 foo one large 2 5 -// 3 foo two small 3 5 -// 4 foo two small 3 6 -// 5 bar one large 4 6 -// 6 bar one small 5 8 -// 7 bar two small 6 9 -// 8 bar two large 7 9 -// -// This first example aggregates values by taking the sum. -// -// >>> table = pd.pivot_table(df, values='D', index=['A', 'B'], -// ... columns=['C'], aggfunc="sum") -// >>> table -// C large small -// A B -// bar one 4.0 5.0 -// -// two 7.0 6.0 -// -// foo one 4.0 1.0 -// -// two NaN 6.0 -// -// We can also fill missing values using the `fill_value` parameter. -// -// >>> table = pd.pivot_table(df, values='D', index=['A', 'B'], -// ... columns=['C'], aggfunc="sum", fill_value=0) -// >>> table -// C large small -// A B -// bar one 4 5 -// -// two 7 6 -// -// foo one 4 1 -// -// two 0 6 -// -// The next example aggregates by taking the mean across multiple columns. -// -// >>> table = pd.pivot_table(df, values=['D', 'E'], index=['A', 'C'], -// ... aggfunc={'D': "mean", 'E': "mean"}) -// >>> table -// -// D E -// -// A C -// bar large 5.500000 7.500000 -// -// small 5.500000 8.500000 -// -// foo large 2.000000 4.500000 -// -// small 2.333333 4.333333 -// -// We can also calculate multiple types of aggregations for any given -// value column. -// -// >>> table = pd.pivot_table(df, values=['D', 'E'], index=['A', 'C'], -// ... aggfunc={'D': "mean", -// ... 'E': ["min", "max", "mean"]}) -// >>> table -// -// D E -// mean max mean min -// -// A C -// bar large 5.500000 9 7.500000 6 -// -// small 5.500000 9 8.500000 8 -// -// foo large 2.000000 5 4.500000 4 -// -// small 2.333333 6 4.333333 2 -// -//go:linkname PivotTable py.pivot_table -func PivotTable(data *py.Object, values *py.Object, index *py.Object, columns *py.Object, aggfunc *py.Object, fillValue *py.Object, margins *py.Object, dropna *py.Object, marginsName *py.Object, observed *py.Object, sort *py.Object) *py.Object - -// Convert categorical variable into dummy/indicator variables. -// -// Each variable is converted in as many 0/1 variables as there are different -// values. Columns in the output are each named after a value; if the input is -// a DataFrame, the name of the original variable is prepended to the value. -// -// Parameters -// ---------- -// data : array-like, Series, or DataFrame -// -// Data of which to get dummy indicators. -// -// prefix : str, list of str, or dict of str, default None -// -// String to append DataFrame column names. -// Pass a list with length equal to the number of columns -// when calling get_dummies on a DataFrame. Alternatively, `prefix` -// can be a dictionary mapping column names to prefixes. -// -// prefix_sep : str, default '_' -// -// If appending prefix, separator/delimiter to use. Or pass a -// list or dictionary as with `prefix`. -// -// dummy_na : bool, default False -// -// Add a column to indicate NaNs, if False NaNs are ignored. -// -// columns : list-like, default None -// -// Column names in the DataFrame to be encoded. -// If `columns` is None then all the columns with -// `object`, `string`, or `category` dtype will be converted. -// -// sparse : bool, default False -// -// Whether the dummy-encoded columns should be backed by -// a :class:`SparseArray` (True) or a regular NumPy array (False). -// -// drop_first : bool, default False -// -// Whether to get k-1 dummies out of k categorical levels by removing the -// first level. -// -// dtype : dtype, default bool -// -// Data type for new columns. Only a single dtype is allowed. -// -// Returns -// ------- -// DataFrame -// -// Dummy-coded data. If `data` contains other columns than the -// dummy-coded one(s), these will be prepended, unaltered, to the result. -// -// See Also -// -------- -// Series.str.get_dummies : Convert Series of strings to dummy codes. -// :func:`~pandas.from_dummies` : Convert dummy codes to categorical “DataFrame“. -// -// Notes -// ----- -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// >>> s = pd.Series(list('abca')) -// -// >>> pd.get_dummies(s) -// -// a b c -// -// 0 True False False -// 1 False True False -// 2 False False True -// 3 True False False -// -// >>> s1 = ['a', 'b', np.nan] -// -// >>> pd.get_dummies(s1) -// -// a b -// -// 0 True False -// 1 False True -// 2 False False -// -// >>> pd.get_dummies(s1, dummy_na=True) -// -// a b NaN -// -// 0 True False False -// 1 False True False -// 2 False False True -// -// >>> df = pd.DataFrame({'A': ['a', 'b', 'a'], 'B': ['b', 'a', 'c'], -// ... 'C': [1, 2, 3]}) -// -// >>> pd.get_dummies(df, prefix=['col1', 'col2']) -// -// C col1_a col1_b col2_a col2_b col2_c -// -// 0 1 True False False True False -// 1 2 False True True False False -// 2 3 True False False False True -// -// >>> pd.get_dummies(pd.Series(list('abcaa'))) -// -// a b c -// -// 0 True False False -// 1 False True False -// 2 False False True -// 3 True False False -// 4 True False False -// -// >>> pd.get_dummies(pd.Series(list('abcaa')), drop_first=True) -// -// b c -// -// 0 False False -// 1 True False -// 2 False True -// 3 False False -// 4 False False -// -// >>> pd.get_dummies(pd.Series(list('abc')), dtype=float) -// -// a b c -// -// 0 1.0 0.0 0.0 -// 1 0.0 1.0 0.0 -// 2 0.0 0.0 1.0 -// -//go:linkname GetDummies py.get_dummies -func GetDummies(data *py.Object, prefix *py.Object, prefixSep *py.Object, dummyNa *py.Object, columns *py.Object, sparse *py.Object, dropFirst *py.Object, dtype *py.Object) *py.Object - -// Create a categorical “DataFrame“ from a “DataFrame“ of dummy variables. -// -// Inverts the operation performed by :func:`~pandas.get_dummies`. -// -// .. versionadded:: 1.5.0 -// -// Parameters -// ---------- -// data : DataFrame -// -// Data which contains dummy-coded variables in form of integer columns of -// 1's and 0's. -// -// sep : str, default None -// -// Separator used in the column names of the dummy categories they are -// character indicating the separation of the categorical names from the prefixes. -// For example, if your column names are 'prefix_A' and 'prefix_B', -// you can strip the underscore by specifying sep='_'. -// -// default_category : None, Hashable or dict of Hashables, default None -// -// The default category is the implied category when a value has none of the -// listed categories specified with a one, i.e. if all dummies in a row are -// zero. Can be a single value for all variables or a dict directly mapping -// the default categories to a prefix of a variable. -// -// Returns -// ------- -// DataFrame -// -// Categorical data decoded from the dummy input-data. -// -// Raises -// ------ -// ValueError -// - When the input “DataFrame“ “data“ contains NA values. -// - When the input “DataFrame“ “data“ contains column names with separators -// that do not match the separator specified with “sep“. -// - When a “dict“ passed to “default_category“ does not include an implied -// category for each prefix. -// - When a value in “data“ has more than one category assigned to it. -// - When “default_category=None“ and a value in “data“ has no category -// assigned to it. -// -// TypeError -// - When the input “data“ is not of type “DataFrame“. -// - When the input “DataFrame“ “data“ contains non-dummy data. -// - When the passed “sep“ is of a wrong data type. -// - When the passed “default_category“ is of a wrong data type. -// -// See Also -// -------- -// :func:`~pandas.get_dummies` : Convert “Series“ or “DataFrame“ to dummy codes. -// :class:`~pandas.Categorical` : Represent a categorical variable in classic. -// -// Notes -// ----- -// The columns of the passed dummy data should only include 1's and 0's, -// or boolean values. -// -// Examples -// -------- -// >>> df = pd.DataFrame({"a": [1, 0, 0, 1], "b": [0, 1, 0, 0], -// ... "c": [0, 0, 1, 0]}) -// -// >>> df -// -// a b c -// -// 0 1 0 0 -// 1 0 1 0 -// 2 0 0 1 -// 3 1 0 0 -// -// >>> pd.from_dummies(df) -// 0 a -// 1 b -// 2 c -// 3 a -// -// >>> df = pd.DataFrame({"col1_a": [1, 0, 1], "col1_b": [0, 1, 0], -// ... "col2_a": [0, 1, 0], "col2_b": [1, 0, 0], -// ... "col2_c": [0, 0, 1]}) -// -// >>> df -// -// col1_a col1_b col2_a col2_b col2_c -// -// 0 1 0 0 1 0 -// 1 0 1 1 0 0 -// 2 1 0 0 0 1 -// -// >>> pd.from_dummies(df, sep="_") -// -// col1 col2 -// -// 0 a b -// 1 b a -// 2 a c -// -// >>> df = pd.DataFrame({"col1_a": [1, 0, 0], "col1_b": [0, 1, 0], -// ... "col2_a": [0, 1, 0], "col2_b": [1, 0, 0], -// ... "col2_c": [0, 0, 0]}) -// -// >>> df -// -// col1_a col1_b col2_a col2_b col2_c -// -// 0 1 0 0 1 0 -// 1 0 1 1 0 0 -// 2 0 0 0 0 0 -// -// >>> pd.from_dummies(df, sep="_", default_category={"col1": "d", "col2": "e"}) -// -// col1 col2 -// -// 0 a b -// 1 b a -// 2 d e -// -//go:linkname FromDummies py.from_dummies -func FromDummies(data *py.Object, sep *py.Object, defaultCategory *py.Object) *py.Object - -// Bin values into discrete intervals. -// -// Use `cut` when you need to segment and sort data values into bins. This -// function is also useful for going from a continuous variable to a -// categorical variable. For example, `cut` could convert ages to groups of -// age ranges. Supports binning into an equal number of bins, or a -// pre-specified array of bins. -// -// Parameters -// ---------- -// x : array-like -// -// The input array to be binned. Must be 1-dimensional. -// -// bins : int, sequence of scalars, or IntervalIndex -// -// The criteria to bin by. -// -// * int : Defines the number of equal-width bins in the range of `x`. The -// range of `x` is extended by .1% on each side to include the minimum -// and maximum values of `x`. -// * sequence of scalars : Defines the bin edges allowing for non-uniform -// width. No extension of the range of `x` is done. -// * IntervalIndex : Defines the exact bins to be used. Note that -// IntervalIndex for `bins` must be non-overlapping. -// -// right : bool, default True -// -// Indicates whether `bins` includes the rightmost edge or not. If -// ``right == True`` (the default), then the `bins` ``[1, 2, 3, 4]`` -// indicate (1,2], (2,3], (3,4]. This argument is ignored when -// `bins` is an IntervalIndex. -// -// labels : array or False, default None -// -// Specifies the labels for the returned bins. Must be the same length as -// the resulting bins. If False, returns only integer indicators of the -// bins. This affects the type of the output container (see below). -// This argument is ignored when `bins` is an IntervalIndex. If True, -// raises an error. When `ordered=False`, labels must be provided. -// -// retbins : bool, default False -// -// Whether to return the bins or not. Useful when bins is provided -// as a scalar. -// -// precision : int, default 3 -// -// The precision at which to store and display the bins labels. -// -// include_lowest : bool, default False -// -// Whether the first interval should be left-inclusive or not. -// -// duplicates : {default 'raise', 'drop'}, optional -// -// If bin edges are not unique, raise ValueError or drop non-uniques. -// -// ordered : bool, default True -// -// Whether the labels are ordered or not. Applies to returned types -// Categorical and Series (with Categorical dtype). If True, -// the resulting categorical will be ordered. If False, the resulting -// categorical will be unordered (labels must be provided). -// -// Returns -// ------- -// out : Categorical, Series, or ndarray -// -// An array-like object representing the respective bin for each value -// of `x`. The type depends on the value of `labels`. -// -// * None (default) : returns a Series for Series `x` or a -// Categorical for all other inputs. The values stored within -// are Interval dtype. -// -// * sequence of scalars : returns a Series for Series `x` or a -// Categorical for all other inputs. The values stored within -// are whatever the type in the sequence is. -// -// * False : returns an ndarray of integers. -// -// bins : numpy.ndarray or IntervalIndex. -// -// The computed or specified bins. Only returned when `retbins=True`. -// For scalar or sequence `bins`, this is an ndarray with the computed -// bins. If set `duplicates=drop`, `bins` will drop non-unique bin. For -// an IntervalIndex `bins`, this is equal to `bins`. -// -// See Also -// -------- -// qcut : Discretize variable into equal-sized buckets based on rank -// -// or based on sample quantiles. -// -// Categorical : Array type for storing data that come from a -// -// fixed set of values. -// -// Series : One-dimensional array with axis labels (including time series). -// IntervalIndex : Immutable Index implementing an ordered, sliceable set. -// -// Notes -// ----- -// Any NA values will be NA in the result. Out of bounds values will be NA in -// the resulting Series or Categorical object. -// -// Reference :ref:`the user guide ` for more examples. -// -// Examples -// -------- -// Discretize into three equal-sized bins. -// -// >>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), 3) -// ... # doctest: +ELLIPSIS -// [(0.994, 3.0], (5.0, 7.0], (3.0, 5.0], (3.0, 5.0], (5.0, 7.0], ... -// Categories (3, interval[float64, right]): [(0.994, 3.0] < (3.0, 5.0] ... -// -// >>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), 3, retbins=True) -// ... # doctest: +ELLIPSIS -// ([(0.994, 3.0], (5.0, 7.0], (3.0, 5.0], (3.0, 5.0], (5.0, 7.0], ... -// Categories (3, interval[float64, right]): [(0.994, 3.0] < (3.0, 5.0] ... -// array([0.994, 3. , 5. , 7. ])) -// -// Discovers the same bins, but assign them specific labels. Notice that -// the returned Categorical's categories are `labels` and is ordered. -// -// >>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), -// ... 3, labels=["bad", "medium", "good"]) -// ['bad', 'good', 'medium', 'medium', 'good', 'bad'] -// Categories (3, object): ['bad' < 'medium' < 'good'] -// -// “ordered=False“ will result in unordered categories when labels are passed. -// This parameter can be used to allow non-unique labels: -// -// >>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), 3, -// ... labels=["B", "A", "B"], ordered=False) -// ['B', 'B', 'A', 'A', 'B', 'B'] -// Categories (2, object): ['A', 'B'] -// -// “labels=False“ implies you just want the bins back. -// -// >>> pd.cut([0, 1, 1, 2], bins=4, labels=False) -// array([0, 1, 1, 3]) -// -// Passing a Series as an input returns a Series with categorical dtype: -// -// >>> s = pd.Series(np.array([2, 4, 6, 8, 10]), -// ... index=['a', 'b', 'c', 'd', 'e']) -// >>> pd.cut(s, 3) -// ... # doctest: +ELLIPSIS -// a (1.992, 4.667] -// b (1.992, 4.667] -// c (4.667, 7.333] -// d (7.333, 10.0] -// e (7.333, 10.0] -// dtype: category -// Categories (3, interval[float64, right]): [(1.992, 4.667] < (4.667, ... -// -// Passing a Series as an input returns a Series with mapping value. -// It is used to map numerically to intervals based on bins. -// -// >>> s = pd.Series(np.array([2, 4, 6, 8, 10]), -// ... index=['a', 'b', 'c', 'd', 'e']) -// >>> pd.cut(s, [0, 2, 4, 6, 8, 10], labels=False, retbins=True, right=False) -// ... # doctest: +ELLIPSIS -// (a 1.0 -// -// b 2.0 -// c 3.0 -// d 4.0 -// e NaN -// dtype: float64, -// array([ 0, 2, 4, 6, 8, 10])) -// -// # Use `drop` optional when bins is not unique -// -// >>> pd.cut(s, [0, 2, 4, 6, 10, 10], labels=False, retbins=True, -// ... right=False, duplicates='drop') -// ... # doctest: +ELLIPSIS -// (a 1.0 -// -// b 2.0 -// c 3.0 -// d 3.0 -// e NaN -// dtype: float64, -// array([ 0, 2, 4, 6, 10])) -// -// Passing an IntervalIndex for `bins` results in those categories exactly. -// Notice that values not covered by the IntervalIndex are set to NaN. 0 -// is to the left of the first bin (which is closed on the right), and 1.5 -// falls between two bins. -// -// >>> bins = pd.IntervalIndex.from_tuples([(0, 1), (2, 3), (4, 5)]) -// >>> pd.cut([0, 0.5, 1.5, 2.5, 4.5], bins) -// [NaN, (0.0, 1.0], NaN, (2.0, 3.0], (4.0, 5.0]] -// Categories (3, interval[int64, right]): [(0, 1] < (2, 3] < (4, 5]] -// -//go:linkname Cut py.cut -func Cut(x *py.Object, bins *py.Object, right *py.Object, labels *py.Object, retbins *py.Object, precision *py.Object, includeLowest *py.Object, duplicates *py.Object, ordered *py.Object) *py.Object - -// Quantile-based discretization function. -// -// Discretize variable into equal-sized buckets based on rank or based -// on sample quantiles. For example 1000 values for 10 quantiles would -// produce a Categorical object indicating quantile membership for each data point. -// -// Parameters -// ---------- -// x : 1d ndarray or Series -// q : int or list-like of float -// -// Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately -// array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles. -// -// labels : array or False, default None -// -// Used as labels for the resulting bins. Must be of the same length as -// the resulting bins. If False, return only integer indicators of the -// bins. If True, raises an error. -// -// retbins : bool, optional -// -// Whether to return the (bins, labels) or not. Can be useful if bins -// is given as a scalar. -// -// precision : int, optional -// -// The precision at which to store and display the bins labels. -// -// duplicates : {default 'raise', 'drop'}, optional -// -// If bin edges are not unique, raise ValueError or drop non-uniques. -// -// Returns -// ------- -// out : Categorical or Series or array of integers if labels is False -// -// The return type (Categorical or Series) depends on the input: a Series -// of type category if input is a Series else Categorical. Bins are -// represented as categories when categorical data is returned. -// -// bins : ndarray of floats -// -// Returned only if `retbins` is True. -// -// Notes -// ----- -// Out of bounds values will be NA in the resulting Categorical object -// -// Examples -// -------- -// >>> pd.qcut(range(5), 4) -// ... # doctest: +ELLIPSIS -// [(-0.001, 1.0], (-0.001, 1.0], (1.0, 2.0], (2.0, 3.0], (3.0, 4.0]] -// Categories (4, interval[float64, right]): [(-0.001, 1.0] < (1.0, 2.0] ... -// -// >>> pd.qcut(range(5), 3, labels=["good", "medium", "bad"]) -// ... # doctest: +SKIP -// [good, good, medium, bad, bad] -// Categories (3, object): [good < medium < bad] -// -// >>> pd.qcut(range(5), 4, labels=False) -// array([0, 0, 1, 2, 3]) -// -//go:linkname Qcut py.qcut -func Qcut(x *py.Object, q *py.Object, labels *py.Object, retbins *py.Object, precision *py.Object, duplicates *py.Object) *py.Object - -// Read a table of fixed-width formatted lines into DataFrame. -// -// Also supports optionally iterating or breaking of the file -// into chunks. -// -// Additional help can be found in the `online docs for IO Tools -// `_. -// -// Parameters -// ---------- -// filepath_or_buffer : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a text ``read()`` function.The string could be a URL. -// Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is -// expected. A local file could be: -// ``file://localhost/path/to/table.csv``. -// -// colspecs : list of tuple (int, int) or 'infer'. optional -// -// A list of tuples giving the extents of the fixed-width -// fields of each line as half-open intervals (i.e., [from, to[ ). -// String value 'infer' can be used to instruct the parser to try -// detecting the column specifications from the first 100 rows of -// the data which are not being skipped via skiprows (default='infer'). -// -// widths : list of int, optional -// -// A list of field widths which can be used instead of 'colspecs' if -// the intervals are contiguous. -// -// infer_nrows : int, default 100 -// -// The number of rows to consider when letting the parser determine the -// `colspecs`. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// **kwds : optional -// -// Optional keyword arguments can be passed to ``TextFileReader``. -// -// Returns -// ------- -// DataFrame or TextFileReader -// -// A comma-separated values (csv) file is returned as two-dimensional -// data structure with labeled axes. -// -// See Also -// -------- -// DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file. -// read_csv : Read a comma-separated values (csv) file into DataFrame. -// -// Examples -// -------- -// >>> pd.read_fwf('data.csv') # doctest: +SKIP -// -//go:linkname ReadFwf py.read_fwf -func ReadFwf(filepathOrBuffer *py.Object) *py.Object - -// Read general delimited file into DataFrame. -// -// Also supports optionally iterating or breaking of the file -// into chunks. -// -// Additional help can be found in the online docs for -// `IO Tools `_. -// -// Parameters -// ---------- -// filepath_or_buffer : str, path object or file-like object -// -// Any valid string path is acceptable. The string could be a URL. Valid -// URL schemes include http, ftp, s3, gs, and file. For file URLs, a host is -// expected. A local file could be: file://localhost/path/to/table.csv. -// -// If you want to pass in a path object, pandas accepts any ``os.PathLike``. -// -// By file-like object, we refer to objects with a ``read()`` method, such as -// a file handle (e.g. via builtin ``open`` function) or ``StringIO``. -// -// sep : str, default '\\t' (tab-stop) -// -// Character or regex pattern to treat as the delimiter. If ``sep=None``, the -// C engine cannot automatically detect -// the separator, but the Python parsing engine can, meaning the latter will -// be used and automatically detect the separator from only the first valid -// row of the file by Python's builtin sniffer tool, ``csv.Sniffer``. -// In addition, separators longer than 1 character and different from -// ``'\s+'`` will be interpreted as regular expressions and will also force -// the use of the Python parsing engine. Note that regex delimiters are prone -// to ignoring quoted data. Regex example: ``'\r\t'``. -// -// delimiter : str, optional -// -// Alias for ``sep``. -// -// header : int, Sequence of int, 'infer' or None, default 'infer' -// -// Row number(s) containing column labels and marking the start of the -// data (zero-indexed). Default behavior is to infer the column names: if no ``names`` -// are passed the behavior is identical to ``header=0`` and column -// names are inferred from the first line of the file, if column -// names are passed explicitly to ``names`` then the behavior is identical to -// ``header=None``. Explicitly pass ``header=0`` to be able to -// replace existing names. The header can be a list of integers that -// specify row locations for a :class:`~pandas.MultiIndex` on the columns -// e.g. ``[0, 1, 3]``. Intervening rows that are not specified will be -// skipped (e.g. 2 in this example is skipped). Note that this -// parameter ignores commented lines and empty lines if -// ``skip_blank_lines=True``, so ``header=0`` denotes the first line of -// data rather than the first line of the file. -// -// names : Sequence of Hashable, optional -// -// Sequence of column labels to apply. If the file contains a header row, -// then you should explicitly pass ``header=0`` to override the column names. -// Duplicates in this list are not allowed. -// -// index_col : Hashable, Sequence of Hashable or False, optional -// -// Column(s) to use as row label(s), denoted either by column labels or column -// indices. If a sequence of labels or indices is given, :class:`~pandas.MultiIndex` -// will be formed for the row labels. -// -// Note: ``index_col=False`` can be used to force pandas to *not* use the first -// column as the index, e.g., when you have a malformed file with delimiters at -// the end of each line. -// -// usecols : Sequence of Hashable or Callable, optional -// -// Subset of columns to select, denoted either by column labels or column indices. -// If list-like, all elements must either -// be positional (i.e. integer indices into the document columns) or strings -// that correspond to column names provided either by the user in ``names`` or -// inferred from the document header row(s). If ``names`` are given, the document -// header row(s) are not taken into account. For example, a valid list-like -// ``usecols`` parameter would be ``[0, 1, 2]`` or ``['foo', 'bar', 'baz']``. -// Element order is ignored, so ``usecols=[0, 1]`` is the same as ``[1, 0]``. -// To instantiate a :class:`~pandas.DataFrame` from ``data`` with element order -// preserved use ``pd.read_csv(data, usecols=['foo', 'bar'])[['foo', 'bar']]`` -// for columns in ``['foo', 'bar']`` order or -// ``pd.read_csv(data, usecols=['foo', 'bar'])[['bar', 'foo']]`` -// for ``['bar', 'foo']`` order. -// -// If callable, the callable function will be evaluated against the column -// names, returning names where the callable function evaluates to ``True``. An -// example of a valid callable argument would be ``lambda x: x.upper() in -// ['AAA', 'BBB', 'DDD']``. Using this parameter results in much faster -// parsing time and lower memory usage. -// -// dtype : dtype or dict of {Hashable : dtype}, optional -// -// Data type(s) to apply to either the whole dataset or individual columns. -// E.g., ``{'a': np.float64, 'b': np.int32, 'c': 'Int64'}`` -// Use ``str`` or ``object`` together with suitable ``na_values`` settings -// to preserve and not interpret ``dtype``. -// If ``converters`` are specified, they will be applied INSTEAD -// of ``dtype`` conversion. -// -// .. versionadded:: 1.5.0 -// -// Support for ``defaultdict`` was added. Specify a ``defaultdict`` as input where -// the default determines the ``dtype`` of the columns which are not explicitly -// listed. -// -// engine : {'c', 'python', 'pyarrow'}, optional -// -// Parser engine to use. The C and pyarrow engines are faster, while the python engine -// is currently more feature-complete. Multithreading is currently only supported by -// the pyarrow engine. -// -// .. versionadded:: 1.4.0 -// -// The 'pyarrow' engine was added as an *experimental* engine, and some features -// are unsupported, or may not work correctly, with this engine. -// -// converters : dict of {Hashable : Callable}, optional -// -// Functions for converting values in specified columns. Keys can either -// be column labels or column indices. -// -// true_values : list, optional -// -// Values to consider as ``True`` in addition to case-insensitive variants of 'True'. -// -// false_values : list, optional -// -// Values to consider as ``False`` in addition to case-insensitive variants of 'False'. -// -// skipinitialspace : bool, default False -// -// Skip spaces after delimiter. -// -// skiprows : int, list of int or Callable, optional -// -// Line numbers to skip (0-indexed) or number of lines to skip (``int``) -// at the start of the file. -// -// If callable, the callable function will be evaluated against the row -// indices, returning ``True`` if the row should be skipped and ``False`` otherwise. -// An example of a valid callable argument would be ``lambda x: x in [0, 2]``. -// -// skipfooter : int, default 0 -// -// Number of lines at bottom of file to skip (Unsupported with ``engine='c'``). -// -// nrows : int, optional -// -// Number of rows of file to read. Useful for reading pieces of large files. -// -// na_values : Hashable, Iterable of Hashable or dict of {Hashable : Iterable}, optional -// -// Additional strings to recognize as ``NA``/``NaN``. If ``dict`` passed, specific -// per-column ``NA`` values. By default the following values are interpreted as -// ``NaN``: " ", "#N/A", "#N/A N/A", "#NA", "-1.#IND", "-1.#QNAN", "-NaN", "-nan", -// "1.#IND", "1.#QNAN", "", "N/A", "NA", "NULL", "NaN", "None", -// "n/a", "nan", "null ". -// -// keep_default_na : bool, default True -// -// Whether or not to include the default ``NaN`` values when parsing the data. -// Depending on whether ``na_values`` is passed in, the behavior is as follows: -// -// * If ``keep_default_na`` is ``True``, and ``na_values`` are specified, ``na_values`` -// is appended to the default ``NaN`` values used for parsing. -// * If ``keep_default_na`` is ``True``, and ``na_values`` are not specified, only -// the default ``NaN`` values are used for parsing. -// * If ``keep_default_na`` is ``False``, and ``na_values`` are specified, only -// the ``NaN`` values specified ``na_values`` are used for parsing. -// * If ``keep_default_na`` is ``False``, and ``na_values`` are not specified, no -// strings will be parsed as ``NaN``. -// -// Note that if ``na_filter`` is passed in as ``False``, the ``keep_default_na`` and -// ``na_values`` parameters will be ignored. -// -// na_filter : bool, default True -// -// Detect missing value markers (empty strings and the value of ``na_values``). In -// data without any ``NA`` values, passing ``na_filter=False`` can improve the -// performance of reading a large file. -// -// verbose : bool, default False -// -// Indicate number of ``NA`` values placed in non-numeric columns. -// -// .. deprecated:: 2.2.0 -// -// skip_blank_lines : bool, default True -// -// If ``True``, skip over blank lines rather than interpreting as ``NaN`` values. -// -// parse_dates : bool, list of Hashable, list of lists or dict of {Hashable : list}, default False -// -// The behavior is as follows: -// -// * ``bool``. If ``True`` -> try parsing the index. Note: Automatically set to -// ``True`` if ``date_format`` or ``date_parser`` arguments have been passed. -// * ``list`` of ``int`` or names. e.g. If ``[1, 2, 3]`` -> try parsing columns 1, 2, 3 -// each as a separate date column. -// * ``list`` of ``list``. e.g. If ``[[1, 3]]`` -> combine columns 1 and 3 and parse -// as a single date column. Values are joined with a space before parsing. -// * ``dict``, e.g. ``{'foo' : [1, 3]}`` -> parse columns 1, 3 as date and call -// result 'foo'. Values are joined with a space before parsing. -// -// If a column or index cannot be represented as an array of ``datetime``, -// say because of an unparsable value or a mixture of timezones, the column -// or index will be returned unaltered as an ``object`` data type. For -// non-standard ``datetime`` parsing, use :func:`~pandas.to_datetime` after -// :func:`~pandas.read_csv`. -// -// Note: A fast-path exists for iso8601-formatted dates. -// -// infer_datetime_format : bool, default False -// -// If ``True`` and ``parse_dates`` is enabled, pandas will attempt to infer the -// format of the ``datetime`` strings in the columns, and if it can be inferred, -// switch to a faster method of parsing them. In some cases this can increase -// the parsing speed by 5-10x. -// -// .. deprecated:: 2.0.0 -// A strict version of this argument is now the default, passing it has no effect. -// -// keep_date_col : bool, default False -// -// If ``True`` and ``parse_dates`` specifies combining multiple columns then -// keep the original columns. -// -// date_parser : Callable, optional -// -// Function to use for converting a sequence of string columns to an array of -// ``datetime`` instances. The default uses ``dateutil.parser.parser`` to do the -// conversion. pandas will try to call ``date_parser`` in three different ways, -// advancing to the next if an exception occurs: 1) Pass one or more arrays -// (as defined by ``parse_dates``) as arguments; 2) concatenate (row-wise) the -// string values from the columns defined by ``parse_dates`` into a single array -// and pass that; and 3) call ``date_parser`` once for each row using one or -// more strings (corresponding to the columns defined by ``parse_dates``) as -// arguments. -// -// .. deprecated:: 2.0.0 -// Use ``date_format`` instead, or read in as ``object`` and then apply -// :func:`~pandas.to_datetime` as-needed. -// -// date_format : str or dict of column -> format, optional -// -// Format to use for parsing dates when used in conjunction with ``parse_dates``. -// The strftime to parse time, e.g. :const:`"%d/%m/%Y"`. See -// `strftime documentation -// `_ for more information on choices, though -// note that :const:`"%f"` will parse all the way up to nanoseconds. -// You can also pass: -// -// - "ISO8601", to parse any `ISO8601 `_ -// time string (not necessarily in exactly the same format); -// - "mixed", to infer the format for each element individually. This is risky, -// and you should probably use it along with `dayfirst`. -// -// .. versionadded:: 2.0.0 -// -// dayfirst : bool, default False -// -// DD/MM format dates, international and European format. -// -// cache_dates : bool, default True -// -// If ``True``, use a cache of unique, converted dates to apply the ``datetime`` -// conversion. May produce significant speed-up when parsing duplicate -// date strings, especially ones with timezone offsets. -// -// iterator : bool, default False -// -// Return ``TextFileReader`` object for iteration or getting chunks with -// ``get_chunk()``. -// -// chunksize : int, optional -// -// Number of lines to read from the file per chunk. Passing a value will cause the -// function to return a ``TextFileReader`` object for iteration. -// See the `IO Tools docs -// `_ -// for more information on ``iterator`` and ``chunksize``. -// -// compression : str or dict, default 'infer' -// -// For on-the-fly decompression of on-disk data. If 'infer' and 'filepath_or_buffer' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. -// Set to ``None`` for no decompression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for Zstandard decompression using a -// custom compression dictionary: -// ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// .. versionchanged:: 1.4.0 Zstandard support. -// -// thousands : str (length 1), optional -// -// Character acting as the thousands separator in numerical values. -// -// decimal : str (length 1), default '.' -// -// Character to recognize as decimal point (e.g., use ',' for European data). -// -// lineterminator : str (length 1), optional -// -// Character used to denote a line break. Only valid with C parser. -// -// quotechar : str (length 1), optional -// -// Character used to denote the start and end of a quoted item. Quoted -// items can include the ``delimiter`` and it will be ignored. -// -// quoting : {0 or csv.QUOTE_MINIMAL, 1 or csv.QUOTE_ALL, 2 or csv.QUOTE_NONNUMERIC, 3 or csv.QUOTE_NONE}, default csv.QUOTE_MINIMAL -// -// Control field quoting behavior per ``csv.QUOTE_*`` constants. Default is -// ``csv.QUOTE_MINIMAL`` (i.e., 0) which implies that only fields containing special -// characters are quoted (e.g., characters defined in ``quotechar``, ``delimiter``, -// or ``lineterminator``. -// -// doublequote : bool, default True -// -// When ``quotechar`` is specified and ``quoting`` is not ``QUOTE_NONE``, indicate -// whether or not to interpret two consecutive ``quotechar`` elements INSIDE a -// field as a single ``quotechar`` element. -// -// escapechar : str (length 1), optional -// -// Character used to escape other characters. -// -// comment : str (length 1), optional -// -// Character indicating that the remainder of line should not be parsed. -// If found at the beginning -// of a line, the line will be ignored altogether. This parameter must be a -// single character. Like empty lines (as long as ``skip_blank_lines=True``), -// fully commented lines are ignored by the parameter ``header`` but not by -// ``skiprows``. For example, if ``comment='#'``, parsing -// ``#empty\na,b,c\n1,2,3`` with ``header=0`` will result in ``'a,b,c'`` being -// treated as the header. -// -// encoding : str, optional, default 'utf-8' -// -// Encoding to use for UTF when reading/writing (ex. ``'utf-8'``). `List of Python -// standard encodings -// `_ . -// -// encoding_errors : str, optional, default 'strict' -// -// How encoding errors are treated. `List of possible values -// `_ . -// -// .. versionadded:: 1.3.0 -// -// dialect : str or csv.Dialect, optional -// -// If provided, this parameter will override values (default or not) for the -// following parameters: ``delimiter``, ``doublequote``, ``escapechar``, -// ``skipinitialspace``, ``quotechar``, and ``quoting``. If it is necessary to -// override values, a ``ParserWarning`` will be issued. See ``csv.Dialect`` -// documentation for more details. -// -// on_bad_lines : {'error', 'warn', 'skip'} or Callable, default 'error' -// -// Specifies what to do upon encountering a bad line (a line with too many fields). -// Allowed values are : -// -// - ``'error'``, raise an Exception when a bad line is encountered. -// - ``'warn'``, raise a warning when a bad line is encountered and skip that line. -// - ``'skip'``, skip bad lines without raising or warning when they are encountered. -// -// .. versionadded:: 1.3.0 -// -// .. versionadded:: 1.4.0 -// -// - Callable, function with signature -// ``(bad_line: list[str]) -> list[str] | None`` that will process a single -// bad line. ``bad_line`` is a list of strings split by the ``sep``. -// If the function returns ``None``, the bad line will be ignored. -// If the function returns a new ``list`` of strings with more elements than -// expected, a ``ParserWarning`` will be emitted while dropping extra elements. -// Only supported when ``engine='python'`` -// -// .. versionchanged:: 2.2.0 -// -// - Callable, function with signature -// as described in `pyarrow documentation -// `_ when ``engine='pyarrow'`` -// -// delim_whitespace : bool, default False -// -// Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be -// used as the ``sep`` delimiter. Equivalent to setting ``sep='\s+'``. If this option -// is set to ``True``, nothing should be passed in for the ``delimiter`` -// parameter. -// -// .. deprecated:: 2.2.0 -// Use ``sep="\s+"`` instead. -// -// low_memory : bool, default True -// -// Internally process the file in chunks, resulting in lower memory use -// while parsing, but possibly mixed type inference. To ensure no mixed -// types either set ``False``, or specify the type with the ``dtype`` parameter. -// Note that the entire file is read into a single :class:`~pandas.DataFrame` -// regardless, use the ``chunksize`` or ``iterator`` parameter to return the data in -// chunks. (Only valid with C parser). -// -// memory_map : bool, default False -// -// If a filepath is provided for ``filepath_or_buffer``, map the file object -// directly onto memory and access the data directly from there. Using this -// option can improve performance because there is no longer any I/O overhead. -// -// float_precision : {'high', 'legacy', 'round_trip'}, optional -// -// Specifies which converter the C engine should use for floating-point -// values. The options are ``None`` or ``'high'`` for the ordinary converter, -// ``'legacy'`` for the original lower precision pandas converter, and -// ``'round_trip'`` for the round-trip converter. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// DataFrame or TextFileReader -// -// A comma-separated values (csv) file is returned as two-dimensional -// data structure with labeled axes. -// -// See Also -// -------- -// DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file. -// read_csv : Read a comma-separated values (csv) file into DataFrame. -// read_fwf : Read a table of fixed-width formatted lines into DataFrame. -// -// Examples -// -------- -// >>> pd.read_table('data.csv') # doctest: +SKIP -// -//go:linkname ReadTable py.read_table -func ReadTable(filepathOrBuffer *py.Object) *py.Object - -// Load pickled pandas object (or any object) from file. -// -// .. warning:: -// -// Loading pickled data received from untrusted sources can be -// unsafe. See `here `__. -// -// Parameters -// ---------- -// filepath_or_buffer : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a binary ``readlines()`` function. -// Also accepts URL. URL is not limited to S3 and GCS. -// -// compression : str or dict, default 'infer' -// -// For on-the-fly decompression of on-disk data. If 'infer' and 'filepath_or_buffer' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. -// Set to ``None`` for no decompression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for Zstandard decompression using a -// custom compression dictionary: -// ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// .. versionchanged:: 1.4.0 Zstandard support. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// Returns -// ------- -// same type as object stored in file -// -// See Also -// -------- -// DataFrame.to_pickle : Pickle (serialize) DataFrame object to file. -// Series.to_pickle : Pickle (serialize) Series object to file. -// read_hdf : Read HDF5 file into a DataFrame. -// read_sql : Read SQL query or database table into a DataFrame. -// read_parquet : Load a parquet object, returning a DataFrame. -// -// Notes -// ----- -// read_pickle is only guaranteed to be backwards compatible to pandas 0.20.3 -// provided the object was serialized with to_pickle. -// -// Examples -// -------- -// >>> original_df = pd.DataFrame( -// ... {"foo": range(5), "bar": range(5, 10)} -// ... ) # doctest: +SKIP -// >>> original_df # doctest: +SKIP -// -// foo bar -// -// 0 0 5 -// 1 1 6 -// 2 2 7 -// 3 3 8 -// 4 4 9 -// >>> pd.to_pickle(original_df, "./dummy.pkl") # doctest: +SKIP -// -// >>> unpickled_df = pd.read_pickle("./dummy.pkl") # doctest: +SKIP -// >>> unpickled_df # doctest: +SKIP -// -// foo bar -// -// 0 0 5 -// 1 1 6 -// 2 2 7 -// 3 3 8 -// 4 4 9 -// -//go:linkname ReadPickle py.read_pickle -func ReadPickle(filepathOrBuffer *py.Object, compression *py.Object, storageOptions *py.Object) *py.Object - -// Pickle (serialize) object to file. -// -// Parameters -// ---------- -// obj : any object -// -// Any python object. -// -// filepath_or_buffer : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a binary ``write()`` function. -// Also accepts URL. URL has to be of S3 or GCS. -// -// compression : str or dict, default 'infer' -// -// For on-the-fly compression of the output data. If 'infer' and 'filepath_or_buffer' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// Set to ``None`` for no compression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdCompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for faster compression and to create -// a reproducible gzip archive: -// ``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// .. versionchanged:: 1.4.0 Zstandard support. -// -// protocol : int -// -// Int which indicates which protocol should be used by the pickler, -// default HIGHEST_PROTOCOL (see [1], paragraph 12.1.2). The possible -// values for this parameter depend on the version of Python. For Python -// 2.x, possible values are 0, 1, 2. For Python>=3.0, 3 is a valid value. -// For Python >= 3.4, 4 is a valid value. A negative value for the -// protocol parameter is equivalent to setting its value to -// HIGHEST_PROTOCOL. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// .. [1] https://docs.python.org/3/library/pickle.html -// -// See Also -// -------- -// read_pickle : Load pickled pandas object (or any object) from file. -// DataFrame.to_hdf : Write DataFrame to an HDF5 file. -// DataFrame.to_sql : Write DataFrame to a SQL database. -// DataFrame.to_parquet : Write a DataFrame to the binary parquet format. -// -// Examples -// -------- -// >>> original_df = pd.DataFrame({"foo": range(5), "bar": range(5, 10)}) # doctest: +SKIP -// >>> original_df # doctest: +SKIP -// -// foo bar -// -// 0 0 5 -// 1 1 6 -// 2 2 7 -// 3 3 8 -// 4 4 9 -// >>> pd.to_pickle(original_df, "./dummy.pkl") # doctest: +SKIP -// -// >>> unpickled_df = pd.read_pickle("./dummy.pkl") # doctest: +SKIP -// >>> unpickled_df # doctest: +SKIP -// -// foo bar -// -// 0 0 5 -// 1 1 6 -// 2 2 7 -// 3 3 8 -// 4 4 9 -// -//go:linkname ToPickle py.to_pickle -func ToPickle(obj *py.Object, filepathOrBuffer *py.Object, compression *py.Object, protocol *py.Object, storageOptions *py.Object) *py.Object - -// Read from the store, close it if we opened it. -// -// Retrieve pandas object stored in file, optionally based on where -// criteria. -// -// .. warning:: -// -// Pandas uses PyTables for reading and writing HDF5 files, which allows -// serializing object-dtype data with pickle when using the "fixed" format. -// Loading pickled data received from untrusted sources can be unsafe. -// -// See: https://docs.python.org/3/library/pickle.html for more. -// -// Parameters -// ---------- -// path_or_buf : str, path object, pandas.HDFStore -// -// Any valid string path is acceptable. Only supports the local file system, -// remote URLs and file-like objects are not supported. -// -// If you want to pass in a path object, pandas accepts any -// ``os.PathLike``. -// -// Alternatively, pandas accepts an open :class:`pandas.HDFStore` object. -// -// key : object, optional -// -// The group identifier in the store. Can be omitted if the HDF file -// contains a single pandas object. -// -// mode : {'r', 'r+', 'a'}, default 'r' -// -// Mode to use when opening the file. Ignored if path_or_buf is a -// :class:`pandas.HDFStore`. Default is 'r'. -// -// errors : str, default 'strict' -// -// Specifies how encoding and decoding errors are to be handled. -// See the errors argument for :func:`open` for a full list -// of options. -// -// where : list, optional -// -// A list of Term (or convertible) objects. -// -// start : int, optional -// -// Row number to start selection. -// -// stop : int, optional -// -// Row number to stop selection. -// -// columns : list, optional -// -// A list of columns names to return. -// -// iterator : bool, optional -// -// Return an iterator object. -// -// chunksize : int, optional -// -// Number of rows to include in an iteration when using an iterator. -// -// **kwargs -// -// Additional keyword arguments passed to HDFStore. -// -// Returns -// ------- -// object -// -// The selected object. Return type depends on the object stored. -// -// See Also -// -------- -// DataFrame.to_hdf : Write a HDF file from a DataFrame. -// HDFStore : Low-level access to HDF files. -// -// Examples -// -------- -// >>> df = pd.DataFrame([[1, 1.0, 'a']], columns=['x', 'y', 'z']) # doctest: +SKIP -// >>> df.to_hdf('./store.h5', 'data') # doctest: +SKIP -// >>> reread = pd.read_hdf('./store.h5') # doctest: +SKIP -// -//go:linkname ReadHdf py.read_hdf -func ReadHdf(pathOrBuf *py.Object, key *py.Object, mode *py.Object, errors *py.Object, where *py.Object, start *py.Object, stop *py.Object, columns *py.Object, iterator *py.Object, chunksize *py.Object) *py.Object - -// Read SQL query or database table into a DataFrame. -// -// This function is a convenience wrapper around “read_sql_table“ and -// “read_sql_query“ (for backward compatibility). It will delegate -// to the specific function depending on the provided input. A SQL query -// will be routed to “read_sql_query“, while a database table name will -// be routed to “read_sql_table“. Note that the delegated function might -// have more specific notes about their functionality not listed here. -// -// Parameters -// ---------- -// sql : str or SQLAlchemy Selectable (select or text object) -// -// SQL query to be executed or a table name. -// -// con : ADBC Connection, SQLAlchemy connectable, str, or sqlite3 connection -// -// ADBC provides high performance I/O with native type support, where available. -// Using SQLAlchemy makes it possible to use any DB supported by that -// library. If a DBAPI2 object, only sqlite3 is supported. The user is responsible -// for engine disposal and connection closure for the ADBC connection and -// SQLAlchemy connectable; str connections are closed automatically. See -// `here `_. -// -// index_col : str or list of str, optional, default: None -// -// Column(s) to set as index(MultiIndex). -// -// coerce_float : bool, default True -// -// Attempts to convert values of non-string, non-numeric objects (like -// decimal.Decimal) to floating point, useful for SQL result sets. -// -// params : list, tuple or dict, optional, default: None -// -// List of parameters to pass to execute method. The syntax used -// to pass parameters is database driver dependent. Check your -// database driver documentation for which of the five syntax styles, -// described in PEP 249's paramstyle, is supported. -// Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'}. -// -// parse_dates : list or dict, default: None -// - List of column names to parse as dates. -// - Dict of “{column_name: format string}“ where format string is -// strftime compatible in case of parsing string times, or is one of -// (D, s, ns, ms, us) in case of parsing integer timestamps. -// - Dict of “{column_name: arg dict}“, where the arg dict corresponds -// to the keyword arguments of :func:`pandas.to_datetime` -// Especially useful with databases without native Datetime support, -// such as SQLite. -// -// columns : list, default: None -// -// List of column names to select from SQL table (only used when reading -// a table). -// -// chunksize : int, default None -// -// If specified, return an iterator where `chunksize` is the -// number of rows to include in each chunk. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// dtype : Type name or dict of columns -// -// Data type for data or columns. E.g. np.float64 or -// {'a': np.float64, 'b': np.int32, 'c': 'Int64'}. -// The argument is ignored if a table is passed instead of a query. -// -// .. versionadded:: 2.0.0 -// -// Returns -// ------- -// DataFrame or Iterator[DataFrame] -// -// See Also -// -------- -// read_sql_table : Read SQL database table into a DataFrame. -// read_sql_query : Read SQL query into a DataFrame. -// -// Examples -// -------- -// Read data from SQL via either a SQL query or a SQL tablename. -// When using a SQLite database only SQL queries are accepted, -// providing only the SQL tablename will result in an error. -// -// >>> from sqlite3 import connect -// >>> conn = connect(':memory:') -// >>> df = pd.DataFrame(data=[[0, '10/11/12'], [1, '12/11/10']], -// ... columns=['int_column', 'date_column']) -// >>> df.to_sql(name='test_data', con=conn) -// 2 -// -// >>> pd.read_sql('SELECT int_column, date_column FROM test_data', conn) -// -// int_column date_column -// -// 0 0 10/11/12 -// 1 1 12/11/10 -// -// >>> pd.read_sql('test_data', 'postgres:///db_name') # doctest:+SKIP -// -// Apply date parsing to columns through the “parse_dates“ argument -// The “parse_dates“ argument calls “pd.to_datetime“ on the provided columns. -// Custom argument values for applying “pd.to_datetime“ on a column are specified -// via a dictionary format: -// -// >>> pd.read_sql('SELECT int_column, date_column FROM test_data', -// ... conn, -// ... parse_dates={"date_column": {"format": "%d/%m/%y"}}) -// -// int_column date_column -// -// 0 0 2012-11-10 -// 1 1 2010-11-12 -// -// .. versionadded:: 2.2.0 -// -// pandas now supports reading via ADBC drivers -// -// >>> from adbc_driver_postgresql import dbapi # doctest:+SKIP -// >>> with dbapi.connect('postgres:///db_name') as conn: # doctest:+SKIP -// ... pd.read_sql('SELECT int_column FROM test_data', conn) -// -// int_column -// -// 0 0 -// 1 1 -// -//go:linkname ReadSql py.read_sql -func ReadSql(sql *py.Object, con *py.Object, indexCol *py.Object, coerceFloat *py.Object, params *py.Object, parseDates *py.Object, columns *py.Object, chunksize *py.Object, dtypeBackend *py.Object, dtype *py.Object) *py.Object - -// Read SQL query into a DataFrame. -// -// Returns a DataFrame corresponding to the result set of the query -// string. Optionally provide an `index_col` parameter to use one of the -// columns as the index, otherwise default integer index will be used. -// -// Parameters -// ---------- -// sql : str SQL query or SQLAlchemy Selectable (select or text object) -// -// SQL query to be executed. -// -// con : SQLAlchemy connectable, str, or sqlite3 connection -// -// Using SQLAlchemy makes it possible to use any DB supported by that -// library. If a DBAPI2 object, only sqlite3 is supported. -// -// index_col : str or list of str, optional, default: None -// -// Column(s) to set as index(MultiIndex). -// -// coerce_float : bool, default True -// -// Attempts to convert values of non-string, non-numeric objects (like -// decimal.Decimal) to floating point. Useful for SQL result sets. -// -// params : list, tuple or mapping, optional, default: None -// -// List of parameters to pass to execute method. The syntax used -// to pass parameters is database driver dependent. Check your -// database driver documentation for which of the five syntax styles, -// described in PEP 249's paramstyle, is supported. -// Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'}. -// -// parse_dates : list or dict, default: None -// - List of column names to parse as dates. -// - Dict of “{column_name: format string}“ where format string is -// strftime compatible in case of parsing string times, or is one of -// (D, s, ns, ms, us) in case of parsing integer timestamps. -// - Dict of “{column_name: arg dict}“, where the arg dict corresponds -// to the keyword arguments of :func:`pandas.to_datetime` -// Especially useful with databases without native Datetime support, -// such as SQLite. -// -// chunksize : int, default None -// -// If specified, return an iterator where `chunksize` is the number of -// rows to include in each chunk. -// -// dtype : Type name or dict of columns -// -// Data type for data or columns. E.g. np.float64 or -// {'a': np.float64, 'b': np.int32, 'c': 'Int64'}. -// -// .. versionadded:: 1.3.0 -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// DataFrame or Iterator[DataFrame] -// -// See Also -// -------- -// read_sql_table : Read SQL database table into a DataFrame. -// read_sql : Read SQL query or database table into a DataFrame. -// -// Notes -// ----- -// Any datetime values with time zone information parsed via the `parse_dates` -// parameter will be converted to UTC. -// -// Examples -// -------- -// >>> from sqlalchemy import create_engine # doctest: +SKIP -// >>> engine = create_engine("sqlite:///database.db") # doctest: +SKIP -// >>> with engine.connect() as conn, conn.begin(): # doctest: +SKIP -// ... data = pd.read_sql_table("data", conn) # doctest: +SKIP -// -//go:linkname ReadSqlQuery py.read_sql_query -func ReadSqlQuery(sql *py.Object, con *py.Object, indexCol *py.Object, coerceFloat *py.Object, params *py.Object, parseDates *py.Object, chunksize *py.Object, dtype *py.Object, dtypeBackend *py.Object) *py.Object - -// Read SQL database table into a DataFrame. -// -// Given a table name and a SQLAlchemy connectable, returns a DataFrame. -// This function does not support DBAPI connections. -// -// Parameters -// ---------- -// table_name : str -// -// Name of SQL table in database. -// -// con : SQLAlchemy connectable or str -// -// A database URI could be provided as str. -// SQLite DBAPI connection mode not supported. -// -// schema : str, default None -// -// Name of SQL schema in database to query (if database flavor -// supports this). Uses default schema if None (default). -// -// index_col : str or list of str, optional, default: None -// -// Column(s) to set as index(MultiIndex). -// -// coerce_float : bool, default True -// -// Attempts to convert values of non-string, non-numeric objects (like -// decimal.Decimal) to floating point. Can result in loss of Precision. -// -// parse_dates : list or dict, default None -// - List of column names to parse as dates. -// - Dict of “{column_name: format string}“ where format string is -// strftime compatible in case of parsing string times or is one of -// (D, s, ns, ms, us) in case of parsing integer timestamps. -// - Dict of “{column_name: arg dict}“, where the arg dict corresponds -// to the keyword arguments of :func:`pandas.to_datetime` -// Especially useful with databases without native Datetime support, -// such as SQLite. -// -// columns : list, default None -// -// List of column names to select from SQL table. -// -// chunksize : int, default None -// -// If specified, returns an iterator where `chunksize` is the number of -// rows to include in each chunk. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// DataFrame or Iterator[DataFrame] -// -// A SQL table is returned as two-dimensional data structure with labeled -// axes. -// -// See Also -// -------- -// read_sql_query : Read SQL query into a DataFrame. -// read_sql : Read SQL query or database table into a DataFrame. -// -// Notes -// ----- -// Any datetime values with time zone information will be converted to UTC. -// -// Examples -// -------- -// >>> pd.read_sql_table('table_name', 'postgres:///db_name') # doctest:+SKIP -// -//go:linkname ReadSqlTable py.read_sql_table -func ReadSqlTable(tableName *py.Object, con *py.Object, schema *py.Object, indexCol *py.Object, coerceFloat *py.Object, parseDates *py.Object, columns *py.Object, chunksize *py.Object, dtypeBackend *py.Object) *py.Object - -// Read text from clipboard and pass to :func:`~pandas.read_csv`. -// -// Parses clipboard contents similar to how CSV files are parsed -// using :func:`~pandas.read_csv`. -// -// Parameters -// ---------- -// sep : str, default '\\s+' -// -// A string or regex delimiter. The default of ``'\\s+'`` denotes -// one or more whitespace characters. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// **kwargs -// -// See :func:`~pandas.read_csv` for the full argument list. -// -// Returns -// ------- -// DataFrame -// -// A parsed :class:`~pandas.DataFrame` object. -// -// See Also -// -------- -// DataFrame.to_clipboard : Copy object to the system clipboard. -// read_csv : Read a comma-separated values (csv) file into DataFrame. -// read_fwf : Read a table of fixed-width formatted lines into DataFrame. -// -// Examples -// -------- -// >>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]], columns=['A', 'B', 'C']) -// >>> df.to_clipboard() # doctest: +SKIP -// >>> pd.read_clipboard() # doctest: +SKIP -// -// A B C -// -// 0 1 2 3 -// 1 4 5 6 -// -//go:linkname ReadClipboard py.read_clipboard -func ReadClipboard(sep *py.Object, dtypeBackend *py.Object) *py.Object - -// Load a parquet object from the file path, returning a DataFrame. -// -// Parameters -// ---------- -// path : str, path object or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a binary ``read()`` function. -// The string could be a URL. Valid URL schemes include http, ftp, s3, -// gs, and file. For file URLs, a host is expected. A local file could be: -// ``file://localhost/path/to/table.parquet``. -// A file URL can also be a path to a directory that contains multiple -// partitioned parquet files. Both pyarrow and fastparquet support -// paths to directories as well as file URLs. A directory path could be: -// ``file://localhost/path/to/tables`` or ``s3://bucket/partition_dir``. -// -// engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto' -// -// Parquet library to use. If 'auto', then the option -// ``io.parquet.engine`` is used. The default ``io.parquet.engine`` -// behavior is to try 'pyarrow', falling back to 'fastparquet' if -// 'pyarrow' is unavailable. -// -// When using the ``'pyarrow'`` engine and no storage options are provided -// and a filesystem is implemented by both ``pyarrow.fs`` and ``fsspec`` -// (e.g. "s3://"), then the ``pyarrow.fs`` filesystem is attempted first. -// Use the filesystem keyword with an instantiated fsspec filesystem -// if you wish to use its implementation. -// -// columns : list, default=None -// -// If not None, only these columns will be read from the file. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// .. versionadded:: 1.3.0 -// -// use_nullable_dtypes : bool, default False -// -// If True, use dtypes that use ``pd.NA`` as missing value indicator -// for the resulting DataFrame. (only applicable for the ``pyarrow`` -// engine) -// As new dtypes are added that support ``pd.NA`` in the future, the -// output with this option will change to use those dtypes. -// Note: this is an experimental option, and behaviour (e.g. additional -// support dtypes) may change without notice. -// -// .. deprecated:: 2.0 -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// filesystem : fsspec or pyarrow filesystem, default None -// -// Filesystem object to use when reading the parquet file. Only implemented -// for ``engine="pyarrow"``. -// -// .. versionadded:: 2.1.0 -// -// filters : List[Tuple] or List[List[Tuple]], default None -// -// To filter out data. -// Filter syntax: [[(column, op, val), ...],...] -// where op is [==, =, >, >=, <, <=, !=, in, not in] -// The innermost tuples are transposed into a set of filters applied -// through an `AND` operation. -// The outer list combines these sets of filters through an `OR` -// operation. -// A single list of tuples can also be used, meaning that no `OR` -// operation between set of filters is to be conducted. -// -// Using this argument will NOT result in row-wise filtering of the final -// partitions unless ``engine="pyarrow"`` is also specified. For -// other engines, filtering is only performed at the partition level, that is, -// to prevent the loading of some row-groups and/or files. -// -// .. versionadded:: 2.1.0 -// -// **kwargs -// -// Any additional kwargs are passed to the engine. -// -// Returns -// ------- -// DataFrame -// -// See Also -// -------- -// DataFrame.to_parquet : Create a parquet object that serializes a DataFrame. -// -// Examples -// -------- -// >>> original_df = pd.DataFrame( -// ... {"foo": range(5), "bar": range(5, 10)} -// ... ) -// >>> original_df -// -// foo bar -// -// 0 0 5 -// 1 1 6 -// 2 2 7 -// 3 3 8 -// 4 4 9 -// >>> df_parquet_bytes = original_df.to_parquet() -// >>> from io import BytesIO -// >>> restored_df = pd.read_parquet(BytesIO(df_parquet_bytes)) -// >>> restored_df -// -// foo bar -// -// 0 0 5 -// 1 1 6 -// 2 2 7 -// 3 3 8 -// 4 4 9 -// >>> restored_df.equals(original_df) -// True -// >>> restored_bar = pd.read_parquet(BytesIO(df_parquet_bytes), columns=["bar"]) -// >>> restored_bar -// -// bar -// -// 0 5 -// 1 6 -// 2 7 -// 3 8 -// 4 9 -// >>> restored_bar.equals(original_df[['bar']]) -// True -// -// The function uses `kwargs` that are passed directly to the engine. -// In the following example, we use the `filters` argument of the pyarrow -// engine to filter the rows of the DataFrame. -// -// Since `pyarrow` is the default engine, we can omit the `engine` argument. -// Note that the `filters` argument is implemented by the `pyarrow` engine, -// which can benefit from multithreading and also potentially be more -// economical in terms of memory. -// -// >>> sel = [("foo", ">", 2)] -// >>> restored_part = pd.read_parquet(BytesIO(df_parquet_bytes), filters=sel) -// >>> restored_part -// -// foo bar -// -// 0 3 8 -// 1 4 9 -// -//go:linkname ReadParquet py.read_parquet -func ReadParquet(path *py.Object, engine *py.Object, columns *py.Object, storageOptions *py.Object, useNullableDtypes *py.Object, dtypeBackend *py.Object, filesystem *py.Object, filters *py.Object) *py.Object - -// Load an ORC object from the file path, returning a DataFrame. -// -// Parameters -// ---------- -// path : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a binary ``read()`` function. The string could be a URL. -// Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is -// expected. A local file could be: -// ``file://localhost/path/to/table.orc``. -// -// columns : list, default None -// -// If not None, only these columns will be read from the file. -// Output always follows the ordering of the file and not the columns list. -// This mirrors the original behaviour of -// :external+pyarrow:py:meth:`pyarrow.orc.ORCFile.read`. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// filesystem : fsspec or pyarrow filesystem, default None -// -// Filesystem object to use when reading the parquet file. -// -// .. versionadded:: 2.1.0 -// -// **kwargs -// -// Any additional kwargs are passed to pyarrow. -// -// Returns -// ------- -// DataFrame -// -// Notes -// ----- -// Before using this function you should read the :ref:`user guide about ORC ` -// and :ref:`install optional dependencies `. -// -// If “path“ is a URI scheme pointing to a local or remote file (e.g. "s3://"), -// a “pyarrow.fs“ filesystem will be attempted to read the file. You can also pass a -// pyarrow or fsspec filesystem object into the filesystem keyword to override this -// behavior. -// -// Examples -// -------- -// >>> result = pd.read_orc("example_pa.orc") # doctest: +SKIP -// -//go:linkname ReadOrc py.read_orc -func ReadOrc(path *py.Object, columns *py.Object, dtypeBackend *py.Object, filesystem *py.Object) *py.Object - -// Load a feather-format object from the file path. -// -// Parameters -// ---------- -// path : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a binary ``read()`` function. The string could be a URL. -// Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is -// expected. A local file could be: ``file://localhost/path/to/table.feather``. -// -// columns : sequence, default None -// -// If not provided, all columns are read. -// -// use_threads : bool, default True -// -// Whether to parallelize reading using multiple threads. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// type of object stored in file -// -// Examples -// -------- -// >>> df = pd.read_feather("path/to/file.feather") # doctest: +SKIP -// -//go:linkname ReadFeather py.read_feather -func ReadFeather(path *py.Object, columns *py.Object, useThreads *py.Object, storageOptions *py.Object, dtypeBackend *py.Object) *py.Object - -// Load data from Google BigQuery. -// -// .. deprecated:: 2.2.0 -// -// Please use ``pandas_gbq.read_gbq`` instead. -// -// This function requires the `pandas-gbq package -// `__. -// -// See the `How to authenticate with Google BigQuery -// `__ -// guide for authentication instructions. -// -// Parameters -// ---------- -// query : str -// -// SQL-Like Query to return data values. -// -// project_id : str, optional -// -// Google BigQuery Account project ID. Optional when available from -// the environment. -// -// index_col : str, optional -// -// Name of result column to use for index in results DataFrame. -// -// col_order : list(str), optional -// -// List of BigQuery column names in the desired order for results -// DataFrame. -// -// reauth : bool, default False -// -// Force Google BigQuery to re-authenticate the user. This is useful -// if multiple accounts are used. -// -// auth_local_webserver : bool, default True -// -// Use the `local webserver flow`_ instead of the `console flow`_ -// when getting user credentials. -// -// .. _local webserver flow: -// https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_local_server -// .. _console flow: -// https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_console -// -// *New in version 0.2.0 of pandas-gbq*. -// -// .. versionchanged:: 1.5.0 -// Default value is changed to ``True``. Google has deprecated the -// ``auth_local_webserver = False`` `"out of band" (copy-paste) -// flow -// `_. -// -// dialect : str, default 'legacy' -// -// Note: The default value is changing to 'standard' in a future version. -// -// SQL syntax dialect to use. Value can be one of: -// -// ``'legacy'`` -// Use BigQuery's legacy SQL dialect. For more information see -// `BigQuery Legacy SQL Reference -// `__. -// ``'standard'`` -// Use BigQuery's standard SQL, which is -// compliant with the SQL 2011 standard. For more information -// see `BigQuery Standard SQL Reference -// `__. -// -// location : str, optional -// -// Location where the query job should run. See the `BigQuery locations -// documentation -// `__ for a -// list of available locations. The location must match that of any -// datasets used in the query. -// -// *New in version 0.5.0 of pandas-gbq*. -// -// configuration : dict, optional -// -// Query config parameters for job processing. -// For example: -// -// configuration = {'query': {'useQueryCache': False}} -// -// For more information see `BigQuery REST API Reference -// `__. -// -// credentials : google.auth.credentials.Credentials, optional -// -// Credentials for accessing Google APIs. Use this parameter to override -// default credentials, such as to use Compute Engine -// :class:`google.auth.compute_engine.Credentials` or Service Account -// :class:`google.oauth2.service_account.Credentials` directly. -// -// *New in version 0.8.0 of pandas-gbq*. -// -// use_bqstorage_api : bool, default False -// -// Use the `BigQuery Storage API -// `__ to -// download query results quickly, but at an increased cost. To use this -// API, first `enable it in the Cloud Console -// `__. -// You must also have the `bigquery.readsessions.create -// `__ -// permission on the project you are billing queries to. -// -// This feature requires version 0.10.0 or later of the ``pandas-gbq`` -// package. It also requires the ``google-cloud-bigquery-storage`` and -// ``fastavro`` packages. -// -// max_results : int, optional -// -// If set, limit the maximum number of rows to fetch from the query -// results. -// -// progress_bar_type : Optional, str -// -// If set, use the `tqdm `__ library to -// display a progress bar while the data downloads. Install the -// ``tqdm`` package to use this feature. -// -// Possible values of ``progress_bar_type`` include: -// -// ``None`` -// No progress bar. -// ``'tqdm'`` -// Use the :func:`tqdm.tqdm` function to print a progress bar -// to :data:`sys.stderr`. -// ``'tqdm_notebook'`` -// Use the :func:`tqdm.tqdm_notebook` function to display a -// progress bar as a Jupyter notebook widget. -// ``'tqdm_gui'`` -// Use the :func:`tqdm.tqdm_gui` function to display a -// progress bar as a graphical dialog box. -// -// Returns -// ------- -// df: DataFrame -// -// DataFrame representing results of query. -// -// See Also -// -------- -// pandas_gbq.read_gbq : This function in the pandas-gbq library. -// DataFrame.to_gbq : Write a DataFrame to Google BigQuery. -// -// Examples -// -------- -// Example taken from `Google BigQuery documentation -// `_ -// -// >>> sql = "SELECT name FROM table_name WHERE state = 'TX' LIMIT 100;" -// >>> df = pd.read_gbq(sql, dialect="standard") # doctest: +SKIP -// >>> project_id = "your-project-id" # doctest: +SKIP -// >>> df = pd.read_gbq(sql, -// ... project_id=project_id, -// ... dialect="standard" -// ... ) # doctest: +SKIP -// -//go:linkname ReadGbq py.read_gbq -func ReadGbq(query *py.Object, projectId *py.Object, indexCol *py.Object, colOrder *py.Object, reauth *py.Object, authLocalWebserver *py.Object, dialect *py.Object, location *py.Object, configuration *py.Object, credentials *py.Object, useBqstorageApi *py.Object, maxResults *py.Object, progressBarType *py.Object) *py.Object - -// Read HTML tables into a “list“ of “DataFrame“ objects. -// -// Parameters -// ---------- -// io : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a string ``read()`` function. -// The string can represent a URL or the HTML itself. Note that -// lxml only accepts the http, ftp and file url protocols. If you have a -// URL that starts with ``'https'`` you might try removing the ``'s'``. -// -// .. deprecated:: 2.1.0 -// Passing html literal strings is deprecated. -// Wrap literal string/bytes input in ``io.StringIO``/``io.BytesIO`` instead. -// -// match : str or compiled regular expression, optional -// -// The set of tables containing text matching this regex or string will be -// returned. Unless the HTML is extremely simple you will probably need to -// pass a non-empty string here. Defaults to '.+' (match any non-empty -// string). The default value will return all tables contained on a page. -// This value is converted to a regular expression so that there is -// consistent behavior between Beautiful Soup and lxml. -// -// flavor : {"lxml", "html5lib", "bs4"} or list-like, optional -// -// The parsing engine (or list of parsing engines) to use. 'bs4' and -// 'html5lib' are synonymous with each other, they are both there for -// backwards compatibility. The default of ``None`` tries to use ``lxml`` -// to parse and if that fails it falls back on ``bs4`` + ``html5lib``. -// -// header : int or list-like, optional -// -// The row (or list of rows for a :class:`~pandas.MultiIndex`) to use to -// make the columns headers. -// -// index_col : int or list-like, optional -// -// The column (or list of columns) to use to create the index. -// -// skiprows : int, list-like or slice, optional -// -// Number of rows to skip after parsing the column integer. 0-based. If a -// sequence of integers or a slice is given, will skip the rows indexed by -// that sequence. Note that a single element sequence means 'skip the nth -// row' whereas an integer means 'skip n rows'. -// -// attrs : dict, optional -// -// This is a dictionary of attributes that you can pass to use to identify -// the table in the HTML. These are not checked for validity before being -// passed to lxml or Beautiful Soup. However, these attributes must be -// valid HTML table attributes to work correctly. For example, :: -// -// attrs = {'id': 'table'} -// -// is a valid attribute dictionary because the 'id' HTML tag attribute is -// a valid HTML attribute for *any* HTML tag as per `this document -// `__. :: -// -// attrs = {'asdf': 'table'} -// -// is *not* a valid attribute dictionary because 'asdf' is not a valid -// HTML attribute even if it is a valid XML attribute. Valid HTML 4.01 -// table attributes can be found `here -// `__. A -// working draft of the HTML 5 spec can be found `here -// `__. It contains the -// latest information on table attributes for the modern web. -// -// parse_dates : bool, optional -// -// See :func:`~read_csv` for more details. -// -// thousands : str, optional -// -// Separator to use to parse thousands. Defaults to ``','``. -// -// encoding : str, optional -// -// The encoding used to decode the web page. Defaults to ``None``.``None`` -// preserves the previous encoding behavior, which depends on the -// underlying parser library (e.g., the parser library will try to use -// the encoding provided by the document). -// -// decimal : str, default '.' -// -// Character to recognize as decimal point (e.g. use ',' for European -// data). -// -// converters : dict, default None -// -// Dict of functions for converting values in certain columns. Keys can -// either be integers or column labels, values are functions that take one -// input argument, the cell (not column) content, and return the -// transformed content. -// -// na_values : iterable, default None -// -// Custom NA values. -// -// keep_default_na : bool, default True -// -// If na_values are specified and keep_default_na is False the default NaN -// values are overridden, otherwise they're appended to. -// -// displayed_only : bool, default True -// -// Whether elements with "display: none" should be parsed. -// -// extract_links : {None, "all", "header", "body", "footer"} -// -// Table elements in the specified section(s) with tags will have their -// href extracted. -// -// .. versionadded:: 1.5.0 -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// .. versionadded:: 2.1.0 -// -// Returns -// ------- -// dfs -// -// A list of DataFrames. -// -// See Also -// -------- -// read_csv : Read a comma-separated values (csv) file into DataFrame. -// -// Notes -// ----- -// Before using this function you should read the :ref:`gotchas about the -// HTML parsing libraries `. -// -// Expect to do some cleanup after you call this function. For example, you -// might need to manually assign column names if the column names are -// converted to NaN when you pass the `header=0` argument. We try to assume as -// little as possible about the structure of the table and push the -// idiosyncrasies of the HTML contained in the table to the user. -// -// This function searches for ““ elements and only for ““ -// and ““ or ““ argument, it is used to construct -// the header, otherwise the function attempts to find the header within -// the body (by putting rows with only “
“ rows and ““ elements within each “
“ -// element in the table. ““ stands for "table data". This function -// attempts to properly handle “colspan“ and “rowspan“ attributes. -// If the function has a “
“ elements into the header). -// -// Similar to :func:`~read_csv` the `header` argument is applied -// **after** `skiprows` is applied. -// -// This function will *always* return a list of :class:`DataFrame` *or* -// it will fail, e.g., it will *not* return an empty list. -// -// Examples -// -------- -// See the :ref:`read_html documentation in the IO section of the docs -// ` for some examples of reading in HTML tables. -// -//go:linkname ReadHtml py.read_html -func ReadHtml(io *py.Object) *py.Object - -// Read XML document into a :class:`~pandas.DataFrame` object. -// -// .. versionadded:: 1.3.0 -// -// Parameters -// ---------- -// path_or_buffer : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a ``read()`` function. The string can be any valid XML -// string or a path. The string can further be a URL. Valid URL schemes -// include http, ftp, s3, and file. -// -// .. deprecated:: 2.1.0 -// Passing xml literal strings is deprecated. -// Wrap literal xml input in ``io.StringIO`` or ``io.BytesIO`` instead. -// -// xpath : str, optional, default './\*' -// -// The ``XPath`` to parse required set of nodes for migration to -// :class:`~pandas.DataFrame`.``XPath`` should return a collection of elements -// and not a single element. Note: The ``etree`` parser supports limited ``XPath`` -// expressions. For more complex ``XPath``, use ``lxml`` which requires -// installation. -// -// namespaces : dict, optional -// -// The namespaces defined in XML document as dicts with key being -// namespace prefix and value the URI. There is no need to include all -// namespaces in XML, only the ones used in ``xpath`` expression. -// Note: if XML document uses default namespace denoted as -// `xmlns=''` without a prefix, you must assign any temporary -// namespace prefix such as 'doc' to the URI in order to parse -// underlying nodes and/or attributes. For example, :: -// -// namespaces = {"doc": "https://example.com"} -// -// elems_only : bool, optional, default False -// -// Parse only the child elements at the specified ``xpath``. By default, -// all child elements and non-empty text nodes are returned. -// -// attrs_only : bool, optional, default False -// -// Parse only the attributes at the specified ``xpath``. -// By default, all attributes are returned. -// -// names : list-like, optional -// -// Column names for DataFrame of parsed XML data. Use this parameter to -// rename original element names and distinguish same named elements and -// attributes. -// -// dtype : Type name or dict of column -> type, optional -// -// Data type for data or columns. E.g. {'a': np.float64, 'b': np.int32, -// 'c': 'Int64'} -// Use `str` or `object` together with suitable `na_values` settings -// to preserve and not interpret dtype. -// If converters are specified, they will be applied INSTEAD -// of dtype conversion. -// -// .. versionadded:: 1.5.0 -// -// converters : dict, optional -// -// Dict of functions for converting values in certain columns. Keys can either -// be integers or column labels. -// -// .. versionadded:: 1.5.0 -// -// parse_dates : bool or list of int or names or list of lists or dict, default False -// -// Identifiers to parse index or columns to datetime. The behavior is as follows: -// -// * boolean. If True -> try parsing the index. -// * list of int or names. e.g. If [1, 2, 3] -> try parsing columns 1, 2, 3 -// each as a separate date column. -// * list of lists. e.g. If [[1, 3]] -> combine columns 1 and 3 and parse as -// a single date column. -// * dict, e.g. {'foo' : [1, 3]} -> parse columns 1, 3 as date and call -// result 'foo' -// -// .. versionadded:: 1.5.0 -// -// encoding : str, optional, default 'utf-8' -// -// Encoding of XML document. -// -// parser : {'lxml','etree'}, default 'lxml' -// -// Parser module to use for retrieval of data. Only 'lxml' and -// 'etree' are supported. With 'lxml' more complex ``XPath`` searches -// and ability to use XSLT stylesheet are supported. -// -// stylesheet : str, path object or file-like object -// -// A URL, file-like object, or a raw string containing an XSLT script. -// This stylesheet should flatten complex, deeply nested XML documents -// for easier parsing. To use this feature you must have ``lxml`` module -// installed and specify 'lxml' as ``parser``. The ``xpath`` must -// reference nodes of transformed XML document generated after XSLT -// transformation and not the original XML document. Only XSLT 1.0 -// scripts and not later versions is currently supported. -// -// iterparse : dict, optional -// -// The nodes or attributes to retrieve in iterparsing of XML document -// as a dict with key being the name of repeating element and value being -// list of elements or attribute names that are descendants of the repeated -// element. Note: If this option is used, it will replace ``xpath`` parsing -// and unlike ``xpath``, descendants do not need to relate to each other but can -// exist any where in document under the repeating element. This memory- -// efficient method should be used for very large XML files (500MB, 1GB, or 5GB+). -// For example, :: -// -// iterparse = {"row_element": ["child_elem", "attr", "grandchild_elem"]} -// -// .. versionadded:: 1.5.0 -// -// compression : str or dict, default 'infer' -// -// For on-the-fly decompression of on-disk data. If 'infer' and 'path_or_buffer' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. -// Set to ``None`` for no decompression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for Zstandard decompression using a -// custom compression dictionary: -// ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// .. versionchanged:: 1.4.0 Zstandard support. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// df -// -// A DataFrame. -// -// See Also -// -------- -// read_json : Convert a JSON string to pandas object. -// read_html : Read HTML tables into a list of DataFrame objects. -// -// Notes -// ----- -// This method is best designed to import shallow XML documents in -// following format which is the ideal fit for the two-dimensions of a -// “DataFrame“ (row by column). :: -// -// -// -// data -// data -// data -// ... -// -// -// ... -// -// ... -// -// -// As a file format, XML documents can be designed any way including -// layout of elements and attributes as long as it conforms to W3C -// specifications. Therefore, this method is a convenience handler for -// a specific flatter design and not all possible XML structures. -// -// However, for more complex XML documents, “stylesheet“ allows you to -// temporarily redesign original document with XSLT (a special purpose -// language) for a flatter version for migration to a DataFrame. -// -// This function will *always* return a single :class:`DataFrame` or raise -// exceptions due to issues with XML document, “xpath“, or other -// parameters. -// -// See the :ref:`read_xml documentation in the IO section of the docs -// ` for more information in using this method to parse XML -// files to DataFrames. -// -// Examples -// -------- -// >>> from io import StringIO -// >>> xml = ”' -// ... -// ... -// ... square -// ... 360 -// ... 4.0 -// ... -// ... -// ... circle -// ... 360 -// ... -// ... -// ... -// ... triangle -// ... 180 -// ... 3.0 -// ... -// ... ”' -// -// >>> df = pd.read_xml(StringIO(xml)) -// >>> df -// -// shape degrees sides -// -// 0 square 360 4.0 -// 1 circle 360 NaN -// 2 triangle 180 3.0 -// -// >>> xml = ”' -// ... -// ... -// ... -// ... -// ... ”' -// -// >>> df = pd.read_xml(StringIO(xml), xpath=".//row") -// >>> df -// -// shape degrees sides -// -// 0 square 360 4.0 -// 1 circle 360 NaN -// 2 triangle 180 3.0 -// -// >>> xml = ”' -// ... -// ... -// ... square -// ... 360 -// ... 4.0 -// ... -// ... -// ... circle -// ... 360 -// ... -// ... -// ... -// ... triangle -// ... 180 -// ... 3.0 -// ... -// ... ”' -// -// >>> df = pd.read_xml(StringIO(xml), -// ... xpath="//doc:row", -// ... namespaces={"doc": "https://example.com"}) -// >>> df -// -// shape degrees sides -// -// 0 square 360 4.0 -// 1 circle 360 NaN -// 2 triangle 180 3.0 -// -// >>> xml_data = ”' -// ... -// ... -// ... 0 -// ... 1 -// ... 2.5 -// ... True -// ... a -// ... 2019-12-31 00:00:00 -// ... -// ... -// ... 1 -// ... 4.5 -// ... False -// ... b -// ... 2019-12-31 00:00:00 -// ... -// ... -// ... ”' -// -// >>> df = pd.read_xml(StringIO(xml_data), -// ... dtype_backend="numpy_nullable", -// ... parse_dates=["e"]) -// >>> df -// -// index a b c d e -// -// 0 0 1 2.5 True a 2019-12-31 -// 1 1 4.5 False b 2019-12-31 -// -//go:linkname ReadXml py.read_xml -func ReadXml(pathOrBuffer *py.Object) *py.Object - -// Convert a JSON string to pandas object. -// -// Parameters -// ---------- -// path_or_buf : a valid JSON str, path object or file-like object -// -// Any valid string path is acceptable. The string could be a URL. Valid -// URL schemes include http, ftp, s3, and file. For file URLs, a host is -// expected. A local file could be: -// ``file://localhost/path/to/table.json``. -// -// If you want to pass in a path object, pandas accepts any -// ``os.PathLike``. -// -// By file-like object, we refer to objects with a ``read()`` method, -// such as a file handle (e.g. via builtin ``open`` function) -// or ``StringIO``. -// -// .. deprecated:: 2.1.0 -// Passing json literal strings is deprecated. -// -// orient : str, optional -// -// Indication of expected JSON string format. -// Compatible JSON strings can be produced by ``to_json()`` with a -// corresponding orient value. -// The set of possible orients is: -// -// - ``'split'`` : dict like -// ``{index -> [index], columns -> [columns], data -> [values]}`` -// - ``'records'`` : list like -// ``[{column -> value}, ... , {column -> value}]`` -// - ``'index'`` : dict like ``{index -> {column -> value}}`` -// - ``'columns'`` : dict like ``{column -> {index -> value}}`` -// - ``'values'`` : just the values array -// - ``'table'`` : dict like ``{'schema': {schema}, 'data': {data}}`` -// -// The allowed and default values depend on the value -// of the `typ` parameter. -// -// * when ``typ == 'series'``, -// -// - allowed orients are ``{'split','records','index'}`` -// - default is ``'index'`` -// - The Series index must be unique for orient ``'index'``. -// -// * when ``typ == 'frame'``, -// -// - allowed orients are ``{'split','records','index', -// 'columns','values', 'table'}`` -// - default is ``'columns'`` -// - The DataFrame index must be unique for orients ``'index'`` and -// ``'columns'``. -// - The DataFrame columns must be unique for orients ``'index'``, -// ``'columns'``, and ``'records'``. -// -// typ : {'frame', 'series'}, default 'frame' -// -// The type of object to recover. -// -// dtype : bool or dict, default None -// -// If True, infer dtypes; if a dict of column to dtype, then use those; -// if False, then don't infer dtypes at all, applies only to the data. -// -// For all ``orient`` values except ``'table'``, default is True. -// -// convert_axes : bool, default None -// -// Try to convert the axes to the proper dtypes. -// -// For all ``orient`` values except ``'table'``, default is True. -// -// convert_dates : bool or list of str, default True -// -// If True then default datelike columns may be converted (depending on -// keep_default_dates). -// If False, no dates will be converted. -// If a list of column names, then those columns will be converted and -// default datelike columns may also be converted (depending on -// keep_default_dates). -// -// keep_default_dates : bool, default True -// -// If parsing dates (convert_dates is not False), then try to parse the -// default datelike columns. -// A column label is datelike if -// -// * it ends with ``'_at'``, -// -// * it ends with ``'_time'``, -// -// * it begins with ``'timestamp'``, -// -// * it is ``'modified'``, or -// -// * it is ``'date'``. -// -// precise_float : bool, default False -// -// Set to enable usage of higher precision (strtod) function when -// decoding string to double values. Default (False) is to use fast but -// less precise builtin functionality. -// -// date_unit : str, default None -// -// The timestamp unit to detect if converting dates. The default behaviour -// is to try and detect the correct precision, but if this is not desired -// then pass one of 's', 'ms', 'us' or 'ns' to force parsing only seconds, -// milliseconds, microseconds or nanoseconds respectively. -// -// encoding : str, default is 'utf-8' -// -// The encoding to use to decode py3 bytes. -// -// encoding_errors : str, optional, default "strict" -// -// How encoding errors are treated. `List of possible values -// `_ . -// -// .. versionadded:: 1.3.0 -// -// lines : bool, default False -// -// Read the file as a json object per line. -// -// chunksize : int, optional -// -// Return JsonReader object for iteration. -// See the `line-delimited json docs -// `_ -// for more information on ``chunksize``. -// This can only be passed if `lines=True`. -// If this is None, the file will be read into memory all at once. -// -// compression : str or dict, default 'infer' -// -// For on-the-fly decompression of on-disk data. If 'infer' and 'path_or_buf' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. -// Set to ``None`` for no decompression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for Zstandard decompression using a -// custom compression dictionary: -// ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// .. versionchanged:: 1.4.0 Zstandard support. -// -// nrows : int, optional -// -// The number of lines from the line-delimited jsonfile that has to be read. -// This can only be passed if `lines=True`. -// If this is None, all the rows will be returned. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// engine : {"ujson", "pyarrow"}, default "ujson" -// -// Parser engine to use. The ``"pyarrow"`` engine is only available when -// ``lines=True``. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// Series, DataFrame, or pandas.api.typing.JsonReader -// -// A JsonReader is returned when ``chunksize`` is not ``0`` or ``None``. -// Otherwise, the type returned depends on the value of ``typ``. -// -// See Also -// -------- -// DataFrame.to_json : Convert a DataFrame to a JSON string. -// Series.to_json : Convert a Series to a JSON string. -// json_normalize : Normalize semi-structured JSON data into a flat table. -// -// Notes -// ----- -// Specific to “orient='table'“, if a :class:`DataFrame` with a literal -// :class:`Index` name of `index` gets written with :func:`to_json`, the -// subsequent read operation will incorrectly set the :class:`Index` name to -// “None“. This is because `index` is also used by :func:`DataFrame.to_json` -// to denote a missing :class:`Index` name, and the subsequent -// :func:`read_json` operation cannot distinguish between the two. The same -// limitation is encountered with a :class:`MultiIndex` and any names -// beginning with “'level_'“. -// -// Examples -// -------- -// >>> from io import StringIO -// >>> df = pd.DataFrame([['a', 'b'], ['c', 'd']], -// ... index=['row 1', 'row 2'], -// ... columns=['col 1', 'col 2']) -// -// Encoding/decoding a Dataframe using “'split'“ formatted JSON: -// -// >>> df.to_json(orient='split') -// -// '{"columns":["col 1","col 2"],"index":["row 1","row 2"],"data":[["a","b"],["c","d"]]}' -// -// >>> pd.read_json(StringIO(_), orient='split') -// -// col 1 col 2 -// -// row 1 a b -// row 2 c d -// -// Encoding/decoding a Dataframe using “'index'“ formatted JSON: -// -// >>> df.to_json(orient='index') -// '{"row 1":{"col 1":"a","col 2":"b"},"row 2":{"col 1":"c","col 2":"d"}}' -// -// >>> pd.read_json(StringIO(_), orient='index') -// -// col 1 col 2 -// -// row 1 a b -// row 2 c d -// -// Encoding/decoding a Dataframe using “'records'“ formatted JSON. -// Note that index labels are not preserved with this encoding. -// -// >>> df.to_json(orient='records') -// '[{"col 1":"a","col 2":"b"},{"col 1":"c","col 2":"d"}]' -// >>> pd.read_json(StringIO(_), orient='records') -// -// col 1 col 2 -// -// 0 a b -// 1 c d -// -// # Encoding with Table Schema -// -// >>> df.to_json(orient='table') -// -// '{"schema":{"fields":[{"name":"index","type":"string"},{"name":"col 1","type":"string"},{"name":"col 2","type":"string"}],"primaryKey":["index"],"pandas_version":"1.4.0"},"data":[{"index":"row 1","col 1":"a","col 2":"b"},{"index":"row 2","col 1":"c","col 2":"d"}]}' -// -// The following example uses “dtype_backend="numpy_nullable"“ -// -// >>> data = ”'{"index": {"0": 0, "1": 1}, -// ... "a": {"0": 1, "1": null}, -// ... "b": {"0": 2.5, "1": 4.5}, -// ... "c": {"0": true, "1": false}, -// ... "d": {"0": "a", "1": "b"}, -// ... "e": {"0": 1577.2, "1": 1577.1}}”' -// >>> pd.read_json(StringIO(data), dtype_backend="numpy_nullable") -// -// index a b c d e -// -// 0 0 1 2.5 True a 1577.2 -// 1 1 4.5 False b 1577.1 -// -//go:linkname ReadJson py.read_json -func ReadJson(pathOrBuf *py.Object) *py.Object - -// Read Stata file into DataFrame. -// -// Parameters -// ---------- -// filepath_or_buffer : str, path object or file-like object -// -// Any valid string path is acceptable. The string could be a URL. Valid -// URL schemes include http, ftp, s3, and file. For file URLs, a host is -// expected. A local file could be: ``file://localhost/path/to/table.dta``. -// -// If you want to pass in a path object, pandas accepts any ``os.PathLike``. -// -// By file-like object, we refer to objects with a ``read()`` method, -// such as a file handle (e.g. via builtin ``open`` function) -// or ``StringIO``. -// -// convert_dates : bool, default True -// -// Convert date variables to DataFrame time values. -// -// convert_categoricals : bool, default True -// -// Read value labels and convert columns to Categorical/Factor variables. -// -// index_col : str, optional -// -// Column to set as index. -// -// convert_missing : bool, default False -// -// Flag indicating whether to convert missing values to their Stata -// representations. If False, missing values are replaced with nan. -// If True, columns containing missing values are returned with -// object data types and missing values are represented by -// StataMissingValue objects. -// -// preserve_dtypes : bool, default True -// -// Preserve Stata datatypes. If False, numeric data are upcast to pandas -// default types for foreign data (float64 or int64). -// -// columns : list or None -// -// Columns to retain. Columns will be returned in the given order. None -// returns all columns. -// -// order_categoricals : bool, default True -// -// Flag indicating whether converted categorical data are ordered. -// -// chunksize : int, default None -// -// Return StataReader object for iterations, returns chunks with -// given number of lines. -// -// iterator : bool, default False -// -// Return StataReader object. -// -// compression : str or dict, default 'infer' -// -// For on-the-fly decompression of on-disk data. If 'infer' and 'filepath_or_buffer' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. -// Set to ``None`` for no decompression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for Zstandard decompression using a -// custom compression dictionary: -// ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// storage_options : dict, optional -// -// Extra options that make sense for a particular storage connection, e.g. -// host, port, username, password, etc. For HTTP(S) URLs the key-value pairs -// are forwarded to ``urllib.request.Request`` as header options. For other -// URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are -// forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more -// details, and for more examples on storage options refer `here -// `_. -// -// Returns -// ------- -// DataFrame or pandas.api.typing.StataReader -// -// See Also -// -------- -// io.stata.StataReader : Low-level reader for Stata data files. -// DataFrame.to_stata: Export Stata data files. -// -// Notes -// ----- -// Categorical variables read through an iterator may not have the same -// categories and dtype. This occurs when a variable stored in a DTA -// file is associated to an incomplete set of value labels that only -// label a strict subset of the values. -// -// Examples -// -------- -// -// # Creating a dummy stata for this example -// -// >>> df = pd.DataFrame({'animal': ['falcon', 'parrot', 'falcon', 'parrot'], -// ... 'speed': [350, 18, 361, 15]}) # doctest: +SKIP -// >>> df.to_stata('animals.dta') # doctest: +SKIP -// -// Read a Stata dta file: -// -// >>> df = pd.read_stata('animals.dta') # doctest: +SKIP -// -// Read a Stata dta file in 10,000 line chunks: -// -// >>> values = np.random.randint(0, 10, size=(20_000, 1), dtype="uint8") # doctest: +SKIP -// >>> df = pd.DataFrame(values, columns=["i"]) # doctest: +SKIP -// >>> df.to_stata('filename.dta') # doctest: +SKIP -// -// >>> with pd.read_stata('filename.dta', chunksize=10000) as itr: # doctest: +SKIP -// >>> for chunk in itr: -// ... # Operate on a single chunk, e.g., chunk.mean() -// ... pass # doctest: +SKIP -// -//go:linkname ReadStata py.read_stata -func ReadStata(filepathOrBuffer *py.Object) *py.Object - -// Read SAS files stored as either XPORT or SAS7BDAT format files. -// -// Parameters -// ---------- -// filepath_or_buffer : str, path object, or file-like object -// -// String, path object (implementing ``os.PathLike[str]``), or file-like -// object implementing a binary ``read()`` function. The string could be a URL. -// Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is -// expected. A local file could be: -// ``file://localhost/path/to/table.sas7bdat``. -// -// format : str {'xport', 'sas7bdat'} or None -// -// If None, file format is inferred from file extension. If 'xport' or -// 'sas7bdat', uses the corresponding format. -// -// index : identifier of index column, defaults to None -// -// Identifier of column that should be used as index of the DataFrame. -// -// encoding : str, default is None -// -// Encoding for text data. If None, text data are stored as raw bytes. -// -// chunksize : int -// -// Read file `chunksize` lines at a time, returns iterator. -// -// iterator : bool, defaults to False -// -// If True, returns an iterator for reading the file incrementally. -// -// compression : str or dict, default 'infer' -// -// For on-the-fly decompression of on-disk data. If 'infer' and 'filepath_or_buffer' is -// path-like, then detect compression from the following extensions: '.gz', -// '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' -// (otherwise no compression). -// If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. -// Set to ``None`` for no decompression. -// Can also be a dict with key ``'method'`` set -// to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and -// other key-value pairs are forwarded to -// ``zipfile.ZipFile``, ``gzip.GzipFile``, -// ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or -// ``tarfile.TarFile``, respectively. -// As an example, the following could be passed for Zstandard decompression using a -// custom compression dictionary: -// ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``. -// -// .. versionadded:: 1.5.0 -// Added support for `.tar` files. -// -// Returns -// ------- -// DataFrame if iterator=False and chunksize=None, else SAS7BDATReader -// or XportReader -// -// Examples -// -------- -// >>> df = pd.read_sas("sas_data.sas7bdat") # doctest: +SKIP -// -//go:linkname ReadSas py.read_sas -func ReadSas(filepathOrBuffer *py.Object) *py.Object - -// Load an SPSS file from the file path, returning a DataFrame. -// -// Parameters -// ---------- -// path : str or Path -// -// File path. -// -// usecols : list-like, optional -// -// Return a subset of the columns. If None, return all columns. -// -// convert_categoricals : bool, default is True -// -// Convert categorical columns into pd.Categorical. -// -// dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable' -// -// Back-end data type applied to the resultant :class:`DataFrame` -// (still experimental). Behaviour is as follows: -// -// * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` -// (default). -// * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` -// DataFrame. -// -// .. versionadded:: 2.0 -// -// Returns -// ------- -// DataFrame -// -// Examples -// -------- -// >>> df = pd.read_spss("spss_data.sav") # doctest: +SKIP -// -//go:linkname ReadSpss py.read_spss -func ReadSpss(path *py.Object, usecols *py.Object, convertCategoricals *py.Object, dtypeBackend *py.Object) *py.Object - -// Normalize semi-structured JSON data into a flat table. -// -// Parameters -// ---------- -// data : dict or list of dicts -// -// Unserialized JSON objects. -// -// record_path : str or list of str, default None -// -// Path in each object to list of records. If not passed, data will be -// assumed to be an array of records. -// -// meta : list of paths (str or list of str), default None -// -// Fields to use as metadata for each record in resulting table. -// -// meta_prefix : str, default None -// -// If True, prefix records with dotted (?) path, e.g. foo.bar.field if -// meta is ['foo', 'bar']. -// -// record_prefix : str, default None -// -// If True, prefix records with dotted (?) path, e.g. foo.bar.field if -// path to records is ['foo', 'bar']. -// -// errors : {'raise', 'ignore'}, default 'raise' -// -// Configures error handling. -// -// * 'ignore' : will ignore KeyError if keys listed in meta are not -// always present. -// * 'raise' : will raise KeyError if keys listed in meta are not -// always present. -// -// sep : str, default '.' -// -// Nested records will generate names separated by sep. -// e.g., for sep='.', {'foo': {'bar': 0}} -> foo.bar. -// -// max_level : int, default None -// -// Max number of levels(depth of dict) to normalize. -// if None, normalizes all levels. -// -// Returns -// ------- -// frame : DataFrame -// Normalize semi-structured JSON data into a flat table. -// -// Examples -// -------- -// >>> data = [ -// ... {"id": 1, "name": {"first": "Coleen", "last": "Volk"}}, -// ... {"name": {"given": "Mark", "family": "Regner"}}, -// ... {"id": 2, "name": "Faye Raker"}, -// ... ] -// >>> pd.json_normalize(data) -// -// id name.first name.last name.given name.family name -// -// 0 1.0 Coleen Volk NaN NaN NaN -// 1 NaN NaN NaN Mark Regner NaN -// 2 2.0 NaN NaN NaN NaN Faye Raker -// -// >>> data = [ -// ... { -// ... "id": 1, -// ... "name": "Cole Volk", -// ... "fitness": {"height": 130, "weight": 60}, -// ... }, -// ... {"name": "Mark Reg", "fitness": {"height": 130, "weight": 60}}, -// ... { -// ... "id": 2, -// ... "name": "Faye Raker", -// ... "fitness": {"height": 130, "weight": 60}, -// ... }, -// ... ] -// >>> pd.json_normalize(data, max_level=0) -// -// id name fitness -// -// 0 1.0 Cole Volk {'height': 130, 'weight': 60} -// 1 NaN Mark Reg {'height': 130, 'weight': 60} -// 2 2.0 Faye Raker {'height': 130, 'weight': 60} -// -// Normalizes nested data up to level 1. -// -// >>> data = [ -// ... { -// ... "id": 1, -// ... "name": "Cole Volk", -// ... "fitness": {"height": 130, "weight": 60}, -// ... }, -// ... {"name": "Mark Reg", "fitness": {"height": 130, "weight": 60}}, -// ... { -// ... "id": 2, -// ... "name": "Faye Raker", -// ... "fitness": {"height": 130, "weight": 60}, -// ... }, -// ... ] -// >>> pd.json_normalize(data, max_level=1) -// -// id name fitness.height fitness.weight -// -// 0 1.0 Cole Volk 130 60 -// 1 NaN Mark Reg 130 60 -// 2 2.0 Faye Raker 130 60 -// -// >>> data = [ -// ... { -// ... "state": "Florida", -// ... "shortname": "FL", -// ... "info": {"governor": "Rick Scott"}, -// ... "counties": [ -// ... {"name": "Dade", "population": 12345}, -// ... {"name": "Broward", "population": 40000}, -// ... {"name": "Palm Beach", "population": 60000}, -// ... ], -// ... }, -// ... { -// ... "state": "Ohio", -// ... "shortname": "OH", -// ... "info": {"governor": "John Kasich"}, -// ... "counties": [ -// ... {"name": "Summit", "population": 1234}, -// ... {"name": "Cuyahoga", "population": 1337}, -// ... ], -// ... }, -// ... ] -// >>> result = pd.json_normalize( -// ... data, "counties", ["state", "shortname", ["info", "governor"]] -// ... ) -// >>> result -// -// name population state shortname info.governor -// -// 0 Dade 12345 Florida FL Rick Scott -// 1 Broward 40000 Florida FL Rick Scott -// 2 Palm Beach 60000 Florida FL Rick Scott -// 3 Summit 1234 Ohio OH John Kasich -// 4 Cuyahoga 1337 Ohio OH John Kasich -// -// >>> data = {"A": [1, 2]} -// >>> pd.json_normalize(data, "A", record_prefix="Prefix.") -// -// Prefix.0 -// -// 0 1 -// 1 2 -// -// Returns normalized data with columns prefixed with the given string. -// -//go:linkname JsonNormalize py.json_normalize -func JsonNormalize(data *py.Object, recordPath *py.Object, meta *py.Object, metaPrefix *py.Object, recordPrefix *py.Object, errors *py.Object, sep *py.Object, maxLevel *py.Object) *py.Object - -// Run the pandas test suite using pytest. -// -// By default, runs with the marks -m "not slow and not network and not db" -// -// Parameters -// ---------- -// extra_args : list[str], default None -// -// Extra marks to run the tests. -// -// run_doctests : bool, default False -// -// Whether to only run the Python and Cython doctests. If you would like to run -// both doctests/regular tests, just append "--doctest-modules"/"--doctest-cython" -// to extra_args. -// -// Examples -// -------- -// >>> pd.test() # doctest: +SKIP -// running: pytest... -// -//go:linkname Test py.test -func Test(extraArgs *py.Object, runDoctests *py.Object) *py.Object diff --git a/py/pandas/pandas.go b/py/pandas/pandas.go deleted file mode 100644 index abc798a2..00000000 --- a/py/pandas/pandas.go +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pandas - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -// https://pandas.pydata.org/docs/reference/index.html - -// read_excel(io, sheet_name=0, *, header=0, names=None, index_col=None, usecols=None, -// dtype=None, engine=None, converters=None, true_values=None, false_values=None, -// skiprows=None, nrows=None, na_values=None, keep_default_na=True, na_filter=True, -// verbose=False, parse_dates=False, date_parser=_NoDefault.no_default, date_format=None, -// thousands=None, decimal='.', comment=None, skipfooter=0, storage_options=None, -// dtype_backend=_NoDefault.no_default, engine_kwargs=None) -// -// See https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html -// -//go:linkname ReadExcel py.read_excel -func ReadExcel(io, sheetName *py.Object) *py.Object - -// See https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html -// -//go:linkname ReadCsv py.read_csv -func ReadCsv(filepathOrBuffer *py.Object) *py.Object - -// eval(expr, parser='pandas', engine=None, local_dict=None, global_dict=None, resolvers=(), -// level=0, target=None, inplace=False) -// -// See https://pandas.pydata.org/docs/reference/api/pandas.eval.html#pandas.eval -// -//go:linkname Eval py.eval -func Eval(expr, parser, engine, localDict, globalDict, resolvers, level, target, inplace *py.Object) *py.Object - -// show_versions(as_json=False) -// -// See https://pandas.pydata.org/docs/reference/api/pandas.show_versions.html -// -//go:linkname ShowVersions py.show_versions -func ShowVersions(asJson *py.Object) *py.Object diff --git a/py/python.go b/py/python.go deleted file mode 100644 index 0d20a685..00000000 --- a/py/python.go +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -const ( - LLGoFiles = "_pyg/module.c" - LLGoPackage = "link: $LLGO_LIB_PYTHON; $(pkg-config --libs python3-embed)" -) - -// ----------------------------------------------------------------------------- - -//go:linkname SetProgramName C.Py_SetProgramName -func SetProgramName(name *c.Char) - -//go:linkname Initialize C.Py_Initialize -func Initialize() - -// This function works like Initialize() if initsigs is 1. -// If initsigs is 0, it skips initialization registration of signal handlers, -// which might be useful when Python is embedded. -// -//go:linkname InitializeEx C.Py_InitializeEx -func InitializeEx(initsigs c.Int) - -//go:linkname Finalize C.Py_Finalize -func Finalize() - -// ----------------------------------------------------------------------------- - -//go:linkname RunSimpleString C.PyRun_SimpleString -func RunSimpleString(command *c.Char) c.Int - -//go:linkname RunSimpleStringFlags C.PyRun_SimpleStringFlags -func RunSimpleStringFlags(command *c.Char, flags *CompilerFlags) c.Int - -//go:linkname RunSimpleFile C.PyRun_SimpleFile -func RunSimpleFile(fp c.FilePtr, filename *c.Char) c.Int - -//go:linkname RunSimpleFileFlags C.PyRun_SimpleFileFlags -func RunSimpleFileFlags(fp c.FilePtr, filename *c.Char, flags *CompilerFlags) c.Int - -// ----------------------------------------------------------------------------- - -type InputType c.Int - -const ( - SingleInput InputType = 256 // read code from i/o - FileInput InputType = 257 // read code from filename - EvalInput InputType = 258 // read code from string - // FuncTypeInput InputType = 345 -) - -// llgo:type C -type CompilerFlags struct { - CfFlags c.Int -} - -//go:linkname CompileString C.Py_CompileString -func CompileString(str, filename *c.Char, start InputType) *Object - -//go:linkname CompileStringFlags C.Py_CompileStringFlags -func CompileStringFlags(str, filename *c.Char, start InputType, flags *CompilerFlags) *Object - -//go:linkname CompileStringExFlags C.Py_CompileStringExFlags -func CompileStringExFlags(str, filename *c.Char, start InputType, flags *CompilerFlags, optimize c.Int) *Object - -// Parse and compile the Python source code in str, returning the resulting code object. -// The start token is given by start; this can be used to constrain the code which can be -// compiled and should be py.EvalInput, py.FileInput, or py.SingleInput. The filename -// specified by filename is used to construct the code object and may appear in tracebacks -// or SyntaxError exception messages. This returns NULL if the code cannot be parsed or -// compiled. -// -// The integer optimize specifies the optimization level of the compiler; a value of -1 -// selects the optimization level of the interpreter as given by -O options. Explicit levels -// are 0 (no optimization; __debug__ is true), 1 (asserts are removed, __debug__ is false) or -// 2 (docstrings are removed too). -// -//go:linkname CompileStringObject C.Py_CompileStringObject -func CompileStringObject(str *c.Char, filename *Object, start InputType, flags *CompilerFlags, optimize c.Int) *Object - -// ----------------------------------------------------------------------------- - -// This is a simplified interface to EvalCodeEx, with just the code object, and global and -// local variables. The other arguments are set to nil. -// -//go:linkname EvalCode C.PyEval_EvalCode -func EvalCode(code, globals, locals *Object) *Object - -// Evaluate a precompiled code object, given a particular environment for its evaluation. -// This environment consists of a dictionary of global variables, a mapping object of local -// variables, arrays of arguments, keywords and defaults, a dictionary of default values for -// keyword-only arguments and a closure tuple of cells. -// -//go:linkname EvalCodeEx C.PyEval_EvalCodeEx -func EvalCodeEx( - code, globals, locals *Object, - args *Object, argcount c.Int, kws *Object, kwcount c.Int, - defs *Object, defcount c.Int, kwdefs, closure *Object) *Object - -// ----------------------------------------------------------------------------- diff --git a/py/set.go b/py/set.go deleted file mode 100644 index f0f50909..00000000 --- a/py/set.go +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/set.html - -// Return a new set containing objects returned by the iterable. The iterable -// may be nil to create a new empty set. Return the new set on success or nil -// on failure. set a TypeError exception if iterable is not actually iterable. -// The constructor is also useful for copying a set (c=set(s)). -// -//go:linkname NewSet C.PySet_New -func NewSet(iterable *Object) *Object { return nil } - -// Return the length of a set or frozenset object. Equivalent to len(anyset). -// Set a SystemError if anyset is not a set, frozenset, or an instance of a -// subtype. -// -// llgo:link (*Object).SetLen C.PySet_Size -func (s *Object) SetLen() int { return 0 } - -// Return 1 if found, 0 if not found, and -1 if an error is encountered. -// Unlike the Python __contains__() method, this function does not automatically -// convert unhashable sets into temporary frozensets. Set a TypeError if the key -// is unhashable. Set SystemError if s is not a set, frozenset, or an instance -// of a subtype. -// -// llgo:link (*Object).SetContains C.PySet_Contains -func (s *Object) SetContains(key *Object) int { return 0 } - -// Add key to a set instance. Also works with frozenset instances (like -// PyTuple_SetItem() it can be used to fill in the values of brand new -// frozensets before they are exposed to other code). Return 0 on success or -1 -// on failure. Set a TypeError if the key is unhashable. Set a MemoryError if -// there is no room to grow. Set a SystemError if set is not an instance of set -// or its subtype. -// -// llgo:link (*Object).SetAdd C.PySet_Add -func (s *Object) SetAdd(key *Object) int { return 0 } - -// Return 1 if found and removed, 0 if not found (no action taken), and -1 if an -// error is encountered. Does not set KeyError for missing keys. set a TypeError -// if the key is unhashable. Unlike the Python discard() method, this function -// does not automatically convert unhashable sets into temporary frozensets. -// Set SystemError if set is not an instance of set or its subtype. -// -// llgo:link (*Object).SetDiscard C.PySet_Discard -func (s *Object) SetDiscard(key *Object) int { return 0 } - -// Return a new reference to an arbitrary object in the set, and removes the -// object from the set. Return nil on failure. Set KeyError if the set is empty. -// Set a SystemError if set is not an instance of set or its subtype. -// -// llgo:link (*Object).SetPop C.PySet_Pop -func (s *Object) SetPop() *Object { return nil } - -// Empty an existing set of all elements. Return 0 on success. Return -1 and -// set SystemError if set is not an instance of set or its subtype. -// -// llgo:link (*Object).SetClear C.PySet_Clear -func (s *Object) SetClear() *Object { return nil } diff --git a/py/statistics/gen.go b/py/statistics/gen.go deleted file mode 100644 index 65e77046..00000000 --- a/py/statistics/gen.go +++ /dev/null @@ -1,401 +0,0 @@ -package statistics - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.statistics" - -// Error function at x. -// -//go:linkname Erf py.erf -func Erf(x *py.Object) *py.Object - -// Return the sample arithmetic mean of data. -// -// >>> mean([1, 2, 3, 4, 4]) -// 2.8 -// -// >>> from fractions import Fraction as F -// >>> mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)]) -// Fraction(13, 21) -// -// >>> from decimal import Decimal as D -// >>> mean([D("0.5"), D("0.75"), D("0.625"), D("0.375")]) -// Decimal('0.5625') -// -// If ``data`` is empty, StatisticsError will be raised. -// -//go:linkname Mean py.mean -func Mean(data *py.Object) *py.Object - -// Convert data to floats and compute the arithmetic mean. -// -// This runs faster than the mean() function and it always returns a float. -// If the input dataset is empty, it raises a StatisticsError. -// -// >>> fmean([3.5, 4.0, 5.25]) -// 4.25 -// -//go:linkname Fmean py.fmean -func Fmean(data *py.Object, weights *py.Object) *py.Object - -// Convert data to floats and compute the geometric mean. -// -// Raises a StatisticsError if the input dataset is empty, -// if it contains a zero, or if it contains a negative value. -// -// No special efforts are made to achieve exact results. -// (However, this may change in the future.) -// -// >>> round(geometric_mean([54, 24, 36]), 9) -// 36.0 -// -//go:linkname GeometricMean py.geometric_mean -func GeometricMean(data *py.Object) *py.Object - -// Return the harmonic mean of data. -// -// The harmonic mean is the reciprocal of the arithmetic mean of the -// reciprocals of the data. It can be used for averaging ratios or -// rates, for example speeds. -// -// Suppose a car travels 40 km/hr for 5 km and then speeds-up to -// 60 km/hr for another 5 km. What is the average speed? -// -// >>> harmonic_mean([40, 60]) -// 48.0 -// -// Suppose a car travels 40 km/hr for 5 km, and when traffic clears, -// speeds-up to 60 km/hr for the remaining 30 km of the journey. What -// is the average speed? -// -// >>> harmonic_mean([40, 60], weights=[5, 30]) -// 56.0 -// -// If ``data`` is empty, or any element is less than zero, -// ``harmonic_mean`` will raise ``StatisticsError``. -// -//go:linkname HarmonicMean py.harmonic_mean -func HarmonicMean(data *py.Object, weights *py.Object) *py.Object - -// Return the median (middle value) of numeric data. -// -// When the number of data points is odd, return the middle data point. -// When the number of data points is even, the median is interpolated by -// taking the average of the two middle values: -// -// >>> median([1, 3, 5]) -// 3 -// >>> median([1, 3, 5, 7]) -// 4.0 -// -//go:linkname Median py.median -func Median(data *py.Object) *py.Object - -// Return the low median of numeric data. -// -// When the number of data points is odd, the middle value is returned. -// When it is even, the smaller of the two middle values is returned. -// -// >>> median_low([1, 3, 5]) -// 3 -// >>> median_low([1, 3, 5, 7]) -// 3 -// -//go:linkname MedianLow py.median_low -func MedianLow(data *py.Object) *py.Object - -// Return the high median of data. -// -// When the number of data points is odd, the middle value is returned. -// When it is even, the larger of the two middle values is returned. -// -// >>> median_high([1, 3, 5]) -// 3 -// >>> median_high([1, 3, 5, 7]) -// 5 -// -//go:linkname MedianHigh py.median_high -func MedianHigh(data *py.Object) *py.Object - -// Estimates the median for numeric data binned around the midpoints -// -// of consecutive, fixed-width intervals. -// -// The *data* can be any iterable of numeric data with each value being -// exactly the midpoint of a bin. At least one value must be present. -// -// The *interval* is width of each bin. -// -// For example, demographic information may have been summarized into -// consecutive ten-year age groups with each group being represented -// by the 5-year midpoints of the intervals: -// -// >>> demographics = Counter({ -// ... 25: 172, # 20 to 30 years old -// ... 35: 484, # 30 to 40 years old -// ... 45: 387, # 40 to 50 years old -// ... 55: 22, # 50 to 60 years old -// ... 65: 6, # 60 to 70 years old -// ... }) -// -// The 50th percentile (median) is the 536th person out of the 1071 -// member cohort. That person is in the 30 to 40 year old age group. -// -// The regular median() function would assume that everyone in the -// tricenarian age group was exactly 35 years old. A more tenable -// assumption is that the 484 members of that age group are evenly -// distributed between 30 and 40. For that, we use median_grouped(). -// -// >>> data = list(demographics.elements()) -// >>> median(data) -// 35 -// >>> round(median_grouped(data, interval=10), 1) -// 37.5 -// -// The caller is responsible for making sure the data points are separated -// by exact multiples of *interval*. This is essential for getting a -// correct result. The function does not check this precondition. -// -// Inputs may be any numeric type that can be coerced to a float during -// the interpolation step. -// -//go:linkname MedianGrouped py.median_grouped -func MedianGrouped(data *py.Object, interval *py.Object) *py.Object - -// Return the most common data point from discrete or nominal data. -// -// ``mode`` assumes discrete data, and returns a single value. This is the -// standard treatment of the mode as commonly taught in schools: -// -// >>> mode([1, 1, 2, 3, 3, 3, 3, 4]) -// 3 -// -// This also works with nominal (non-numeric) data: -// -// >>> mode(["red", "blue", "blue", "red", "green", "red", "red"]) -// 'red' -// -// If there are multiple modes with same frequency, return the first one -// encountered: -// -// >>> mode(['red', 'red', 'green', 'blue', 'blue']) -// 'red' -// -// If *data* is empty, ``mode``, raises StatisticsError. -// -//go:linkname Mode py.mode -func Mode(data *py.Object) *py.Object - -// Return a list of the most frequently occurring values. -// -// Will return more than one result if there are multiple modes -// or an empty list if *data* is empty. -// -// >>> multimode('aabbbbbbbbcc') -// ['b'] -// >>> multimode('aabbbbccddddeeffffgg') -// ['b', 'd', 'f'] -// >>> multimode('') -// [] -// -//go:linkname Multimode py.multimode -func Multimode(data *py.Object) *py.Object - -// Divide *data* into *n* continuous intervals with equal probability. -// -// Returns a list of (n - 1) cut points separating the intervals. -// -// Set *n* to 4 for quartiles (the default). Set *n* to 10 for deciles. -// Set *n* to 100 for percentiles which gives the 99 cuts points that -// separate *data* in to 100 equal sized groups. -// -// The *data* can be any iterable containing sample. -// The cut points are linearly interpolated between data points. -// -// If *method* is set to *inclusive*, *data* is treated as population -// data. The minimum value is treated as the 0th percentile and the -// maximum value is treated as the 100th percentile. -// -//go:linkname Quantiles py.quantiles -func Quantiles(data *py.Object) *py.Object - -// Return the sample variance of data. -// -// data should be an iterable of Real-valued numbers, with at least two -// values. The optional argument xbar, if given, should be the mean of -// the data. If it is missing or None, the mean is automatically calculated. -// -// Use this function when your data is a sample from a population. To -// calculate the variance from the entire population, see ``pvariance``. -// -// Examples: -// -// >>> data = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5] -// >>> variance(data) -// 1.3720238095238095 -// -// If you have already calculated the mean of your data, you can pass it as -// the optional second argument ``xbar`` to avoid recalculating it: -// -// >>> m = mean(data) -// >>> variance(data, m) -// 1.3720238095238095 -// -// This function does not check that ``xbar`` is actually the mean of -// ``data``. Giving arbitrary values for ``xbar`` may lead to invalid or -// impossible results. -// -// Decimals and Fractions are supported: -// -// >>> from decimal import Decimal as D -// >>> variance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")]) -// Decimal('31.01875') -// -// >>> from fractions import Fraction as F -// >>> variance([F(1, 6), F(1, 2), F(5, 3)]) -// Fraction(67, 108) -// -//go:linkname Variance py.variance -func Variance(data *py.Object, xbar *py.Object) *py.Object - -// Return the population variance of “data“. -// -// data should be a sequence or iterable of Real-valued numbers, with at least one -// value. The optional argument mu, if given, should be the mean of -// the data. If it is missing or None, the mean is automatically calculated. -// -// Use this function to calculate the variance from the entire population. -// To estimate the variance from a sample, the ``variance`` function is -// usually a better choice. -// -// Examples: -// -// >>> data = [0.0, 0.25, 0.25, 1.25, 1.5, 1.75, 2.75, 3.25] -// >>> pvariance(data) -// 1.25 -// -// If you have already calculated the mean of the data, you can pass it as -// the optional second argument to avoid recalculating it: -// -// >>> mu = mean(data) -// >>> pvariance(data, mu) -// 1.25 -// -// Decimals and Fractions are supported: -// -// >>> from decimal import Decimal as D -// >>> pvariance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")]) -// Decimal('24.815') -// -// >>> from fractions import Fraction as F -// >>> pvariance([F(1, 4), F(5, 4), F(1, 2)]) -// Fraction(13, 72) -// -//go:linkname Pvariance py.pvariance -func Pvariance(data *py.Object, mu *py.Object) *py.Object - -// Return the square root of the sample variance. -// -// See ``variance`` for arguments and other details. -// -// >>> stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) -// 1.0810874155219827 -// -//go:linkname Stdev py.stdev -func Stdev(data *py.Object, xbar *py.Object) *py.Object - -// Return the square root of the population variance. -// -// See ``pvariance`` for arguments and other details. -// -// >>> pstdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) -// 0.986893273527251 -// -//go:linkname Pstdev py.pstdev -func Pstdev(data *py.Object, mu *py.Object) *py.Object - -// Covariance -// -// Return the sample covariance of two inputs *x* and *y*. Covariance -// is a measure of the joint variability of two inputs. -// -// >>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9] -// >>> y = [1, 2, 3, 1, 2, 3, 1, 2, 3] -// >>> covariance(x, y) -// 0.75 -// >>> z = [9, 8, 7, 6, 5, 4, 3, 2, 1] -// >>> covariance(x, z) -// -7.5 -// >>> covariance(z, x) -// -7.5 -// -//go:linkname Covariance py.covariance -func Covariance(x *py.Object, y *py.Object) *py.Object - -// Pearson's correlation coefficient -// -// Return the Pearson's correlation coefficient for two inputs. Pearson's -// correlation coefficient *r* takes values between -1 and +1. It measures -// the strength and direction of a linear relationship. -// -// >>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9] -// >>> y = [9, 8, 7, 6, 5, 4, 3, 2, 1] -// >>> correlation(x, x) -// 1.0 -// >>> correlation(x, y) -// -1.0 -// -// If *method* is "ranked", computes Spearman's rank correlation coefficient -// for two inputs. The data is replaced by ranks. Ties are averaged -// so that equal values receive the same rank. The resulting coefficient -// measures the strength of a monotonic relationship. -// -// Spearman's rank correlation coefficient is appropriate for ordinal -// data or for continuous data that doesn't meet the linear proportion -// requirement for Pearson's correlation coefficient. -// -//go:linkname Correlation py.correlation -func Correlation(x *py.Object, y *py.Object) *py.Object - -// Slope and intercept for simple linear regression. -// -// Return the slope and intercept of simple linear regression -// parameters estimated using ordinary least squares. Simple linear -// regression describes relationship between an independent variable -// *x* and a dependent variable *y* in terms of a linear function: -// -// y = slope * x + intercept + noise -// -// where *slope* and *intercept* are the regression parameters that are -// estimated, and noise represents the variability of the data that was -// not explained by the linear regression (it is equal to the -// difference between predicted and actual values of the dependent -// variable). -// -// The parameters are returned as a named tuple. -// -// >>> x = [1, 2, 3, 4, 5] -// >>> noise = NormalDist().samples(5, seed=42) -// >>> y = [3 * x[i] + 2 + noise[i] for i in range(5)] -// >>> linear_regression(x, y) #doctest: +ELLIPSIS -// LinearRegression(slope=3.09078914170..., intercept=1.75684970486...) -// -// If *proportional* is true, the independent variable *x* and the -// dependent variable *y* are assumed to be directly proportional. -// The data is fit to a line passing through the origin. -// -// Since the *intercept* will always be 0.0, the underlying linear -// function simplifies to: -// -// y = slope * x + noise -// -// >>> y = [3 * x[i] + noise[i] for i in range(5)] -// >>> linear_regression(x, y, proportional=True) #doctest: +ELLIPSIS -// LinearRegression(slope=3.02447542484..., intercept=0.0) -// -//go:linkname LinearRegression py.linear_regression -func LinearRegression(x *py.Object, y *py.Object) *py.Object diff --git a/py/std/builtins.go b/py/std/builtins.go deleted file mode 100644 index 76d6191a..00000000 --- a/py/std/builtins.go +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package std - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -// https://docs.python.org/3/library/functions.html -// https://docs.python.org/3/library/constants.html - -//go:linkname Abs py.abs -func Abs(x *py.Object) *py.Object - -// getattr(object, name) -// -//go:linkname GetAttr py.getattr -func GetAttr(object, name *py.Object) *py.Object - -// getattr(object, name, default) -// -//go:linkname GetAttrEx py.getattr -func GetAttrEx(object, name, default_ *py.Object) *py.Object - -// max(iterable, *, key=None) -// max(iterable, *, default, key=None) -// max(arg1, arg2, *args, key=None) -// -// If one positional argument is provided, it should be an iterable. The largest -// item in the iterable is returned. If two or more positional arguments are -// provided, the largest of the positional arguments is returned. -// -//go:linkname Max py.max -func Max(__llgo_va_list ...any) *py.Object - -// min(iterable, *, key=None) -// min(iterable, *, default, key=None) -// min(arg1, arg2, *args, key=None) -// -//go:linkname Min py.min -func Min(__llgo_va_list ...any) *py.Object - -// iter(object) -// -//go:linkname Iter py.iter -func Iter(object *py.Object) *py.Object - -// next(iterator) -// -//go:linkname Next py.next -func Next(iterator *py.Object) *py.Object - -// next(iterator, default) -// -// Retrieve the next item from the iterator by calling its __next__() method. -// If default is given, it is returned if the iterator is exhausted, otherwise -// StopIteration is raised. -// -//go:linkname NextEx py.next -func NextEx(iterator, default_ *py.Object) *py.Object - -// awaitable anext(async_iterator) -// -//go:linkname Anext py.anext -func Anext(asyncIterator *py.Object) *py.Object - -// awaitable anext(async_iterator, default) -// -// When awaited, return the next item from the given asynchronous iterator, -// or default if given and the iterator is exhausted. -// -// This is the async variant of the next() builtin, and behaves similarly. -// -// This calls the __anext__() method of async_iterator, returning an awaitable. -// Awaiting this returns the next value of the iterator. If default is given, -// it is returned if the iterator is exhausted, otherwise StopAsyncIteration is -// raised. -// -//go:linkname AnextEx py.anext -func AnextEx(asyncIterator, default_ *py.Object) *py.Object - -// iter(object, sentinel) -// -//go:linkname IterEx py.iter -func IterEx(callable, sentinel *py.Object) *py.Object - -// vars() -// -//go:linkname Vars py.vars -func Vars() *py.Object - -// vars(object) -// -// Return the __dict__ attribute for a module, class, instance, or any other object -// with a __dict__ attribute. -// -// See https://docs.python.org/3/library/functions.html#vars -// -//go:linkname VarsEx py.vars -func VarsEx(object *py.Object) *py.Object - -// dir() -// -//go:linkname Dir py.dir -func Dir() *py.Object - -// dir(object) -// -//go:linkname DirEx py.dir -func DirEx(object *py.Object) *py.Object - -// Invoke the built-in help system. (This function is intended for interactive -// use.) If no argument is given, the interactive help system starts on the -// interpreter console. If the argument is a string, then the string is looked -// up as the name of a module, function, class, method, keyword, or documentation -// topic, and a help page is printed on the console. If the argument is any other -// kind of object, a help page on the object is generated. -// -// Note that if a slash(/) appears in the parameter list of a function when invoking -// help(), it means that the parameters prior to the slash are positional-only. For -// more info, see the FAQ entry on positional-only parameters. -// -//go:linkname Help py.help -func Help(object *py.Object) - -// breakpoint(*args, **kws) -// -// See https://docs.python.org/3/library/functions.html#breakpoint -// -//go:linkname Breakpoint py.breakpoint -func Breakpoint(__llgo_va_list ...any) diff --git a/py/std/gen.go b/py/std/gen.go deleted file mode 100644 index f6083dcd..00000000 --- a/py/std/gen.go +++ /dev/null @@ -1,396 +0,0 @@ -package std - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.builtins" - -// Return True if bool(x) is True for all values x in the iterable. -// -// If the iterable is empty, return True. -// -//go:linkname All py.all -func All(iterable *py.Object) *py.Object - -// Return True if bool(x) is True for any x in the iterable. -// -// If the iterable is empty, return False. -// -//go:linkname Any py.any -func Any(iterable *py.Object) *py.Object - -// Return an ASCII-only representation of an object. -// -// As repr(), return a string containing a printable representation of an -// object, but escape the non-ASCII characters in the string returned by -// repr() using \\x, \\u or \\U escapes. This generates a string similar -// to that returned by repr() in Python 2. -// -//go:linkname Ascii py.ascii -func Ascii(obj *py.Object) *py.Object - -// Return the binary representation of an integer. -// -// >>> bin(2796202) -// '0b1010101010101010101010' -// -//go:linkname Bin py.bin -func Bin(number *py.Object) *py.Object - -// Return whether the object is callable (i.e., some kind of function). -// -// Note that classes are callable, as are instances of classes with a -// __call__() method. -// -//go:linkname Callable py.callable -func Callable(obj *py.Object) *py.Object - -// Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff. -// -//go:linkname Chr py.chr -func Chr(i *py.Object) *py.Object - -// Compile source into a code object that can be executed by exec() or eval(). -// -// The source code may represent a Python module, statement or expression. -// The filename will be used for run-time error messages. -// The mode must be 'exec' to compile a module, 'single' to compile a -// single (interactive) statement, or 'eval' to compile an expression. -// The flags argument, if present, controls which future statements influence -// the compilation of the code. -// The dont_inherit argument, if true, stops the compilation inheriting -// the effects of any future statements in effect in the code calling -// compile; if absent or false these statements do influence the compilation, -// in addition to any features explicitly specified. -// -//go:linkname Compile py.compile -func Compile(source *py.Object, filename *py.Object, mode *py.Object, flags *py.Object, dontInherit *py.Object, optimize *py.Object) *py.Object - -// Deletes the named attribute from the given object. -// -// delattr(x, 'y') is equivalent to “del x.y“ -// -//go:linkname Delattr py.delattr -func Delattr(obj *py.Object, name *py.Object) *py.Object - -// Return the tuple (x//y, x%y). Invariant: div*y + mod == x. -// -//go:linkname Divmod py.divmod -func Divmod(x *py.Object, y *py.Object) *py.Object - -// Evaluate the given source in the context of globals and locals. -// -// The source may be a string representing a Python expression -// or a code object as returned by compile(). -// The globals must be a dictionary and locals can be any mapping, -// defaulting to the current globals and locals. -// If only globals is given, locals defaults to it. -// -//go:linkname Eval py.eval -func Eval(source *py.Object, globals *py.Object, locals *py.Object) *py.Object - -// Execute the given source in the context of globals and locals. -// -// The source may be a string representing one or more Python statements -// or a code object as returned by compile(). -// The globals must be a dictionary and locals can be any mapping, -// defaulting to the current globals and locals. -// If only globals is given, locals defaults to it. -// The closure must be a tuple of cellvars, and can only be used -// when source is a code object requiring exactly that many cellvars. -// -//go:linkname Exec py.exec -func Exec(source *py.Object, globals *py.Object, locals *py.Object) *py.Object - -// Return type(value).__format__(value, format_spec) -// -// Many built-in types implement format_spec according to the -// Format Specification Mini-language. See help('FORMATTING'). -// -// If type(value) does not supply a method named __format__ -// and format_spec is empty, then str(value) is returned. -// See also help('SPECIALMETHODS'). -// -//go:linkname Format py.format -func Format(value *py.Object, formatSpec *py.Object) *py.Object - -// Return the dictionary containing the current scope's global variables. -// -// NOTE: Updates to this dictionary *will* affect name lookups in the current -// global scope and vice-versa. -// -//go:linkname Globals py.globals -func Globals() *py.Object - -// Return whether the object has an attribute with the given name. -// -// This is done by calling getattr(obj, name) and catching AttributeError. -// -//go:linkname Hasattr py.hasattr -func Hasattr(obj *py.Object, name *py.Object) *py.Object - -// Return the hash value for the given object. -// -// Two objects that compare equal must also have the same hash value, but the -// reverse is not necessarily true. -// -//go:linkname Hash py.hash -func Hash(obj *py.Object) *py.Object - -// Return the hexadecimal representation of an integer. -// -// >>> hex(12648430) -// '0xc0ffee' -// -//go:linkname Hex py.hex -func Hex(number *py.Object) *py.Object - -// Return the identity of an object. -// -// This is guaranteed to be unique among simultaneously existing objects. -// (CPython uses the object's memory address.) -// -//go:linkname Id py.id -func Id(obj *py.Object) *py.Object - -// Read a string from standard input. The trailing newline is stripped. -// -// The prompt string, if given, is printed to standard output without a -// trailing newline before reading input. -// -// If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError. -// On *nix systems, readline is used if available. -// -//go:linkname Input py.input -func Input(prompt *py.Object) *py.Object - -// Return whether an object is an instance of a class or of a subclass thereof. -// -// A tuple, as in “isinstance(x, (A, B, ...))“, may be given as the target to -// check against. This is equivalent to “isinstance(x, A) or isinstance(x, B) -// or ...“ etc. -// -//go:linkname Isinstance py.isinstance -func Isinstance(obj *py.Object, classOrTuple *py.Object) *py.Object - -// Return whether 'cls' is derived from another class or is the same class. -// -// A tuple, as in “issubclass(x, (A, B, ...))“, may be given as the target to -// check against. This is equivalent to “issubclass(x, A) or issubclass(x, B) -// or ...“. -// -//go:linkname Issubclass py.issubclass -func Issubclass(cls *py.Object, classOrTuple *py.Object) *py.Object - -// Return an AsyncIterator for an AsyncIterable object. -// -//go:linkname Aiter py.aiter -func Aiter(asyncIterable *py.Object) *py.Object - -// Return the number of items in a container. -// -//go:linkname Len py.len -func Len(obj *py.Object) *py.Object - -// Return a dictionary containing the current scope's local variables. -// -// NOTE: Whether or not updates to this dictionary will affect name lookups in -// the local scope and vice-versa is *implementation dependent* and not -// covered by any backwards compatibility guarantees. -// -//go:linkname Locals py.locals -func Locals() *py.Object - -// Return the octal representation of an integer. -// -// >>> oct(342391) -// '0o1234567' -// -//go:linkname Oct py.oct -func Oct(number *py.Object) *py.Object - -// Return the Unicode code point for a one-character string. -// -//go:linkname Ord py.ord -func Ord(c *py.Object) *py.Object - -// Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments -// -// Some types, such as ints, are able to use a more efficient algorithm when -// invoked using the three argument form. -// -//go:linkname Pow py.pow -func Pow(base *py.Object, exp *py.Object, mod *py.Object) *py.Object - -// Prints the values to a stream, or to sys.stdout by default. -// -// sep -// string inserted between values, default a space. -// end -// string appended after the last value, default a newline. -// file -// a file-like object (stream); defaults to the current sys.stdout. -// flush -// whether to forcibly flush the stream. -// -//go:linkname Print py.print -func Print(__llgo_va_list ...interface{}) *py.Object - -// Return the canonical string representation of the object. -// -// For many object types, including most builtins, eval(repr(obj)) == obj. -// -//go:linkname Repr py.repr -func Repr(obj *py.Object) *py.Object - -// Round a number to a given precision in decimal digits. -// -// The return value is an integer if ndigits is omitted or None. Otherwise -// the return value has the same type as the number. ndigits may be negative. -// -//go:linkname Round py.round -func Round(number *py.Object, ndigits *py.Object) *py.Object - -// Sets the named attribute on the given object to the specified value. -// -// setattr(x, 'y', v) is equivalent to “x.y = v“ -// -//go:linkname Setattr py.setattr -func Setattr(obj *py.Object, name *py.Object, value *py.Object) *py.Object - -// Return a new list containing all items from the iterable in ascending order. -// -// A custom key function can be supplied to customize the sort order, and the -// reverse flag can be set to request the result in descending order. -// -//go:linkname Sorted py.sorted -func Sorted(iterable *py.Object) *py.Object - -// Return the sum of a 'start' value (default: 0) plus an iterable of numbers -// -// When the iterable is empty, return the start value. -// This function is intended specifically for use with numeric values and may -// reject non-numeric types. -// -//go:linkname Sum py.sum -func Sum(iterable *py.Object, start *py.Object) *py.Object - -// Open file and return a stream. Raise OSError upon failure. -// -// file is either a text or byte string giving the name (and the path -// if the file isn't in the current working directory) of the file to -// be opened or an integer file descriptor of the file to be -// wrapped. (If a file descriptor is given, it is closed when the -// returned I/O object is closed, unless closefd is set to False.) -// -// mode is an optional string that specifies the mode in which the file -// is opened. It defaults to 'r' which means open for reading in text -// mode. Other common values are 'w' for writing (truncating the file if -// it already exists), 'x' for creating and writing to a new file, and -// 'a' for appending (which on some Unix systems, means that all writes -// append to the end of the file regardless of the current seek position). -// In text mode, if encoding is not specified the encoding used is platform -// dependent: locale.getencoding() is called to get the current locale encoding. -// (For reading and writing raw bytes use binary mode and leave encoding -// unspecified.) The available modes are: -// -// ========= =============================================================== -// Character Meaning -// --------- --------------------------------------------------------------- -// 'r' open for reading (default) -// 'w' open for writing, truncating the file first -// 'x' create a new file and open it for writing -// 'a' open for writing, appending to the end of the file if it exists -// 'b' binary mode -// 't' text mode (default) -// '+' open a disk file for updating (reading and writing) -// ========= =============================================================== -// -// The default mode is 'rt' (open for reading text). For binary random -// access, the mode 'w+b' opens and truncates the file to 0 bytes, while -// 'r+b' opens the file without truncation. The 'x' mode implies 'w' and -// raises an `FileExistsError` if the file already exists. -// -// Python distinguishes between files opened in binary and text modes, -// even when the underlying operating system doesn't. Files opened in -// binary mode (appending 'b' to the mode argument) return contents as -// bytes objects without any decoding. In text mode (the default, or when -// 't' is appended to the mode argument), the contents of the file are -// returned as strings, the bytes having been first decoded using a -// platform-dependent encoding or using the specified encoding if given. -// -// buffering is an optional integer used to set the buffering policy. -// Pass 0 to switch buffering off (only allowed in binary mode), 1 to select -// line buffering (only usable in text mode), and an integer > 1 to indicate -// the size of a fixed-size chunk buffer. When no buffering argument is -// given, the default buffering policy works as follows: -// -// - Binary files are buffered in fixed-size chunks; the size of the buffer -// is chosen using a heuristic trying to determine the underlying device's -// "block size" and falling back on `io.DEFAULT_BUFFER_SIZE`. -// On many systems, the buffer will typically be 4096 or 8192 bytes long. -// -// - "Interactive" text files (files for which isatty() returns True) -// use line buffering. Other text files use the policy described above -// for binary files. -// -// encoding is the name of the encoding used to decode or encode the -// file. This should only be used in text mode. The default encoding is -// platform dependent, but any encoding supported by Python can be -// passed. See the codecs module for the list of supported encodings. -// -// errors is an optional string that specifies how encoding errors are to -// be handled---this argument should not be used in binary mode. Pass -// 'strict' to raise a ValueError exception if there is an encoding error -// (the default of None has the same effect), or pass 'ignore' to ignore -// errors. (Note that ignoring encoding errors can lead to data loss.) -// See the documentation for codecs.register or run 'help(codecs.Codec)' -// for a list of the permitted encoding error strings. -// -// newline controls how universal newlines works (it only applies to text -// mode). It can be None, ”, '\n', '\r', and '\r\n'. It works as -// follows: -// -// - On input, if newline is None, universal newlines mode is -// enabled. Lines in the input can end in '\n', '\r', or '\r\n', and -// these are translated into '\n' before being returned to the -// caller. If it is ”, universal newline mode is enabled, but line -// endings are returned to the caller untranslated. If it has any of -// the other legal values, input lines are only terminated by the given -// string, and the line ending is returned to the caller untranslated. -// -// - On output, if newline is None, any '\n' characters written are -// translated to the system default line separator, os.linesep. If -// newline is ” or '\n', no translation takes place. If newline is any -// of the other legal values, any '\n' characters written are translated -// to the given string. -// -// If closefd is False, the underlying file descriptor will be kept open -// when the file is closed. This does not work when a file name is given -// and must be True in that case. -// -// A custom opener can be used by passing a callable as *opener*. The -// underlying file descriptor for the file object is then obtained by -// calling *opener* with (*file*, *flags*). *opener* must return an open -// file descriptor (passing os.open as *opener* results in functionality -// similar to passing None). -// -// open() returns a file object whose type depends on the mode, and -// through which the standard file operations such as reading and writing -// are performed. When open() is used to open a file in a text mode ('w', -// 'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open -// a file in a binary mode, the returned class varies: in read binary -// mode, it returns a BufferedReader; in write binary and append binary -// modes, it returns a BufferedWriter, and in read/write mode, it returns -// a BufferedRandom. -// -// It is also possible to use a string or bytearray as a file for both -// reading and writing. For strings StringIO can be used like a file -// opened in a text mode, and for bytes a BytesIO can be used like a file -// opened in a binary mode. -// -//go:linkname Open py.open -func Open(file *py.Object, mode *py.Object, buffering *py.Object, encoding *py.Object, errors *py.Object, newline *py.Object, closefd *py.Object, opener *py.Object) *py.Object diff --git a/py/sys/gen.go b/py/sys/gen.go deleted file mode 100644 index 943c67a1..00000000 --- a/py/sys/gen.go +++ /dev/null @@ -1,220 +0,0 @@ -package sys - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.sys" - -// Adds a new audit hook callback. -// -//go:linkname Addaudithook py.addaudithook -func Addaudithook(hook *py.Object) *py.Object - -// Print an object to sys.stdout and also save it in builtins._ -// -//go:linkname Displayhook py.displayhook -func Displayhook(object *py.Object) *py.Object - -// Return the current exception. -// -// Return the most recent exception caught by an except clause -// in the current stack frame or in an older stack frame, or None -// if no such exception exists. -// -//go:linkname Exception py.exception -func Exception() *py.Object - -// Return current exception information: (type, value, traceback). -// -// Return information about the most recent exception caught by an except -// clause in the current stack frame or in an older stack frame. -// -//go:linkname ExcInfo py.exc_info -func ExcInfo() *py.Object - -// Handle an exception by displaying it with a traceback on sys.stderr. -// -//go:linkname Excepthook py.excepthook -func Excepthook(exctype *py.Object, value *py.Object, traceback *py.Object) *py.Object - -// Exit the interpreter by raising SystemExit(status). -// -// If the status is omitted or None, it defaults to zero (i.e., success). -// If the status is an integer, it will be used as the system exit status. -// If it is another kind of object, it will be printed and the system -// exit status will be one (i.e., failure). -// -//go:linkname Exit py.exit -func Exit(status *py.Object) *py.Object - -// Return the current default encoding used by the Unicode implementation. -// -//go:linkname Getdefaultencoding py.getdefaultencoding -func Getdefaultencoding() *py.Object - -// Return the current value of the flags that are used for dlopen calls. -// -// The flag constants are defined in the os module. -// -//go:linkname Getdlopenflags py.getdlopenflags -func Getdlopenflags() *py.Object - -// Return the number of memory blocks currently allocated. -// -//go:linkname Getallocatedblocks py.getallocatedblocks -func Getallocatedblocks() *py.Object - -// Return the number of elements of the unicode interned dictionary -// -//go:linkname Getunicodeinternedsize py.getunicodeinternedsize -func Getunicodeinternedsize() *py.Object - -// Return the encoding used to convert Unicode filenames to OS filenames. -// -//go:linkname Getfilesystemencoding py.getfilesystemencoding -func Getfilesystemencoding() *py.Object - -// Return the error mode used Unicode to OS filename conversion. -// -//go:linkname Getfilesystemencodeerrors py.getfilesystemencodeerrors -func Getfilesystemencodeerrors() *py.Object - -// Return the reference count of object. -// -// The count returned is generally one higher than you might expect, -// because it includes the (temporary) reference as an argument to -// getrefcount(). -// -//go:linkname Getrefcount py.getrefcount -func Getrefcount(object *py.Object) *py.Object - -// Return the current value of the recursion limit. -// -// The recursion limit is the maximum depth of the Python interpreter -// stack. This limit prevents infinite recursion from causing an overflow -// of the C stack and crashing Python. -// -//go:linkname Getrecursionlimit py.getrecursionlimit -func Getrecursionlimit() *py.Object - -// “Intern” the given string. -// -// This enters the string in the (global) table of interned strings whose -// purpose is to speed up dictionary lookups. Return the string itself or -// the previously interned string object with the same value. -// -//go:linkname Intern py.intern -func Intern(string *py.Object) *py.Object - -// Return True if Python is exiting. -// -//go:linkname IsFinalizing py.is_finalizing -func IsFinalizing() *py.Object - -// Set the ideal thread switching delay inside the Python interpreter. -// -// The actual frequency of switching threads can be lower if the -// interpreter executes long sequences of uninterruptible code -// (this is implementation-specific and workload-dependent). -// -// The parameter must represent the desired switching delay in seconds -// A typical value is 0.005 (5 milliseconds). -// -//go:linkname Setswitchinterval py.setswitchinterval -func Setswitchinterval(interval *py.Object) *py.Object - -// Return the current thread switch interval; see sys.setswitchinterval(). -// -//go:linkname Getswitchinterval py.getswitchinterval -func Getswitchinterval() *py.Object - -// Set the flags used by the interpreter for dlopen calls. -// -// This is used, for example, when the interpreter loads extension -// modules. Among other things, this will enable a lazy resolving of -// symbols when importing a module, if called as sys.setdlopenflags(0). -// To share symbols across extension modules, call as -// sys.setdlopenflags(os.RTLD_GLOBAL). Symbolic names for the flag -// modules can be found in the os module (RTLD_xxx constants, e.g. -// os.RTLD_LAZY). -// -//go:linkname Setdlopenflags py.setdlopenflags -func Setdlopenflags(flags *py.Object) *py.Object - -// Set the maximum depth of the Python interpreter stack to n. -// -// This limit prevents infinite recursion from causing an overflow of the C -// stack and crashing Python. The highest possible limit is platform- -// dependent. -// -//go:linkname Setrecursionlimit py.setrecursionlimit -func Setrecursionlimit(limit *py.Object) *py.Object - -// Return the global debug tracing function set with sys.settrace. -// -// See the debugger chapter in the library manual. -// -//go:linkname Gettrace py.gettrace -func Gettrace() *py.Object - -// Call func(*args), while tracing is enabled. -// -// The tracing state is saved, and restored afterwards. This is intended -// to be called from a debugger from a checkpoint, to recursively debug -// some other code. -// -//go:linkname CallTracing py.call_tracing -func CallTracing(func_ *py.Object, args *py.Object) *py.Object - -// Enable or disable origin tracking for coroutine objects in this thread. -// -// Coroutine objects will track 'depth' frames of traceback information -// about where they came from, available in their cr_origin attribute. -// -// Set a depth of 0 to disable. -// -//go:linkname SetCoroutineOriginTrackingDepth py.set_coroutine_origin_tracking_depth -func SetCoroutineOriginTrackingDepth(depth *py.Object) *py.Object - -// Check status of origin tracking for coroutine objects in this thread. -// -//go:linkname GetCoroutineOriginTrackingDepth py.get_coroutine_origin_tracking_depth -func GetCoroutineOriginTrackingDepth() *py.Object - -// Deactivate the current stack profiler trampoline backend. -// -// If no stack profiler is activated, this function has no effect. -// -//go:linkname DeactivateStackTrampoline py.deactivate_stack_trampoline -func DeactivateStackTrampoline() *py.Object - -// Return *True* if a stack profiler trampoline is active. -// -//go:linkname IsStackTrampolineActive py.is_stack_trampoline_active -func IsStackTrampolineActive() *py.Object - -// Handle an unraisable exception. -// -// The unraisable argument has the following attributes: -// -// * exc_type: Exception type. -// * exc_value: Exception value, can be None. -// * exc_traceback: Exception traceback, can be None. -// * err_msg: Error message, can be None. -// * object: Object causing the exception, can be None. -// -//go:linkname Unraisablehook py.unraisablehook -func Unraisablehook(unraisable *py.Object) *py.Object - -// Return the maximum string digits limit for non-binary int<->str conversions. -// -//go:linkname GetIntMaxStrDigits py.get_int_max_str_digits -func GetIntMaxStrDigits() *py.Object - -// Set the maximum string digits limit for non-binary int<->str conversions. -// -//go:linkname SetIntMaxStrDigits py.set_int_max_str_digits -func SetIntMaxStrDigits(maxdigits *py.Object) *py.Object diff --git a/py/torch/doc.txt b/py/torch/doc.txt deleted file mode 100644 index 2c2f73ac..00000000 --- a/py/torch/doc.txt +++ /dev/null @@ -1,2 +0,0 @@ -==> Skip 303 symbols: -[classproperty get_file_path prepare_multiprocessing_environment set_autocast_enabled is_autocast_enabled clear_autocast_cache set_autocast_cpu_enabled is_autocast_cpu_enabled set_autocast_cpu_dtype get_autocast_cpu_dtype set_autocast_gpu_dtype get_autocast_gpu_dtype set_autocast_xla_enabled is_autocast_xla_enabled set_autocast_xla_dtype get_autocast_xla_dtype set_autocast_ipu_enabled is_autocast_ipu_enabled set_autocast_ipu_dtype get_autocast_ipu_dtype autocast_increment_nesting autocast_decrement_nesting is_autocast_cache_enabled set_autocast_cache_enabled set_anomaly_enabled is_anomaly_enabled is_anomaly_check_nan_enabled parse_ir parse_schema unify_type_list fork wait parse_type_comment merge_type_from_type_comment import_ir_module import_ir_module_from_buffer vitals_enabled set_vital read_vitals init_num_threads sym_sqrt obj candidate typename abs_ acos_ acosh_ adaptive_avg_pool1d adaptive_max_pool1d addmv_ affine_grid_generator alias_copy align_tensors alpha_dropout alpha_dropout_ arccos_ arccosh_ arcsin_ arcsinh_ arctan_ arctanh_ as_strided_ as_strided_copy as_strided_scatter asin_ asinh_ atan_ atanh_ avg_pool1d batch_norm batch_norm_backward_elemt batch_norm_backward_reduce batch_norm_elemt batch_norm_gather_stats batch_norm_gather_stats_with_counts batch_norm_stats batch_norm_update_stats bilinear binary_cross_entropy_with_logits binomial ccol_indices_copy ceil_ celu celu_ channel_shuffle choose_qparams_optimized clamp_ clamp_max clamp_max_ clamp_min clamp_min_ clip_ col_indices_copy conj_physical_ constant_pad_nd conv1d conv2d conv3d conv_tbc conv_transpose1d conv_transpose2d conv_transpose3d convolution cos_ cosh_ cosine_embedding_loss cosine_similarity crow_indices_copy ctc_loss cudnn_affine_grid_generator cudnn_batch_norm cudnn_convolution cudnn_convolution_add_relu cudnn_convolution_relu cudnn_convolution_transpose cudnn_grid_sampler cudnn_is_acceptable deg2rad_ detach detach_ detach_copy diagonal_copy dropout dropout_ dsmm embedding embedding_bag embedding_renorm_ empty_permuted empty_quantized erf_ erfc_ exp2_ exp_ expand_copy expm1_ fbgemm_linear_fp16_weight fbgemm_linear_fp16_weight_fp32_activation fbgemm_linear_int8_weight fbgemm_linear_int8_weight_fp32_activation fbgemm_linear_quantize_weight fbgemm_pack_gemm_matrix_fp16 fbgemm_pack_quantized_matrix feature_alpha_dropout feature_alpha_dropout_ feature_dropout feature_dropout_ fill fill_ fix_ floor_ frac_ frobenius_norm fused_moving_avg_obs_fake_quant gcd_ get_device grid_sampler grid_sampler_2d grid_sampler_3d group_norm gru gru_cell hardshrink hinge_embedding_loss hsmm i0_ index_fill index_put index_put_ indices_copy instance_norm int_repr is_distributed is_inference is_neg is_same_size is_signed is_vulkan_available kl_div layer_norm lcm_ ldexp_ log10_ log1p_ log2_ log_ log_softmax logit_ lstm lstm_cell margin_ranking_loss masked_fill masked_scatter max_pool1d max_pool1d_with_indices max_pool2d max_pool3d miopen_batch_norm miopen_convolution miopen_convolution_add_relu miopen_convolution_relu miopen_convolution_transpose miopen_depthwise_convolution miopen_rnn mkldnn_adaptive_avg_pool2d mkldnn_convolution mkldnn_linear_backward_weights mkldnn_max_pool2d mkldnn_max_pool3d mkldnn_rnn_layer nan_to_num_ native_batch_norm native_channel_shuffle native_dropout native_group_norm native_layer_norm native_norm neg_ negative_ nonzero_static norm_except_dim nuclear_norm pairwise_distance pdist permute_copy pixel_shuffle pixel_unshuffle poisson_nll_loss prelu put q_per_channel_axis q_per_channel_scales q_per_channel_zero_points q_scale q_zero_point quantize_per_tensor_dynamic quantized_gru_cell quantized_lstm_cell quantized_max_pool3d quantized_rnn_relu_cell quantized_rnn_tanh_cell rad2deg_ reciprocal_ relu relu_ resize_as_ resize_as_sparse_ rnn_relu rnn_relu_cell rnn_tanh rnn_tanh_cell round_ row_indices_copy rrelu rrelu_ rsqrt_ rsub saddmm scalar_tensor segment_reduce select_copy selu selu_ sigmoid_ sin_ sinc_ sinh_ slice_copy split_copy split_with_sizes split_with_sizes_copy spmm sqrt_ square_ squeeze_copy sym_constrain_range sym_constrain_range_for_size t_copy tan_ tanh_ threshold threshold_ transpose_copy triplet_margin_loss trunc_ unbind_copy unfold_copy unsafe_chunk unsafe_split unsafe_split_with_sizes unsqueeze_copy values_copy view_as_complex_copy view_as_real_copy view_copy xlogy_ zero_ to_dlpack matrix_rank eig solve lstsq symeig] diff --git a/py/torch/gen.go b/py/torch/gen.go deleted file mode 100644 index 160002d9..00000000 --- a/py/torch/gen.go +++ /dev/null @@ -1,4144 +0,0 @@ -package torch - -import ( - _ "unsafe" - - "github.com/goplus/llgo/py" -) - -const LLGoPackage = "py.torch" - -// SymInt-aware utility for logical negation. -// -// Args: -// a (SymBool or bool): Object to negate -// -//go:linkname SymNot py.sym_not -func SymNot(a *py.Object) *py.Object - -// SymInt-aware utility for float casting. -// -// Args: -// a (SymInt, SymFloat, or object): Object to cast -// -//go:linkname SymFloat py.sym_float -func SymFloat(a *py.Object) *py.Object - -// SymInt-aware utility for int casting. -// -// Args: -// a (SymInt, SymFloat, or object): Object to cast -// -//go:linkname SymInt py.sym_int -func SymInt(a *py.Object) *py.Object - -// SymInt-aware utility for max(). -// -//go:linkname SymMax py.sym_max -func SymMax(a *py.Object, b *py.Object) *py.Object - -// SymInt-aware utility for max(). -// -//go:linkname SymMin py.sym_min -func SymMin(a *py.Object, b *py.Object) *py.Object - -// Returns True if `obj` is a PyTorch tensor. -// -// Note that this function is simply doing ``isinstance(obj, Tensor)``. -// Using that ``isinstance`` check is better for typechecking with mypy, -// and more explicit - so it's recommended to use that instead of -// ``is_tensor``. -// -// Args: -// obj (Object): Object to test -// Example:: -// -// >>> x = torch.tensor([1, 2, 3]) -// >>> torch.is_tensor(x) -// True -// -//go:linkname IsTensor py.is_tensor -func IsTensor(obj *py.Object) *py.Object - -// Returns True if `obj` is a PyTorch storage object. -// -// Args: -// obj (Object): Object to test -// -//go:linkname IsStorage py.is_storage -func IsStorage(obj *py.Object) *py.Object - -// Sets the default “torch.Tensor“ to be allocated on “device“. This -// -// does not affect factory function calls which are called with an explicit -// ``device`` argument. Factory calls will be performed as if they -// were passed ``device`` as an argument. -// -// To only temporarily change the default device instead of setting it -// globally, use ``with torch.device(device):`` instead. -// -// The default device is initially ``cpu``. If you set the default tensor -// device to another device (e.g., ``cuda``) without a device index, tensors -// will be allocated on whatever the current device for the device type, -// even after :func:`torch.cuda.set_device` is called. -// -// .. warning:: -// -// This function imposes a slight performance cost on every Python -// call to the torch API (not just factory functions). If this -// is causing problems for you, please comment on -// https://github.com/pytorch/pytorch/issues/92701 -// -// .. note:: -// -// This doesn't affect functions that create tensors that share the same memory as the input, like: -// :func:`torch.from_numpy` and :func:`torch.frombuffer` -// -// Args: -// device (device or string): the device to set as default -// -// Example:: -// -// >>> # xdoctest: +SKIP("requires cuda, changes global state") -// >>> torch.tensor([1.2, 3]).device -// device(type='cpu') -// >>> torch.set_default_device('cuda') # current device is 0 -// >>> torch.tensor([1.2, 3]).device -// device(type='cuda', index=0) -// >>> torch.set_default_device('cuda:1') -// >>> torch.tensor([1.2, 3]).device -// device(type='cuda', index=1) -// -//go:linkname SetDefaultDevice py.set_default_device -func SetDefaultDevice(device *py.Object) *py.Object - -// Sets the default “torch.Tensor“ type to floating point tensor type -// -// ``t``. This type will also be used as default floating point type for -// type inference in :func:`torch.tensor`. -// -// The default floating point tensor type is initially ``torch.FloatTensor``. -// -// Args: -// t (type or string): the floating point tensor type or its name -// -// Example:: -// -// >>> # xdoctest: +SKIP("Other tests may have changed the default type. Can we reset it?") -// >>> torch.tensor([1.2, 3]).dtype # initial default for floating point is torch.float32 -// torch.float32 -// >>> torch.set_default_tensor_type(torch.DoubleTensor) -// >>> torch.tensor([1.2, 3]).dtype # a new floating point tensor -// torch.float64 -// -//go:linkname SetDefaultTensorType py.set_default_tensor_type -func SetDefaultTensorType(t *py.Object) *py.Object - -// Sets the default floating point dtype to :attr:`d`. Supports torch.float32 -// and torch.float64 as inputs. Other dtypes may be accepted without complaint -// but are not supported and are unlikely to work as expected. -// -// When PyTorch is initialized its default floating point dtype is torch.float32, -// and the intent of set_default_dtype(torch.float64) is to facilitate NumPy-like -// type inference. The default floating point dtype is used to: -// -// 1. Implicitly determine the default complex dtype. When the default floating point -// type is float32 the default complex dtype is complex64, and when the default -// floating point type is float64 the default complex type is complex128. -// 2. Infer the dtype for tensors constructed using Python floats or complex Python -// numbers. See examples below. -// 3. Determine the result of type promotion between bool and integer tensors and -// Python floats and complex Python numbers. -// -// Args: -// -// d (:class:`torch.dtype`): the floating point dtype to make the default. -// Either torch.float32 or torch.float64. -// -// Example: -// -// >>> # xdoctest: +SKIP("Other tests may have changed the default type. Can we reset it?") -// >>> # initial default for floating point is torch.float32 -// >>> # Python floats are interpreted as float32 -// >>> torch.tensor([1.2, 3]).dtype -// torch.float32 -// >>> # initial default for floating point is torch.complex64 -// >>> # Complex Python numbers are interpreted as complex64 -// >>> torch.tensor([1.2, 3j]).dtype -// torch.complex64 -// -// >>> torch.set_default_dtype(torch.float64) -// -// >>> # Python floats are now interpreted as float64 -// >>> torch.tensor([1.2, 3]).dtype # a new floating point tensor -// torch.float64 -// >>> # Complex Python numbers are now interpreted as complex128 -// >>> torch.tensor([1.2, 3j]).dtype # a new complex tensor -// torch.complex128 -// -//go:linkname SetDefaultDtype py.set_default_dtype -func SetDefaultDtype(d *py.Object) *py.Object - -// Sets whether PyTorch operations must use "deterministic" -// -// algorithms. That is, algorithms which, given the same input, and when -// run on the same software and hardware, always produce the same output. -// When enabled, operations will use deterministic algorithms when available, -// and if only nondeterministic algorithms are available they will throw a -// :class:`RuntimeError` when called. -// -// .. note:: This setting alone is not always enough to make an application -// reproducible. Refer to :ref:`reproducibility` for more information. -// -// .. note:: :func:`torch.set_deterministic_debug_mode` offers an alternative -// interface for this feature. -// -// The following normally-nondeterministic operations will act -// deterministically when ``mode=True``: -// -// * :class:`torch.nn.Conv1d` when called on CUDA tensor -// * :class:`torch.nn.Conv2d` when called on CUDA tensor -// * :class:`torch.nn.Conv3d` when called on CUDA tensor -// * :class:`torch.nn.ConvTranspose1d` when called on CUDA tensor -// * :class:`torch.nn.ConvTranspose2d` when called on CUDA tensor -// * :class:`torch.nn.ConvTranspose3d` when called on CUDA tensor -// * :class:`torch.nn.ReplicationPad2d` when attempting to differentiate a CUDA tensor -// * :func:`torch.bmm` when called on sparse-dense CUDA tensors -// * :func:`torch.Tensor.__getitem__` when attempting to differentiate a CPU tensor -// and the index is a list of tensors -// * :func:`torch.Tensor.index_put` with ``accumulate=False`` -// * :func:`torch.Tensor.index_put` with ``accumulate=True`` when called on a CPU -// tensor -// * :func:`torch.Tensor.put_` with ``accumulate=True`` when called on a CPU -// tensor -// * :func:`torch.Tensor.scatter_add_` when called on a CUDA tensor -// * :func:`torch.gather` when called on a CUDA tensor that requires grad -// * :func:`torch.index_add` when called on CUDA tensor -// * :func:`torch.index_select` when attempting to differentiate a CUDA tensor -// * :func:`torch.repeat_interleave` when attempting to differentiate a CUDA tensor -// * :func:`torch.Tensor.index_copy` when called on a CPU or CUDA tensor -// * :func:`torch.Tensor.scatter` when `src` type is Tensor and called on CUDA tensor -// * :func:`torch.Tensor.scatter_reduce` when ``reduce='sum'`` or ``reduce='mean'`` and called on CUDA tensor -// -// The following normally-nondeterministic operations will throw a -// :class:`RuntimeError` when ``mode=True``: -// -// * :class:`torch.nn.AvgPool3d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.AdaptiveAvgPool2d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.AdaptiveAvgPool3d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.MaxPool3d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.AdaptiveMaxPool2d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.FractionalMaxPool2d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.FractionalMaxPool3d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.MaxUnpool1d` -// * :class:`torch.nn.MaxUnpool2d` -// * :class:`torch.nn.MaxUnpool3d` -// * :func:`torch.nn.functional.interpolate` when attempting to differentiate a CUDA tensor -// and one of the following modes is used: -// -// - ``linear`` -// - ``bilinear`` -// - ``bicubic`` -// - ``trilinear`` -// -// * :class:`torch.nn.ReflectionPad1d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.ReflectionPad2d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.ReflectionPad3d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.ReplicationPad1d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.ReplicationPad3d` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.NLLLoss` when called on a CUDA tensor -// * :class:`torch.nn.CTCLoss` when attempting to differentiate a CUDA tensor -// * :class:`torch.nn.EmbeddingBag` when attempting to differentiate a CUDA tensor when -// ``mode='max'`` -// * :func:`torch.Tensor.put_` when ``accumulate=False`` -// * :func:`torch.Tensor.put_` when ``accumulate=True`` and called on a CUDA tensor -// * :func:`torch.histc` when called on a CUDA tensor -// * :func:`torch.bincount` when called on a CUDA tensor and ``weights`` -// tensor is given -// * :func:`torch.kthvalue` with called on a CUDA tensor -// * :func:`torch.median` with indices output when called on a CUDA tensor -// * :func:`torch.nn.functional.grid_sample` when attempting to differentiate a CUDA tensor -// * :func:`torch.cumsum` when called on a CUDA tensor when dtype is floating point or complex -// * :func:`torch.Tensor.scatter_reduce` when ``reduce='prod'`` and called on CUDA tensor -// * :func:`torch.Tensor.resize_` when called with a quantized tensor -// -// In addition, several operations fill uninitialized memory when this setting -// is turned on and when -// :attr:`torch.utils.deterministic.fill_uninitialized_memory` is turned on. -// See the documentation for that attribute for more information. -// -// A handful of CUDA operations are nondeterministic if the CUDA version is -// 10.2 or greater, unless the environment variable ``CUBLAS_WORKSPACE_CONFIG=:4096:8`` -// or ``CUBLAS_WORKSPACE_CONFIG=:16:8`` is set. See the CUDA documentation for more -// details: ``_ -// If one of these environment variable configurations is not set, a :class:`RuntimeError` -// will be raised from these operations when called with CUDA tensors: -// -// * :func:`torch.mm` -// * :func:`torch.mv` -// * :func:`torch.bmm` -// -// Note that deterministic operations tend to have worse performance than -// nondeterministic operations. -// -// .. note:: -// -// This flag does not detect or prevent nondeterministic behavior caused -// by calling an inplace operation on a tensor with an internal memory -// overlap or by giving such a tensor as the :attr:`out` argument for an -// operation. In these cases, multiple writes of different data may target -// a single memory location, and the order of writes is not guaranteed. -// -// Args: -// mode (:class:`bool`): If True, makes potentially nondeterministic -// operations switch to a deterministic algorithm or throw a runtime -// error. If False, allows nondeterministic operations. -// -// Keyword args: -// warn_only (:class:`bool`, optional): If True, operations that do not -// have a deterministic implementation will throw a warning instead of -// an error. Default: ``False`` -// -// Example:: -// -// >>> # xdoctest: +SKIP -// >>> torch.use_deterministic_algorithms(True) -// -// # Forward mode nondeterministic error -// >>> torch.randn(10, device='cuda').kthvalue(1) -// ... -// RuntimeError: kthvalue CUDA does not have a deterministic implementation... -// -// # Backward mode nondeterministic error -// >>> torch.nn.AvgPool3d(1)(torch.randn(3, 4, 5, 6, requires_grad=True).cuda()).sum().backward() -// ... -// RuntimeError: avg_pool3d_backward_cuda does not have a deterministic implementation... -// -//go:linkname UseDeterministicAlgorithms py.use_deterministic_algorithms -func UseDeterministicAlgorithms(mode *py.Object) *py.Object - -// Returns True if the global deterministic flag is turned on. Refer to -// -// :func:`torch.use_deterministic_algorithms` documentation for more details. -// -//go:linkname AreDeterministicAlgorithmsEnabled py.are_deterministic_algorithms_enabled -func AreDeterministicAlgorithmsEnabled() *py.Object - -// Returns True if the global deterministic flag is set to warn only. -// -// Refer to :func:`torch.use_deterministic_algorithms` documentation for more -// details. -// -//go:linkname IsDeterministicAlgorithmsWarnOnlyEnabled py.is_deterministic_algorithms_warn_only_enabled -func IsDeterministicAlgorithmsWarnOnlyEnabled() *py.Object - -// Sets the debug mode for deterministic operations. -// -// .. note:: This is an alternative interface for -// :func:`torch.use_deterministic_algorithms`. Refer to that function's -// documentation for details about affected operations. -// -// Args: -// debug_mode(str or int): If "default" or 0, don't error or warn on -// nondeterministic operations. If "warn" or 1, warn on -// nondeterministic operations. If "error" or 2, error on -// nondeterministic operations. -// -//go:linkname SetDeterministicDebugMode py.set_deterministic_debug_mode -func SetDeterministicDebugMode(debugMode *py.Object) *py.Object - -// Returns the current value of the debug mode for deterministic -// -// operations. Refer to :func:`torch.set_deterministic_debug_mode` -// documentation for more details. -// -//go:linkname GetDeterministicDebugMode py.get_deterministic_debug_mode -func GetDeterministicDebugMode() *py.Object - -// Returns the current value of float32 matrix multiplication precision. Refer to -// -// :func:`torch.set_float32_matmul_precision` documentation for more details. -// -//go:linkname GetFloat32MatmulPrecision py.get_float32_matmul_precision -func GetFloat32MatmulPrecision() *py.Object - -// Sets the internal precision of float32 matrix multiplications. -// -// Running float32 matrix multiplications in lower precision may significantly increase -// performance, and in some programs the loss of precision has a negligible impact. -// -// Supports three settings: -// -// * "highest", float32 matrix multiplications use the float32 datatype (24 mantissa -// bits) for internal computations. -// * "high", float32 matrix multiplications either use the TensorFloat32 datatype (10 -// mantissa bits) or treat each float32 number as the sum of two bfloat16 numbers -// (approximately 16 mantissa bits), if the appropriate fast matrix multiplication -// algorithms are available. Otherwise float32 matrix multiplications are computed -// as if the precision is "highest". See below for more information on the bfloat16 -// approach. -// * "medium", float32 matrix multiplications use the bfloat16 datatype (8 mantissa -// bits) for internal computations, if a fast matrix multiplication algorithm -// using that datatype internally is available. Otherwise float32 -// matrix multiplications are computed as if the precision is "high". -// -// When using "high" precision, float32 multiplications may use a bfloat16-based algorithm -// that is more complicated than simply truncating to some smaller number mantissa bits -// (e.g. 10 for TensorFloat32, 8 for bfloat16). Refer to [Henry2019]_ for a complete -// description of this algorithm. To briefly explain here, the first step is to realize -// that we can perfectly encode a single float32 number as the sum of three bfloat16 -// numbers (because float32 has 24 mantissa bits while bfloat16 has 8, and both have the -// same number of exponent bits). This means that the product of two float32 numbers can -// be exactly given by the sum of nine products of bfloat16 numbers. We can then trade -// accuracy for speed by dropping some of these products. The "high" precision algorithm -// specifically keeps only the three most significant products, which conveniently excludes -// all of the products involving the last 8 mantissa bits of either input. This means that -// we can represent our inputs as the sum of two bfloat16 numbers rather than three. -// Because bfloat16 fused-multiply-add (FMA) instructions are typically >10x faster than -// float32 ones, it's faster to do three multiplications and 2 additions with bfloat16 -// precision than it is to do a single multiplication with float32 precision. -// -// .. [Henry2019] http://arxiv.org/abs/1904.06376 -// -// .. note:: -// -// This does not change the output dtype of float32 matrix multiplications, -// it controls how the internal computation of the matrix multiplication is performed. -// -// .. note:: -// -// This does not change the precision of convolution operations. Other flags, -// like `torch.backends.cudnn.allow_tf32`, may control the precision of convolution -// operations. -// -// .. note:: -// -// This flag currently only affects one native device type: CUDA. -// If "high" or "medium" are set then the TensorFloat32 datatype will be used -// when computing float32 matrix multiplications, equivalent to setting -// `torch.backends.cuda.matmul.allow_tf32 = True`. When "highest" (the default) -// is set then the float32 datatype is used for internal computations, equivalent -// to setting `torch.backends.cuda.matmul.allow_tf32 = False`. -// -// Args: -// precision(str): can be set to "highest" (default), "high", or "medium" (see above). -// -//go:linkname SetFloat32MatmulPrecision py.set_float32_matmul_precision -func SetFloat32MatmulPrecision(precision *py.Object) *py.Object - -// When this flag is False (default) then some PyTorch warnings may only -// -// appear once per process. This helps avoid excessive warning information. -// Setting it to True causes these warnings to always appear, which may be -// helpful when debugging. -// -// Args: -// b (:class:`bool`): If True, force warnings to always be emitted -// If False, set to the default behaviour -// -//go:linkname SetWarnAlways py.set_warn_always -func SetWarnAlways(b *py.Object) *py.Object - -// Returns True if the global warn_always flag is turned on. Refer to -// -// :func:`torch.set_warn_always` documentation for more details. -// -//go:linkname IsWarnAlwaysEnabled py.is_warn_always_enabled -func IsWarnAlwaysEnabled() *py.Object - -// Sets the random number generator state. -// -// .. note: This function only works for CPU. For CUDA, please use -// torch.manual_seed(seed), which works for both CPU and CUDA. -// -// Args: -// new_state (torch.ByteTensor): The desired state -// -//go:linkname SetRngState py.set_rng_state -func SetRngState(newState *py.Object) *py.Object - -// Returns the random number generator state as a `torch.ByteTensor`. -// -//go:linkname GetRngState py.get_rng_state -func GetRngState() *py.Object - -// Sets the seed for generating random numbers. Returns a -// -// `torch.Generator` object. -// -// Args: -// seed (int): The desired seed. Value must be within the inclusive range -// `[-0x8000_0000_0000_0000, 0xffff_ffff_ffff_ffff]`. Otherwise, a RuntimeError -// is raised. Negative inputs are remapped to positive values with the formula -// `0xffff_ffff_ffff_ffff + seed`. -// -//go:linkname ManualSeed py.manual_seed -func ManualSeed(seed *py.Object) *py.Object - -// Returns the initial seed for generating random numbers as a -// -// Python `long`. -// -//go:linkname InitialSeed py.initial_seed -func InitialSeed() *py.Object - -// Sets the seed for generating random numbers to a non-deterministic -// -// random number. Returns a 64 bit number used to seed the RNG. -// -//go:linkname Seed py.seed -func Seed() *py.Object - -// save(obj, f, pickle_module=pickle, pickle_protocol=DEFAULT_PROTOCOL, _use_new_zipfile_serialization=True) -// -// Saves an object to a disk file. -// -// See also: :ref:`saving-loading-tensors` -// -// Args: -// obj: saved object -// f: a file-like object (has to implement write and flush) or a string or -// os.PathLike object containing a file name -// pickle_module: module used for pickling metadata and objects -// pickle_protocol: can be specified to override the default protocol -// -// .. note:: -// A common PyTorch convention is to save tensors using .pt file extension. -// -// .. note:: -// PyTorch preserves storage sharing across serialization. See -// :ref:`preserve-storage-sharing` for more details. -// -// .. note:: -// The 1.6 release of PyTorch switched ``torch.save`` to use a new -// zipfile-based file format. ``torch.load`` still retains the ability to -// load files in the old format. If for any reason you want ``torch.save`` -// to use the old format, pass the kwarg ``_use_new_zipfile_serialization=False``. -// -// Example: -// >>> # xdoctest: +SKIP("makes cwd dirty") -// >>> # Save to file -// >>> x = torch.tensor([0, 1, 2, 3, 4]) -// >>> torch.save(x, 'tensor.pt') -// >>> # Save to io.BytesIO buffer -// >>> buffer = io.BytesIO() -// >>> torch.save(x, buffer) -// -//go:linkname Save py.save -func Save(obj *py.Object, f *py.Object, pickleModule *py.Object, pickleProtocol *py.Object, UseNewZipfileSerialization *py.Object, DisableByteorderRecord *py.Object) *py.Object - -// load(f, map_location=None, pickle_module=pickle, *, weights_only=False, mmap=None, **pickle_load_args) -// -// Loads an object saved with :func:`torch.save` from a file. -// -// :func:`torch.load` uses Python's unpickling facilities but treats storages, -// which underlie tensors, specially. They are first deserialized on the -// CPU and are then moved to the device they were saved from. If this fails -// (e.g. because the run time system doesn't have certain devices), an exception -// is raised. However, storages can be dynamically remapped to an alternative -// set of devices using the :attr:`map_location` argument. -// -// If :attr:`map_location` is a callable, it will be called once for each serialized -// storage with two arguments: storage and location. The storage argument -// will be the initial deserialization of the storage, residing on the CPU. -// Each serialized storage has a location tag associated with it which -// identifies the device it was saved from, and this tag is the second -// argument passed to :attr:`map_location`. The builtin location tags are ``'cpu'`` -// for CPU tensors and ``'cuda:device_id'`` (e.g. ``'cuda:2'``) for CUDA tensors. -// :attr:`map_location` should return either ``None`` or a storage. If -// :attr:`map_location` returns a storage, it will be used as the final deserialized -// object, already moved to the right device. Otherwise, :func:`torch.load` will -// fall back to the default behavior, as if :attr:`map_location` wasn't specified. -// -// If :attr:`map_location` is a :class:`torch.device` object or a string containing -// a device tag, it indicates the location where all tensors should be loaded. -// -// Otherwise, if :attr:`map_location` is a dict, it will be used to remap location tags -// appearing in the file (keys), to ones that specify where to put the -// storages (values). -// -// User extensions can register their own location tags and tagging and -// deserialization methods using :func:`torch.serialization.register_package`. -// -// Args: -// f: a file-like object (has to implement :meth:`read`, :meth:`readline`, :meth:`tell`, and :meth:`seek`), -// or a string or os.PathLike object containing a file name -// map_location: a function, :class:`torch.device`, string or a dict specifying how to remap storage -// locations -// pickle_module: module used for unpickling metadata and objects (has to -// match the :attr:`pickle_module` used to serialize file) -// weights_only: Indicates whether unpickler should be restricted to -// loading only tensors, primitive types and dictionaries -// mmap: Indicates whether the file should be mmaped rather than loading all the storages into memory. -// Typically, tensor storages in the file will first be moved from disk to CPU memory, after which they -// are moved to the location that they were tagged with when saving, or specified by ``map_location``. This -// second step is a no-op if the final location is CPU. When the ``mmap`` flag is set, instead of copying the -// tensor storages from disk to CPU memory in the first step, ``f`` is mmaped. -// pickle_load_args: (Python 3 only) optional keyword arguments passed over to -// :func:`pickle_module.load` and :func:`pickle_module.Unpickler`, e.g., -// :attr:`errors=...`. -// -// .. warning:: -// :func:`torch.load()` unless `weights_only` parameter is set to `True`, -// uses ``pickle`` module implicitly, which is known to be insecure. -// It is possible to construct malicious pickle data which will execute arbitrary code -// during unpickling. Never load data that could have come from an untrusted -// source in an unsafe mode, or that could have been tampered with. **Only load data you trust**. -// -// .. note:: -// When you call :func:`torch.load()` on a file which contains GPU tensors, those tensors -// will be loaded to GPU by default. You can call ``torch.load(.., map_location='cpu')`` -// and then :meth:`load_state_dict` to avoid GPU RAM surge when loading a model checkpoint. -// -// .. note:: -// By default, we decode byte strings as ``utf-8``. This is to avoid a common error -// case ``UnicodeDecodeError: 'ascii' codec can't decode byte 0x...`` -// when loading files saved by Python 2 in Python 3. If this default -// is incorrect, you may use an extra :attr:`encoding` keyword argument to specify how -// these objects should be loaded, e.g., :attr:`encoding='latin1'` decodes them -// to strings using ``latin1`` encoding, and :attr:`encoding='bytes'` keeps them -// as byte arrays which can be decoded later with ``byte_array.decode(...)``. -// -// Example: -// >>> # xdoctest: +SKIP("undefined filepaths") -// >>> torch.load('tensors.pt', weights_only=True) -// # Load all tensors onto the CPU -// >>> torch.load('tensors.pt', map_location=torch.device('cpu'), weights_only=True) -// # Load all tensors onto the CPU, using a function -// >>> torch.load('tensors.pt', map_location=lambda storage, loc: storage, weights_only=True) -// # Load all tensors onto GPU 1 -// >>> torch.load('tensors.pt', map_location=lambda storage, loc: storage.cuda(1), weights_only=True) -// # Map tensors from GPU 1 to GPU 0 -// >>> torch.load('tensors.pt', map_location={'cuda:1': 'cuda:0'}, weights_only=True) -// # Load tensor from io.BytesIO object -// # Loading from a buffer setting weights_only=False, warning this can be unsafe -// >>> with open('tensor.pt', 'rb') as f: -// ... buffer = io.BytesIO(f.read()) -// >>> torch.load(buffer, weights_only=False) -// # Load a module with 'ascii' encoding for unpickling -// # Loading from a module setting weights_only=False, warning this can be unsafe -// >>> torch.load('module.pt', encoding='ascii', weights_only=False) -// -//go:linkname Load py.load -func Load(f *py.Object, mapLocation *py.Object, pickleModule *py.Object) *py.Object - -// Set options for printing. Items shamelessly taken from NumPy -// -// Args: -// precision: Number of digits of precision for floating point output -// (default = 4). -// threshold: Total number of array elements which trigger summarization -// rather than full `repr` (default = 1000). -// edgeitems: Number of array items in summary at beginning and end of -// each dimension (default = 3). -// linewidth: The number of characters per line for the purpose of -// inserting line breaks (default = 80). Thresholded matrices will -// ignore this parameter. -// profile: Sane defaults for pretty printing. Can override with any of -// the above options. (any one of `default`, `short`, `full`) -// sci_mode: Enable (True) or disable (False) scientific notation. If -// None (default) is specified, the value is defined by -// `torch._tensor_str._Formatter`. This value is automatically chosen -// by the framework. -// -// Example:: -// -// >>> # Limit the precision of elements -// >>> torch.set_printoptions(precision=2) -// >>> torch.tensor([1.12345]) -// tensor([1.12]) -// >>> # Limit the number of elements shown -// >>> torch.set_printoptions(threshold=5) -// >>> torch.arange(10) -// tensor([0, 1, 2, ..., 7, 8, 9]) -// >>> # Restore defaults -// >>> torch.set_printoptions(profile='default') -// >>> torch.tensor([1.12345]) -// tensor([1.1235]) -// >>> torch.arange(10) -// tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) -// -//go:linkname SetPrintoptions py.set_printoptions -func SetPrintoptions(precision *py.Object, threshold *py.Object, edgeitems *py.Object, linewidth *py.Object, profile *py.Object, sciMode *py.Object) *py.Object - -// Returns a 1-dimensional view of each input tensor with zero dimensions. -// Input tensors with one or more dimensions are returned as-is. -// -// Args: -// -// input (Tensor or list of Tensors) -// -// Returns: -// -// output (Tensor or tuple of Tensors) -// -// Example:: -// -// >>> x = torch.arange(2) -// >>> x -// tensor([0, 1]) -// >>> torch.atleast_1d(x) -// tensor([0, 1]) -// >>> x = torch.tensor(1.) -// >>> x -// tensor(1.) -// >>> torch.atleast_1d(x) -// tensor([1.]) -// >>> x = torch.tensor(0.5) -// >>> y = torch.tensor(1.) -// >>> torch.atleast_1d((x, y)) -// (tensor([0.5000]), tensor([1.])) -// -//go:linkname Atleast1d py.atleast_1d -func Atleast1d(__llgo_va_list ...interface{}) *py.Object - -// Returns a 2-dimensional view of each input tensor with zero dimensions. -// Input tensors with two or more dimensions are returned as-is. -// -// Args: -// -// input (Tensor or list of Tensors) -// -// Returns: -// -// output (Tensor or tuple of Tensors) -// -// Example:: -// -// >>> x = torch.tensor(1.) -// >>> x -// tensor(1.) -// >>> torch.atleast_2d(x) -// tensor([[1.]]) -// >>> x = torch.arange(4).view(2, 2) -// >>> x -// tensor([[0, 1], -// [2, 3]]) -// >>> torch.atleast_2d(x) -// tensor([[0, 1], -// [2, 3]]) -// >>> x = torch.tensor(0.5) -// >>> y = torch.tensor(1.) -// >>> torch.atleast_2d((x, y)) -// (tensor([[0.5000]]), tensor([[1.]])) -// -//go:linkname Atleast2d py.atleast_2d -func Atleast2d(__llgo_va_list ...interface{}) *py.Object - -// Returns a 3-dimensional view of each input tensor with zero dimensions. -// Input tensors with three or more dimensions are returned as-is. -// -// Args: -// -// input (Tensor or list of Tensors) -// -// Returns: -// -// output (Tensor or tuple of Tensors) -// -// Example: -// -// >>> x = torch.tensor(0.5) -// >>> x -// tensor(0.5000) -// >>> torch.atleast_3d(x) -// tensor([[[0.5000]]]) -// >>> y = torch.arange(4).view(2, 2) -// >>> y -// tensor([[0, 1], -// [2, 3]]) -// >>> torch.atleast_3d(y) -// tensor([[[0], -// [1]], -// -// [[2], -// [3]]]) -// >>> x = torch.tensor(1).view(1, 1, 1) -// >>> x -// tensor([[[1]]]) -// >>> torch.atleast_3d(x) -// tensor([[[1]]]) -// >>> x = torch.tensor(0.5) -// >>> y = torch.tensor(1.) -// >>> torch.atleast_3d((x, y)) -// (tensor([[[0.5000]]]), tensor([[[1.]]])) -// -//go:linkname Atleast3d py.atleast_3d -func Atleast3d(__llgo_va_list ...interface{}) *py.Object - -// Create a block diagonal matrix from provided tensors. -// -// Args: -// *tensors: One or more tensors with 0, 1, or 2 dimensions. -// -// Returns: -// Tensor: A 2 dimensional tensor with all the input tensors arranged in -// order such that their upper left and lower right corners are -// diagonally adjacent. All other elements are set to 0. -// -// Example:: -// -// >>> import torch -// >>> A = torch.tensor([[0, 1], [1, 0]]) -// >>> B = torch.tensor([[3, 4, 5], [6, 7, 8]]) -// >>> C = torch.tensor(7) -// >>> D = torch.tensor([1, 2, 3]) -// >>> E = torch.tensor([[4], [5], [6]]) -// >>> torch.block_diag(A, B, C, D, E) -// tensor([[0, 1, 0, 0, 0, 0, 0, 0, 0, 0], -// [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], -// [0, 0, 3, 4, 5, 0, 0, 0, 0, 0], -// [0, 0, 6, 7, 8, 0, 0, 0, 0, 0], -// [0, 0, 0, 0, 0, 7, 0, 0, 0, 0], -// [0, 0, 0, 0, 0, 0, 1, 2, 3, 0], -// [0, 0, 0, 0, 0, 0, 0, 0, 0, 4], -// [0, 0, 0, 0, 0, 0, 0, 0, 0, 5], -// [0, 0, 0, 0, 0, 0, 0, 0, 0, 6]]) -// -//go:linkname BlockDiag py.block_diag -func BlockDiag(__llgo_va_list ...interface{}) *py.Object - -// broadcast_tensors(*tensors) -> List of Tensors -// -// Broadcasts the given tensors according to :ref:`broadcasting-semantics`. -// -// Args: -// *tensors: any number of tensors of the same type -// -// .. warning:: -// -// More than one element of a broadcasted tensor may refer to a single -// memory location. As a result, in-place operations (especially ones that -// are vectorized) may result in incorrect behavior. If you need to write -// to the tensors, please clone them first. -// -// Example:: -// -// >>> x = torch.arange(3).view(1, 3) -// >>> y = torch.arange(2).view(2, 1) -// >>> a, b = torch.broadcast_tensors(x, y) -// >>> a.size() -// torch.Size([2, 3]) -// >>> a -// tensor([[0, 1, 2], -// [0, 1, 2]]) -// -//go:linkname BroadcastTensors py.broadcast_tensors -func BroadcastTensors(__llgo_va_list ...interface{}) *py.Object - -// Do cartesian product of the given sequence of tensors. The behavior is similar to -// -// python's `itertools.product`. -// -// Args: -// *tensors: any number of 1 dimensional tensors. -// -// Returns: -// Tensor: A tensor equivalent to converting all the input tensors into lists, -// do `itertools.product` on these lists, and finally convert the resulting list -// into tensor. -// -// Example:: -// -// >>> import itertools -// >>> a = [1, 2, 3] -// >>> b = [4, 5] -// >>> list(itertools.product(a, b)) -// [(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)] -// >>> tensor_a = torch.tensor(a) -// >>> tensor_b = torch.tensor(b) -// >>> torch.cartesian_prod(tensor_a, tensor_b) -// tensor([[1, 4], -// [1, 5], -// [2, 4], -// [2, 5], -// [3, 4], -// [3, 5]]) -// -//go:linkname CartesianProd py.cartesian_prod -func CartesianProd(__llgo_va_list ...interface{}) *py.Object - -// Computes batched the p-norm distance between each pair of the two collections of row vectors. -// -// Args: -// x1 (Tensor): input tensor of shape :math:`B \times P \times M`. -// x2 (Tensor): input tensor of shape :math:`B \times R \times M`. -// p: p value for the p-norm distance to calculate between each vector pair -// :math:`\in [0, \infty]`. -// compute_mode: -// 'use_mm_for_euclid_dist_if_necessary' - will use matrix multiplication approach to calculate -// euclidean distance (p = 2) if P > 25 or R > 25 -// 'use_mm_for_euclid_dist' - will always use matrix multiplication approach to calculate -// euclidean distance (p = 2) -// 'donot_use_mm_for_euclid_dist' - will never use matrix multiplication approach to calculate -// euclidean distance (p = 2) -// Default: use_mm_for_euclid_dist_if_necessary. -// -// If x1 has shape :math:`B \times P \times M` and x2 has shape :math:`B \times R \times M` then the -// output will have shape :math:`B \times P \times R`. -// -// This function is equivalent to `scipy.spatial.distance.cdist(input,'minkowski', p=p)` -// if :math:`p \in (0, \infty)`. When :math:`p = 0` it is equivalent to -// `scipy.spatial.distance.cdist(input, 'hamming') * M`. When :math:`p = \infty`, the closest -// scipy function is `scipy.spatial.distance.cdist(xn, lambda x, y: np.abs(x - y).max())`. -// -// Example: -// -// >>> a = torch.tensor([[0.9041, 0.0196], [-0.3108, -2.4423], [-0.4821, 1.059]]) -// >>> a -// tensor([[ 0.9041, 0.0196], -// [-0.3108, -2.4423], -// [-0.4821, 1.0590]]) -// >>> b = torch.tensor([[-2.1763, -0.4713], [-0.6986, 1.3702]]) -// >>> b -// tensor([[-2.1763, -0.4713], -// [-0.6986, 1.3702]]) -// >>> torch.cdist(a, b, p=2) -// tensor([[3.1193, 2.0959], -// [2.7138, 3.8322], -// [2.2830, 0.3791]]) -// -//go:linkname Cdist py.cdist -func Cdist(x1 *py.Object, x2 *py.Object, p *py.Object, computeMode *py.Object) *py.Object - -// Returns the matrix product of the :math:`N` 2-D tensors. This product is efficiently computed -// -// using the matrix chain order algorithm which selects the order in which incurs the lowest cost in terms -// of arithmetic operations (`[CLRS]`_). Note that since this is a function to compute the product, :math:`N` -// needs to be greater than or equal to 2; if equal to 2 then a trivial matrix-matrix product is returned. -// If :math:`N` is 1, then this is a no-op - the original matrix is returned as is. -// -// .. warning:: -// -// :func:`torch.chain_matmul` is deprecated and will be removed in a future PyTorch release. -// Use :func:`torch.linalg.multi_dot` instead, which accepts a list of two or more tensors -// rather than multiple arguments. -// -// Args: -// matrices (Tensors...): a sequence of 2 or more 2-D tensors whose product is to be determined. -// out (Tensor, optional): the output tensor. Ignored if :attr:`out` = ``None``. -// -// Returns: -// Tensor: if the :math:`i^{th}` tensor was of dimensions :math:`p_{i} \times p_{i + 1}`, then the product -// would be of dimensions :math:`p_{1} \times p_{N + 1}`. -// -// Example:: -// -// >>> # xdoctest: +SKIP -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> a = torch.randn(3, 4) -// >>> b = torch.randn(4, 5) -// >>> c = torch.randn(5, 6) -// >>> d = torch.randn(6, 7) -// >>> # will raise a deprecation warning -// >>> torch.chain_matmul(a, b, c, d) -// tensor([[ -2.3375, -3.9790, -4.1119, -6.6577, 9.5609, -11.5095, -3.2614], -// [ 21.4038, 3.3378, -8.4982, -5.2457, -10.2561, -2.4684, 2.7163], -// [ -0.9647, -5.8917, -2.3213, -5.2284, 12.8615, -12.2816, -2.5095]]) -// -// .. _`[CLRS]`: https://mitpress.mit.edu/books/introduction-algorithms-third-edition -// -//go:linkname ChainMatmul py.chain_matmul -func ChainMatmul(__llgo_va_list ...interface{}) *py.Object - -// einsum(equation, *operands) -> Tensor -// -// Sums the product of the elements of the input :attr:`operands` along dimensions specified using a notation -// based on the Einstein summation convention. -// -// Einsum allows computing many common multi-dimensional linear algebraic array operations by representing them -// in a short-hand format based on the Einstein summation convention, given by :attr:`equation`. The details of -// this format are described below, but the general idea is to label every dimension of the input :attr:`operands` -// with some subscript and define which subscripts are part of the output. The output is then computed by summing -// the product of the elements of the :attr:`operands` along the dimensions whose subscripts are not part of the -// output. For example, matrix multiplication can be computed using einsum as `torch.einsum("ij,jk->ik", A, B)`. -// Here, j is the summation subscript and i and k the output subscripts (see section below for more details on why). -// -// Equation: -// -// The :attr:`equation` string specifies the subscripts (letters in `[a-zA-Z]`) for each dimension of -// the input :attr:`operands` in the same order as the dimensions, separating subscripts for each operand by a -// comma (','), e.g. `'ij,jk'` specify subscripts for two 2D operands. The dimensions labeled with the same subscript -// must be broadcastable, that is, their size must either match or be `1`. The exception is if a subscript is -// repeated for the same input operand, in which case the dimensions labeled with this subscript for this operand -// must match in size and the operand will be replaced by its diagonal along these dimensions. The subscripts that -// appear exactly once in the :attr:`equation` will be part of the output, sorted in increasing alphabetical order. -// The output is computed by multiplying the input :attr:`operands` element-wise, with their dimensions aligned based -// on the subscripts, and then summing out the dimensions whose subscripts are not part of the output. -// -// Optionally, the output subscripts can be explicitly defined by adding an arrow ('->') at the end of the equation -// followed by the subscripts for the output. For instance, the following equation computes the transpose of a -// matrix multiplication: 'ij,jk->ki'. The output subscripts must appear at least once for some input operand and -// at most once for the output. -// -// Ellipsis ('...') can be used in place of subscripts to broadcast the dimensions covered by the ellipsis. -// Each input operand may contain at most one ellipsis which will cover the dimensions not covered by subscripts, -// e.g. for an input operand with 5 dimensions, the ellipsis in the equation `'ab...c'` cover the third and fourth -// dimensions. The ellipsis does not need to cover the same number of dimensions across the :attr:`operands` but the -// 'shape' of the ellipsis (the size of the dimensions covered by them) must broadcast together. If the output is not -// explicitly defined with the arrow ('->') notation, the ellipsis will come first in the output (left-most dimensions), -// before the subscript labels that appear exactly once for the input operands. e.g. the following equation implements -// batch matrix multiplication `'...ij,...jk'`. -// -// A few final notes: the equation may contain whitespaces between the different elements (subscripts, ellipsis, -// arrow and comma) but something like `'. . .'` is not valid. An empty string `''` is valid for scalar operands. -// -// .. note:: -// -// ``torch.einsum`` handles ellipsis ('...') differently from NumPy in that it allows dimensions -// covered by the ellipsis to be summed over, that is, ellipsis are not required to be part of the output. -// -// .. note:: -// -// This function uses opt_einsum (https://optimized-einsum.readthedocs.io/en/stable/) to speed up computation or to -// consume less memory by optimizing contraction order. This optimization occurs when there are at least three -// inputs, since the order does not matter otherwise. Note that finding _the_ optimal path is an NP-hard problem, -// thus, opt_einsum relies on different heuristics to achieve near-optimal results. If opt_einsum is not available, -// the default order is to contract from left to right. -// -// To bypass this default behavior, add the following line to disable the usage of opt_einsum and skip path -// calculation: `torch.backends.opt_einsum.enabled = False` -// -// To specify which strategy you'd like for opt_einsum to compute the contraction path, add the following line: -// `torch.backends.opt_einsum.strategy = 'auto'`. The default strategy is 'auto', and we also support 'greedy' and -// 'optimal'. Disclaimer that the runtime of 'optimal' is factorial in the number of inputs! See more details in -// the opt_einsum documentation (https://optimized-einsum.readthedocs.io/en/stable/path_finding.html). -// -// .. note:: -// -// As of PyTorch 1.10 :func:`torch.einsum` also supports the sublist format (see examples below). In this format, -// subscripts for each operand are specified by sublists, list of integers in the range [0, 52). These sublists -// follow their operands, and an extra sublist can appear at the end of the input to specify the output's -// subscripts., e.g. `torch.einsum(op1, sublist1, op2, sublist2, ..., [subslist_out])`. Python's `Ellipsis` object -// may be provided in a sublist to enable broadcasting as described in the Equation section above. -// -// Args: -// equation (str): The subscripts for the Einstein summation. -// operands (List[Tensor]): The tensors to compute the Einstein summation of. -// -// Examples:: -// -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> # trace -// >>> torch.einsum('ii', torch.randn(4, 4)) -// tensor(-1.2104) -// -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> # diagonal -// >>> torch.einsum('ii->i', torch.randn(4, 4)) -// tensor([-0.1034, 0.7952, -0.2433, 0.4545]) -// -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> # outer product -// >>> x = torch.randn(5) -// >>> y = torch.randn(4) -// >>> torch.einsum('i,j->ij', x, y) -// tensor([[ 0.1156, -0.2897, -0.3918, 0.4963], -// [-0.3744, 0.9381, 1.2685, -1.6070], -// [ 0.7208, -1.8058, -2.4419, 3.0936], -// [ 0.1713, -0.4291, -0.5802, 0.7350], -// [ 0.5704, -1.4290, -1.9323, 2.4480]]) -// -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> # batch matrix multiplication -// >>> As = torch.randn(3, 2, 5) -// >>> Bs = torch.randn(3, 5, 4) -// >>> torch.einsum('bij,bjk->bik', As, Bs) -// tensor([[[-1.0564, -1.5904, 3.2023, 3.1271], -// [-1.6706, -0.8097, -0.8025, -2.1183]], -// -// [[ 4.2239, 0.3107, -0.5756, -0.2354], -// [-1.4558, -0.3460, 1.5087, -0.8530]], -// -// [[ 2.8153, 1.8787, -4.3839, -1.2112], -// [ 0.3728, -2.1131, 0.0921, 0.8305]]]) -// -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> # with sublist format and ellipsis -// >>> torch.einsum(As, [..., 0, 1], Bs, [..., 1, 2], [..., 0, 2]) -// tensor([[[-1.0564, -1.5904, 3.2023, 3.1271], -// [-1.6706, -0.8097, -0.8025, -2.1183]], -// -// [[ 4.2239, 0.3107, -0.5756, -0.2354], -// [-1.4558, -0.3460, 1.5087, -0.8530]], -// -// [[ 2.8153, 1.8787, -4.3839, -1.2112], -// [ 0.3728, -2.1131, 0.0921, 0.8305]]]) -// -// >>> # batch permute -// >>> A = torch.randn(2, 3, 4, 5) -// >>> torch.einsum('...ij->...ji', A).shape -// torch.Size([2, 3, 5, 4]) -// -// >>> # equivalent to torch.nn.functional.bilinear -// >>> A = torch.randn(3, 5, 4) -// >>> l = torch.randn(2, 5) -// >>> r = torch.randn(2, 4) -// >>> torch.einsum('bn,anm,bm->ba', l, A, r) -// tensor([[-0.3430, -5.2405, 0.4494], -// [ 0.3311, 5.5201, -3.0356]]) -// -//go:linkname Einsum py.einsum -func Einsum(__llgo_va_list ...interface{}) *py.Object - -// Creates grids of coordinates specified by the 1D inputs in `attr`:tensors. -// -// This is helpful when you want to visualize data over some -// range of inputs. See below for a plotting example. -// -// Given :math:`N` 1D tensors :math:`T_0 \ldots T_{N-1}` as -// inputs with corresponding sizes :math:`S_0 \ldots S_{N-1}`, -// this creates :math:`N` N-dimensional tensors :math:`G_0 \ldots -// G_{N-1}`, each with shape :math:`(S_0, ..., S_{N-1})` where -// the output :math:`G_i` is constructed by expanding :math:`T_i` -// to the result shape. -// -// .. note:: -// 0D inputs are treated equivalently to 1D inputs of a -// single element. -// -// .. warning:: -// `torch.meshgrid(*tensors)` currently has the same behavior -// as calling `numpy.meshgrid(*arrays, indexing='ij')`. -// -// In the future `torch.meshgrid` will transition to -// `indexing='xy'` as the default. -// -// https://github.com/pytorch/pytorch/issues/50276 tracks -// this issue with the goal of migrating to NumPy's behavior. -// -// .. seealso:: -// -// :func:`torch.cartesian_prod` has the same effect but it -// collects the data in a tensor of vectors. -// -// Args: -// tensors (list of Tensor): list of scalars or 1 dimensional tensors. Scalars will be -// treated as tensors of size :math:`(1,)` automatically -// -// indexing: (str, optional): the indexing mode, either "xy" -// or "ij", defaults to "ij". See warning for future changes. -// -// If "xy" is selected, the first dimension corresponds -// to the cardinality of the second input and the second -// dimension corresponds to the cardinality of the first -// input. -// -// If "ij" is selected, the dimensions are in the same -// order as the cardinality of the inputs. -// -// Returns: -// seq (sequence of Tensors): If the input has :math:`N` -// tensors of size :math:`S_0 \ldots S_{N-1}``, then the -// output will also have :math:`N` tensors, where each tensor -// is of shape :math:`(S_0, ..., S_{N-1})`. -// -// Example:: -// -// >>> x = torch.tensor([1, 2, 3]) -// >>> y = torch.tensor([4, 5, 6]) -// -// Observe the element-wise pairings across the grid, (1, 4), -// (1, 5), ..., (3, 6). This is the same thing as the -// cartesian product. -// >>> grid_x, grid_y = torch.meshgrid(x, y, indexing='ij') -// >>> grid_x -// tensor([[1, 1, 1], -// [2, 2, 2], -// [3, 3, 3]]) -// >>> grid_y -// tensor([[4, 5, 6], -// [4, 5, 6], -// [4, 5, 6]]) -// -// This correspondence can be seen when these grids are -// stacked properly. -// >>> torch.equal(torch.cat(tuple(torch.dstack([grid_x, grid_y]))), -// ... torch.cartesian_prod(x, y)) -// True -// -// `torch.meshgrid` is commonly used to produce a grid for -// plotting. -// >>> # xdoctest: +REQUIRES(module:matplotlib) -// >>> # xdoctest: +REQUIRES(env:DOCTEST_SHOW) -// >>> import matplotlib.pyplot as plt -// >>> xs = torch.linspace(-5, 5, steps=100) -// >>> ys = torch.linspace(-5, 5, steps=100) -// >>> x, y = torch.meshgrid(xs, ys, indexing='xy') -// >>> z = torch.sin(torch.sqrt(x * x + y * y)) -// >>> ax = plt.axes(projection='3d') -// >>> ax.plot_surface(x.numpy(), y.numpy(), z.numpy()) -// >>> plt.show() -// -// .. image:: ../_static/img/meshgrid.png -// :width: 512 -// -//go:linkname Meshgrid py.meshgrid -func Meshgrid(__llgo_va_list ...interface{}) *py.Object - -// Returns the matrix norm or vector norm of a given tensor. -// -// .. warning:: -// -// torch.norm is deprecated and may be removed in a future PyTorch release. -// Its documentation and behavior may be incorrect, and it is no longer -// actively maintained. -// -// Use :func:`torch.linalg.vector_norm` when computing vector norms and -// :func:`torch.linalg.matrix_norm` when computing matrix norms. -// For a function with a similar behavior as this one see :func:`torch.linalg.norm`. -// Note, however, the signature for these functions is slightly different than the -// signature for ``torch.norm``. -// -// Args: -// input (Tensor): The input tensor. Its data type must be either a floating -// point or complex type. For complex inputs, the norm is calculated using the -// absolute value of each element. If the input is complex and neither -// :attr:`dtype` nor :attr:`out` is specified, the result's data type will -// be the corresponding floating point type (e.g. float if :attr:`input` is -// complexfloat). -// -// p (int, float, inf, -inf, 'fro', 'nuc', optional): the order of norm. Default: ``'fro'`` -// The following norms can be calculated: -// -// ====== ============== ========================== -// ord matrix norm vector norm -// ====== ============== ========================== -// 'fro' Frobenius norm -- -// 'nuc' nuclear norm -- -// Number -- sum(abs(x)**ord)**(1./ord) -// ====== ============== ========================== -// -// The vector norm can be calculated across any number of dimensions. -// The corresponding dimensions of :attr:`input` are flattened into -// one dimension, and the norm is calculated on the flattened -// dimension. -// -// Frobenius norm produces the same result as ``p=2`` in all cases -// except when :attr:`dim` is a list of three or more dims, in which -// case Frobenius norm throws an error. -// -// Nuclear norm can only be calculated across exactly two dimensions. -// -// dim (int, tuple of ints, list of ints, optional): -// Specifies which dimension or dimensions of :attr:`input` to -// calculate the norm across. If :attr:`dim` is ``None``, the norm will -// be calculated across all dimensions of :attr:`input`. If the norm -// type indicated by :attr:`p` does not support the specified number of -// dimensions, an error will occur. -// keepdim (bool, optional): whether the output tensors have :attr:`dim` -// retained or not. Ignored if :attr:`dim` = ``None`` and -// :attr:`out` = ``None``. Default: ``False`` -// out (Tensor, optional): the output tensor. Ignored if -// :attr:`dim` = ``None`` and :attr:`out` = ``None``. -// dtype (:class:`torch.dtype`, optional): the desired data type of -// returned tensor. If specified, the input tensor is casted to -// :attr:`dtype` while performing the operation. Default: None. -// -// .. note:: -// Even though ``p='fro'`` supports any number of dimensions, the true -// mathematical definition of Frobenius norm only applies to tensors with -// exactly two dimensions. :func:`torch.linalg.matrix_norm` with ``ord='fro'`` -// aligns with the mathematical definition, since it can only be applied across -// exactly two dimensions. -// -// Example:: -// -// >>> import torch -// >>> a = torch.arange(9, dtype= torch.float) - 4 -// >>> b = a.reshape((3, 3)) -// >>> torch.norm(a) -// tensor(7.7460) -// >>> torch.norm(b) -// tensor(7.7460) -// >>> torch.norm(a, float('inf')) -// tensor(4.) -// >>> torch.norm(b, float('inf')) -// tensor(4.) -// >>> c = torch.tensor([[ 1, 2, 3], [-1, 1, 4]] , dtype=torch.float) -// >>> torch.norm(c, dim=0) -// tensor([1.4142, 2.2361, 5.0000]) -// >>> torch.norm(c, dim=1) -// tensor([3.7417, 4.2426]) -// >>> torch.norm(c, p=1, dim=1) -// tensor([6., 6.]) -// >>> d = torch.arange(8, dtype=torch.float).reshape(2, 2, 2) -// >>> torch.norm(d, dim=(1, 2)) -// tensor([ 3.7417, 11.2250]) -// >>> torch.norm(d[0, :, :]), torch.norm(d[1, :, :]) -// (tensor(3.7417), tensor(11.2250)) -// -//go:linkname Norm py.norm -func Norm(input *py.Object, p *py.Object, dim *py.Object, keepdim *py.Object, out *py.Object, dtype *py.Object) *py.Object - -// Splits the tensor into chunks. Each chunk is a view of the original tensor. -// -// If :attr:`split_size_or_sections` is an integer type, then :attr:`tensor` will -// be split into equally sized chunks (if possible). Last chunk will be smaller if -// the tensor size along the given dimension :attr:`dim` is not divisible by -// :attr:`split_size`. -// -// If :attr:`split_size_or_sections` is a list, then :attr:`tensor` will be split -// into ``len(split_size_or_sections)`` chunks with sizes in :attr:`dim` according -// to :attr:`split_size_or_sections`. -// -// Args: -// tensor (Tensor): tensor to split. -// split_size_or_sections (int) or (list(int)): size of a single chunk or -// list of sizes for each chunk -// dim (int): dimension along which to split the tensor. -// -// Example:: -// -// >>> a = torch.arange(10).reshape(5, 2) -// >>> a -// tensor([[0, 1], -// [2, 3], -// [4, 5], -// [6, 7], -// [8, 9]]) -// >>> torch.split(a, 2) -// (tensor([[0, 1], -// [2, 3]]), -// tensor([[4, 5], -// [6, 7]]), -// tensor([[8, 9]])) -// >>> torch.split(a, [1, 4]) -// (tensor([[0, 1]]), -// tensor([[2, 3], -// [4, 5], -// [6, 7], -// [8, 9]])) -// -//go:linkname Split py.split -func Split(tensor *py.Object, splitSizeOrSections *py.Object, dim *py.Object) *py.Object - -// Short-time Fourier transform (STFT). -// -// .. warning:: -// From version 1.8.0, :attr:`return_complex` must always be given -// explicitly for real inputs and `return_complex=False` has been -// deprecated. Strongly prefer `return_complex=True` as in a future -// pytorch release, this function will only return complex tensors. -// -// Note that :func:`torch.view_as_real` can be used to recover a real -// tensor with an extra last dimension for real and imaginary components. -// -// .. warning:: -// From version 2.1, a warning will be provided if a :attr:`window` is -// not specified. In a future release, this attribute will be required. -// Not providing a window currently defaults to using a rectangular window, -// which may result in undesirable artifacts. Consider using tapered windows, -// such as :func:`torch.hann_window`. -// -// The STFT computes the Fourier transform of short overlapping windows of the -// input. This giving frequency components of the signal as they change over -// time. The interface of this function is modeled after (but *not* a drop-in -// replacement for) librosa_ stft function. -// -// .. _librosa: https://librosa.org/doc/latest/generated/librosa.stft.html -// -// Ignoring the optional batch dimension, this method computes the following -// expression: -// -// .. math:: -// X[\omega, m] = \sum_{k = 0}^{\text{win\_length-1}}% -// \text{window}[k]\ \text{input}[m \times \text{hop\_length} + k]\ % -// \exp\left(- j \frac{2 \pi \cdot \omega k}{\text{n\_fft}}\right), -// -// where :math:`m` is the index of the sliding window, and :math:`\omega` is -// the frequency :math:`0 \leq \omega < \text{n\_fft}` for ``onesided=False``, -// or :math:`0 \leq \omega < \lfloor \text{n\_fft} / 2 \rfloor + 1` for ``onesided=True``. -// -// * :attr:`input` must be either a 1-D time sequence or a 2-D batch of time -// sequences. -// -// * If :attr:`hop_length` is ``None`` (default), it is treated as equal to -// ``floor(n_fft / 4)``. -// -// * If :attr:`win_length` is ``None`` (default), it is treated as equal to -// :attr:`n_fft`. -// -// * :attr:`window` can be a 1-D tensor of size :attr:`win_length`, e.g., from -// :meth:`torch.hann_window`. If :attr:`window` is ``None`` (default), it is -// treated as if having :math:`1` everywhere in the window. If -// :math:`\text{win\_length} < \text{n\_fft}`, :attr:`window` will be padded on -// both sides to length :attr:`n_fft` before being applied. -// -// * If :attr:`center` is ``True`` (default), :attr:`input` will be padded on -// both sides so that the :math:`t`-th frame is centered at time -// :math:`t \times \text{hop\_length}`. Otherwise, the :math:`t`-th frame -// begins at time :math:`t \times \text{hop\_length}`. -// -// * :attr:`pad_mode` determines the padding method used on :attr:`input` when -// :attr:`center` is ``True``. See :meth:`torch.nn.functional.pad` for -// all available options. Default is ``"reflect"``. -// -// * If :attr:`onesided` is ``True`` (default for real input), only values for -// :math:`\omega` in :math:`\left[0, 1, 2, \dots, \left\lfloor -// \frac{\text{n\_fft}}{2} \right\rfloor + 1\right]` are returned because -// the real-to-complex Fourier transform satisfies the conjugate symmetry, -// i.e., :math:`X[m, \omega] = X[m, \text{n\_fft} - \omega]^*`. -// Note if the input or window tensors are complex, then :attr:`onesided` -// output is not possible. -// -// * If :attr:`normalized` is ``True`` (default is ``False``), the function -// returns the normalized STFT results, i.e., multiplied by :math:`(\text{frame\_length})^{-0.5}`. -// -// * If :attr:`return_complex` is ``True`` (default if input is complex), the -// return is a ``input.dim() + 1`` dimensional complex tensor. If ``False``, -// the output is a ``input.dim() + 2`` dimensional real tensor where the last -// dimension represents the real and imaginary components. -// -// Returns either a complex tensor of size :math:`(* \times N \times T)` if -// :attr:`return_complex` is true, or a real tensor of size :math:`(* \times N -// \times T \times 2)`. Where :math:`*` is the optional batch size of -// :attr:`input`, :math:`N` is the number of frequencies where STFT is applied -// and :math:`T` is the total number of frames used. -// -// .. warning:: -// This function changed signature at version 0.4.1. Calling with the -// previous signature may cause error or return incorrect result. -// -// Args: -// input (Tensor): the input tensor of shape `(B?, L)` where `B?` is an optional -// batch dimension -// n_fft (int): size of Fourier transform -// hop_length (int, optional): the distance between neighboring sliding window -// frames. Default: ``None`` (treated as equal to ``floor(n_fft / 4)``) -// win_length (int, optional): the size of window frame and STFT filter. -// Default: ``None`` (treated as equal to :attr:`n_fft`) -// window (Tensor, optional): the optional window function. -// Shape must be 1d and `<= n_fft` -// Default: ``None`` (treated as window of all :math:`1` s) -// center (bool, optional): whether to pad :attr:`input` on both sides so -// that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. -// Default: ``True`` -// pad_mode (str, optional): controls the padding method used when -// :attr:`center` is ``True``. Default: ``"reflect"`` -// normalized (bool, optional): controls whether to return the normalized STFT results -// Default: ``False`` -// onesided (bool, optional): controls whether to return half of results to -// avoid redundancy for real inputs. -// Default: ``True`` for real :attr:`input` and :attr:`window`, ``False`` otherwise. -// return_complex (bool, optional): whether to return a complex tensor, or -// a real tensor with an extra last dimension for the real and -// imaginary components. -// -// .. versionchanged:: 2.0 -// ``return_complex`` is now a required argument for real inputs, -// as the default is being transitioned to ``True``. -// -// .. deprecated:: 2.0 -// ``return_complex=False`` is deprecated, instead use ``return_complex=True`` -// Note that calling :func:`torch.view_as_real` on the output will -// recover the deprecated output format. -// -// Returns: -// Tensor: A tensor containing the STFT result with shape `(B?, N, T, C?)` where -// - `B?` is an optional batch dimnsion from the input -// - `N` is the number of frequency samples, `(n_fft // 2) + 1` for -// `onesided=True`, or otherwise `n_fft`. -// - `T` is the number of frames, `1 + L // hop_length` -// for `center=True`, or `1 + (L - n_fft) // hop_length` otherwise. -// - `C?` is an optional length-2 dimension of real and imaginary -// components, present when `return_complex=False`. -// -//go:linkname Stft py.stft -func Stft(input *py.Object, nFft *py.Object, hopLength *py.Object, winLength *py.Object, window *py.Object, center *py.Object, padMode *py.Object, normalized *py.Object, onesided *py.Object, returnComplex *py.Object) *py.Object - -// Returns a contraction of a and b over multiple dimensions. -// -// :attr:`tensordot` implements a generalized matrix product. -// -// Args: -// a (Tensor): Left tensor to contract -// b (Tensor): Right tensor to contract -// dims (int or Tuple[List[int], List[int]] or List[List[int]] containing two lists or Tensor): number of dimensions to -// contract or explicit lists of dimensions for :attr:`a` and -// :attr:`b` respectively -// -// When called with a non-negative integer argument :attr:`dims` = :math:`d`, and -// the number of dimensions of :attr:`a` and :attr:`b` is :math:`m` and :math:`n`, -// respectively, :func:`~torch.tensordot` computes -// -// .. math:: -// r_{i_0,...,i_{m-d}, i_d,...,i_n} -// = \sum_{k_0,...,k_{d-1}} a_{i_0,...,i_{m-d},k_0,...,k_{d-1}} \times b_{k_0,...,k_{d-1}, i_d,...,i_n}. -// -// When called with :attr:`dims` of the list form, the given dimensions will be contracted -// in place of the last :math:`d` of :attr:`a` and the first :math:`d` of :math:`b`. The sizes -// in these dimensions must match, but :func:`~torch.tensordot` will deal with broadcasted -// dimensions. -// -// Examples:: -// -// >>> a = torch.arange(60.).reshape(3, 4, 5) -// >>> b = torch.arange(24.).reshape(4, 3, 2) -// >>> torch.tensordot(a, b, dims=([1, 0], [0, 1])) -// tensor([[4400., 4730.], -// [4532., 4874.], -// [4664., 5018.], -// [4796., 5162.], -// [4928., 5306.]]) -// -// >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CUDA) -// >>> a = torch.randn(3, 4, 5, device='cuda') -// >>> b = torch.randn(4, 5, 6, device='cuda') -// >>> c = torch.tensordot(a, b, dims=2).cpu() -// tensor([[ 8.3504, -2.5436, 6.2922, 2.7556, -1.0732, 3.2741], -// [ 3.3161, 0.0704, 5.0187, -0.4079, -4.3126, 4.8744], -// [ 0.8223, 3.9445, 3.2168, -0.2400, 3.4117, 1.7780]]) -// -// >>> a = torch.randn(3, 5, 4, 6) -// >>> b = torch.randn(6, 4, 5, 3) -// >>> torch.tensordot(a, b, dims=([2, 1, 3], [1, 2, 0])) -// tensor([[ 7.7193, -2.4867, -10.3204], -// [ 1.5513, -14.4737, -6.5113], -// [ -0.2850, 4.2573, -3.5997]]) -// -//go:linkname Tensordot py.tensordot -func Tensordot(a *py.Object, b *py.Object, dims *py.Object, out *py.Object) *py.Object - -// Eliminates all but the first element from every consecutive group of equivalent elements. -// -// .. note:: This function is different from :func:`torch.unique` in the sense that this function -// only eliminates consecutive duplicate values. This semantics is similar to `std::unique` -// in C++. -// -// Args: -// input (Tensor): the input tensor -// return_inverse (bool): Whether to also return the indices for where -// elements in the original input ended up in the returned unique list. -// return_counts (bool): Whether to also return the counts for each unique -// element. -// dim (int): the dimension to apply unique. If ``None``, the unique of the -// flattened input is returned. default: ``None`` -// -// Returns: -// (Tensor, Tensor (optional), Tensor (optional)): A tensor or a tuple of tensors containing -// -// - **output** (*Tensor*): the output list of unique scalar elements. -// - **inverse_indices** (*Tensor*): (optional) if -// :attr:`return_inverse` is True, there will be an additional -// returned tensor (same shape as input) representing the indices -// for where elements in the original input map to in the output; -// otherwise, this function will only return a single tensor. -// - **counts** (*Tensor*): (optional) if -// :attr:`return_counts` is True, there will be an additional -// returned tensor (same shape as output or output.size(dim), -// if dim was specified) representing the number of occurrences -// for each unique value or tensor. -// -// Example:: -// -// >>> x = torch.tensor([1, 1, 2, 2, 3, 1, 1, 2]) -// >>> output = torch.unique_consecutive(x) -// >>> output -// tensor([1, 2, 3, 1, 2]) -// -// >>> output, inverse_indices = torch.unique_consecutive(x, return_inverse=True) -// >>> output -// tensor([1, 2, 3, 1, 2]) -// >>> inverse_indices -// tensor([0, 0, 1, 1, 2, 3, 3, 4]) -// -// >>> output, counts = torch.unique_consecutive(x, return_counts=True) -// >>> output -// tensor([1, 2, 3, 1, 2]) -// >>> counts -// tensor([2, 2, 1, 2, 1]) -// -//go:linkname UniqueConsecutive py.unique_consecutive -func UniqueConsecutive(__llgo_va_list ...interface{}) *py.Object - -// broadcast_shapes(*shapes) -> Size -// -// Similar to :func:`broadcast_tensors` but for shapes. -// -// This is equivalent to -// ``torch.broadcast_tensors(*map(torch.empty, shapes))[0].shape`` -// but avoids the need create to intermediate tensors. This is useful for -// broadcasting tensors of common batch shape but different rightmost shape, -// e.g. to broadcast mean vectors with covariance matrices. -// -// Example:: -// -// >>> torch.broadcast_shapes((2,), (3, 1), (1, 1, 1)) -// torch.Size([1, 3, 2]) -// -// Args: -// \*shapes (torch.Size): Shapes of tensors. -// -// Returns: -// shape (torch.Size): A shape compatible with all input shapes. -// -// Raises: -// RuntimeError: If shapes are incompatible. -// -//go:linkname BroadcastShapes py.broadcast_shapes -func BroadcastShapes(__llgo_va_list ...interface{}) *py.Object - -// Computes the LU factorization of a matrix or batches of matrices -// -// :attr:`A`. Returns a tuple containing the LU factorization and -// pivots of :attr:`A`. Pivoting is done if :attr:`pivot` is set to -// ``True``. -// -// .. warning:: -// -// :func:`torch.lu` is deprecated in favor of :func:`torch.linalg.lu_factor` -// and :func:`torch.linalg.lu_factor_ex`. :func:`torch.lu` will be removed in a -// future PyTorch release. -// ``LU, pivots, info = torch.lu(A, compute_pivots)`` should be replaced with -// -// .. code:: python -// -// LU, pivots = torch.linalg.lu_factor(A, compute_pivots) -// -// ``LU, pivots, info = torch.lu(A, compute_pivots, get_infos=True)`` should be replaced with -// -// .. code:: python -// -// LU, pivots, info = torch.linalg.lu_factor_ex(A, compute_pivots) -// -// .. note:: -// * The returned permutation matrix for every matrix in the batch is -// represented by a 1-indexed vector of size ``min(A.shape[-2], A.shape[-1])``. -// ``pivots[i] == j`` represents that in the ``i``-th step of the algorithm, -// the ``i``-th row was permuted with the ``j-1``-th row. -// * LU factorization with :attr:`pivot` = ``False`` is not available -// for CPU, and attempting to do so will throw an error. However, -// LU factorization with :attr:`pivot` = ``False`` is available for -// CUDA. -// * This function does not check if the factorization was successful -// or not if :attr:`get_infos` is ``True`` since the status of the -// factorization is present in the third element of the return tuple. -// * In the case of batches of square matrices with size less or equal -// to 32 on a CUDA device, the LU factorization is repeated for -// singular matrices due to the bug in the MAGMA library -// (see magma issue 13). -// * ``L``, ``U``, and ``P`` can be derived using :func:`torch.lu_unpack`. -// -// .. warning:: -// The gradients of this function will only be finite when :attr:`A` is full rank. -// This is because the LU decomposition is just differentiable at full rank matrices. -// Furthermore, if :attr:`A` is close to not being full rank, -// the gradient will be numerically unstable as it depends on the computation of :math:`L^{-1}` and :math:`U^{-1}`. -// -// Args: -// A (Tensor): the tensor to factor of size :math:`(*, m, n)` -// pivot (bool, optional): controls whether pivoting is done. Default: ``True`` -// get_infos (bool, optional): if set to ``True``, returns an info IntTensor. -// Default: ``False`` -// out (tuple, optional): optional output tuple. If :attr:`get_infos` is ``True``, -// then the elements in the tuple are Tensor, IntTensor, -// and IntTensor. If :attr:`get_infos` is ``False``, then the -// elements in the tuple are Tensor, IntTensor. Default: ``None`` -// -// Returns: -// (Tensor, IntTensor, IntTensor (optional)): A tuple of tensors containing -// -// - **factorization** (*Tensor*): the factorization of size :math:`(*, m, n)` -// -// - **pivots** (*IntTensor*): the pivots of size :math:`(*, \text{min}(m, n))`. -// ``pivots`` stores all the intermediate transpositions of rows. -// The final permutation ``perm`` could be reconstructed by -// applying ``swap(perm[i], perm[pivots[i] - 1])`` for ``i = 0, ..., pivots.size(-1) - 1``, -// where ``perm`` is initially the identity permutation of :math:`m` elements -// (essentially this is what :func:`torch.lu_unpack` is doing). -// -// - **infos** (*IntTensor*, *optional*): if :attr:`get_infos` is ``True``, this is a tensor of -// size :math:`(*)` where non-zero values indicate whether factorization for the matrix or -// each minibatch has succeeded or failed -// -// Example:: -// -// >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_LAPACK) -// >>> # xdoctest: +IGNORE_WANT("non-deterministic") -// >>> A = torch.randn(2, 3, 3) -// >>> A_LU, pivots = torch.lu(A) -// >>> A_LU -// tensor([[[ 1.3506, 2.5558, -0.0816], -// [ 0.1684, 1.1551, 0.1940], -// [ 0.1193, 0.6189, -0.5497]], -// -// [[ 0.4526, 1.2526, -0.3285], -// [-0.7988, 0.7175, -0.9701], -// [ 0.2634, -0.9255, -0.3459]]]) -// >>> pivots -// tensor([[ 3, 3, 3], -// [ 3, 3, 3]], dtype=torch.int32) -// >>> A_LU, pivots, info = torch.lu(A, get_infos=True) -// >>> if info.nonzero().size(0) == 0: -// ... print('LU factorization succeeded for all samples!') -// LU factorization succeeded for all samples! -// -//go:linkname Lu py.lu -func Lu(__llgo_va_list ...interface{}) *py.Object - -// Performs linear Principal Component Analysis (PCA) on a low-rank -// -// matrix, batches of such matrices, or sparse matrix. -// -// This function returns a namedtuple ``(U, S, V)`` which is the -// nearly optimal approximation of a singular value decomposition of -// a centered matrix :math:`A` such that :math:`A = U diag(S) V^T`. -// -// .. note:: The relation of ``(U, S, V)`` to PCA is as follows: -// -// - :math:`A` is a data matrix with ``m`` samples and -// ``n`` features -// -// - the :math:`V` columns represent the principal directions -// -// - :math:`S ** 2 / (m - 1)` contains the eigenvalues of -// :math:`A^T A / (m - 1)` which is the covariance of -// ``A`` when ``center=True`` is provided. -// -// - ``matmul(A, V[:, :k])`` projects data to the first k -// principal components -// -// .. note:: Different from the standard SVD, the size of returned -// matrices depend on the specified rank and q -// values as follows: -// -// - :math:`U` is m x q matrix -// -// - :math:`S` is q-vector -// -// - :math:`V` is n x q matrix -// -// .. note:: To obtain repeatable results, reset the seed for the -// pseudorandom number generator -// -// Args: -// -// A (Tensor): the input tensor of size :math:`(*, m, n)` -// -// q (int, optional): a slightly overestimated rank of -// :math:`A`. By default, ``q = min(6, m, -// n)``. -// -// center (bool, optional): if True, center the input tensor, -// otherwise, assume that the input is -// centered. -// -// niter (int, optional): the number of subspace iterations to -// conduct; niter must be a nonnegative -// integer, and defaults to 2. -// -// References:: -// -// - Nathan Halko, Per-Gunnar Martinsson, and Joel Tropp, Finding -// structure with randomness: probabilistic algorithms for -// constructing approximate matrix decompositions, -// arXiv:0909.4061 [math.NA; math.PR], 2009 (available at -// `arXiv `_). -// -//go:linkname PcaLowrank py.pca_lowrank -func PcaLowrank(A *py.Object, q *py.Object, center *py.Object, niter *py.Object) *py.Object - -// Return the singular value decomposition “(U, S, V)“ of a matrix, -// -// batches of matrices, or a sparse matrix :math:`A` such that -// :math:`A \approx U diag(S) V^T`. In case :math:`M` is given, then -// SVD is computed for the matrix :math:`A - M`. -// -// .. note:: The implementation is based on the Algorithm 5.1 from -// Halko et al, 2009. -// -// .. note:: To obtain repeatable results, reset the seed for the -// pseudorandom number generator -// -// .. note:: The input is assumed to be a low-rank matrix. -// -// .. note:: In general, use the full-rank SVD implementation -// :func:`torch.linalg.svd` for dense matrices due to its 10-fold -// higher performance characteristics. The low-rank SVD -// will be useful for huge sparse matrices that -// :func:`torch.linalg.svd` cannot handle. -// -// Args:: -// A (Tensor): the input tensor of size :math:`(*, m, n)` -// -// q (int, optional): a slightly overestimated rank of A. -// -// niter (int, optional): the number of subspace iterations to -// conduct; niter must be a nonnegative -// integer, and defaults to 2 -// -// M (Tensor, optional): the input tensor's mean of size -// :math:`(*, 1, n)`. -// -// References:: -// - Nathan Halko, Per-Gunnar Martinsson, and Joel Tropp, Finding -// structure with randomness: probabilistic algorithms for -// constructing approximate matrix decompositions, -// arXiv:0909.4061 [math.NA; math.PR], 2009 (available at -// `arXiv `_). -// -//go:linkname SvdLowrank py.svd_lowrank -func SvdLowrank(A *py.Object, q *py.Object, niter *py.Object, M *py.Object) *py.Object - -// unique(input, sorted=True, return_inverse=False, return_counts=False, dim=None) -> Tuple[Tensor, Tensor, Tensor] -// -// Returns the unique elements of the input tensor. -// -// .. note:: This function is different from :func:`torch.unique_consecutive` in the sense that -// this function also eliminates non-consecutive duplicate values. -// -// .. note:: Currently in the CUDA implementation and the CPU implementation, -// `torch.unique` always sort the tensor at the beginning regardless of the `sort` argument. -// Sorting could be slow, so if your input tensor is already sorted, it is recommended to use -// :func:`torch.unique_consecutive` which avoids the sorting. -// -// Args: -// input (Tensor): the input tensor -// sorted (bool): Whether to sort the unique elements in ascending order -// before returning as output. -// return_inverse (bool): Whether to also return the indices for where -// elements in the original input ended up in the returned unique list. -// return_counts (bool): Whether to also return the counts for each unique -// element. -// dim (int, optional): the dimension to operate upon. If ``None``, the -// unique of the flattened input is returned. Otherwise, each of the -// tensors indexed by the given dimension is treated as one of the -// elements to apply the unique operation upon. See examples for more -// details. Default: ``None`` -// -// Returns: -// (Tensor, Tensor (optional), Tensor (optional)): A tensor or a tuple of tensors containing -// -// - **output** (*Tensor*): the output list of unique scalar elements. -// - **inverse_indices** (*Tensor*): (optional) if -// :attr:`return_inverse` is True, there will be an additional -// returned tensor (same shape as input) representing the indices -// for where elements in the original input map to in the output; -// otherwise, this function will only return a single tensor. -// - **counts** (*Tensor*): (optional) if -// :attr:`return_counts` is True, there will be an additional -// returned tensor (same shape as output or output.size(dim), -// if dim was specified) representing the number of occurrences -// for each unique value or tensor. -// -// Example:: -// -// >>> output = torch.unique(torch.tensor([1, 3, 2, 3], dtype=torch.long)) -// >>> output -// tensor([1, 2, 3]) -// -// >>> output, inverse_indices = torch.unique( -// ... torch.tensor([1, 3, 2, 3], dtype=torch.long), sorted=True, return_inverse=True) -// >>> output -// tensor([1, 2, 3]) -// >>> inverse_indices -// tensor([0, 2, 1, 2]) -// -// >>> output, inverse_indices = torch.unique( -// ... torch.tensor([[1, 3], [2, 3]], dtype=torch.long), sorted=True, return_inverse=True) -// >>> output -// tensor([1, 2, 3]) -// >>> inverse_indices -// tensor([[0, 2], -// [1, 2]]) -// -// >>> a = torch.tensor([ -// ... [ -// ... [1, 1, 0, 0], -// ... [1, 1, 0, 0], -// ... [0, 0, 1, 1], -// ... ], -// ... [ -// ... [0, 0, 1, 1], -// ... [0, 0, 1, 1], -// ... [1, 1, 1, 1], -// ... ], -// ... [ -// ... [1, 1, 0, 0], -// ... [1, 1, 0, 0], -// ... [0, 0, 1, 1], -// ... ], -// ... ]) -// -// >>> # If we call `torch.unique(a, dim=0)`, each of the tensors `a[idx, :, :]` -// >>> # will be compared. We can see that `a[0, :, :]` and `a[2, :, :]` match -// >>> # each other, so one of them will be removed. -// >>> (a[0, :, :] == a[2, :, :]).all() -// tensor(True) -// >>> a_unique_dim0 = torch.unique(a, dim=0) -// >>> a_unique_dim0 -// tensor([[[0, 0, 1, 1], -// [0, 0, 1, 1], -// [1, 1, 1, 1]], -// [[1, 1, 0, 0], -// [1, 1, 0, 0], -// [0, 0, 1, 1]]]) -// -// >>> # Notice which sub-tensors from `a` match with the sub-tensors from -// >>> # `a_unique_dim0`: -// >>> (a_unique_dim0[0, :, :] == a[1, :, :]).all() -// tensor(True) -// >>> (a_unique_dim0[1, :, :] == a[0, :, :]).all() -// tensor(True) -// -// >>> # For `torch.unique(a, dim=1)`, each of the tensors `a[:, idx, :]` are -// >>> # compared. `a[:, 0, :]` and `a[:, 1, :]` match each other, so one of -// >>> # them will be removed. -// >>> (a[:, 0, :] == a[:, 1, :]).all() -// tensor(True) -// >>> torch.unique(a, dim=1) -// tensor([[[0, 0, 1, 1], -// [1, 1, 0, 0]], -// [[1, 1, 1, 1], -// [0, 0, 1, 1]], -// [[0, 0, 1, 1], -// [1, 1, 0, 0]]]) -// -// >>> # For `torch.unique(a, dim=2)`, the tensors `a[:, :, idx]` are compared. -// >>> # `a[:, :, 0]` and `a[:, :, 1]` match each other. Also, `a[:, :, 2]` and -// >>> # `a[:, :, 3]` match each other as well. So in this case, two of the -// >>> # sub-tensors will be removed. -// >>> (a[:, :, 0] == a[:, :, 1]).all() -// tensor(True) -// >>> (a[:, :, 2] == a[:, :, 3]).all() -// tensor(True) -// >>> torch.unique(a, dim=2) -// tensor([[[0, 1], -// [0, 1], -// [1, 0]], -// [[1, 0], -// [1, 0], -// [1, 1]], -// [[0, 1], -// [0, 1], -// [1, 0]]]) -// -//go:linkname Unique py.unique -func Unique(__llgo_va_list ...interface{}) *py.Object - -// Converts a tensor of flat indices into a tuple of coordinate tensors that -// -// index into an arbitrary tensor of the specified shape. -// -// Args: -// indices (Tensor): An integer tensor containing indices into the -// flattened version of an arbitrary tensor of shape :attr:`shape`. -// All elements must be in the range ``[0, prod(shape) - 1]``. -// -// shape (int, sequence of ints, or torch.Size): The shape of the arbitrary -// tensor. All elements must be non-negative. -// -// Returns: -// tuple of Tensors: Each ``i``-th tensor in the ouput corresponds with -// dimension ``i`` of :attr:`shape`. Each tensor has the same shape as -// ``indices`` and contains one index into dimension ``i`` for each of the -// flat indices given by ``indices``. -// -// Example:: -// -// >>> import torch -// >>> torch.unravel_index(torch.tensor(4), (3, 2)) -// (tensor(2), -// tensor(0)) -// -// >>> torch.unravel_index(torch.tensor([4, 1]), (3, 2)) -// (tensor([2, 0]), -// tensor([0, 1])) -// -// >>> torch.unravel_index(torch.tensor([0, 1, 2, 3, 4, 5]), (3, 2)) -// (tensor([0, 0, 1, 1, 2, 2]), -// tensor([0, 1, 0, 1, 0, 1])) -// -// >>> torch.unravel_index(torch.tensor([1234, 5678]), (10, 10, 10, 10)) -// (tensor([1, 5]), -// tensor([2, 6]), -// tensor([3, 7]), -// tensor([4, 8])) -// -// >>> torch.unravel_index(torch.tensor([[1234], [5678]]), (10, 10, 10, 10)) -// (tensor([[1], [5]]), -// tensor([[2], [6]]), -// tensor([[3], [7]]), -// tensor([[4], [8]])) -// -// >>> torch.unravel_index(torch.tensor([[1234], [5678]]), (100, 100)) -// (tensor([[12], [56]]), -// tensor([[34], [78]])) -// -//go:linkname UnravelIndex py.unravel_index -func UnravelIndex(indices *py.Object, shape *py.Object) *py.Object - -// Returns whether PyTorch was built with _GLIBCXX_USE_CXX11_ABI=1 -// -//go:linkname CompiledWithCxx11Abi py.compiled_with_cxx11_abi -func CompiledWithCxx11Abi() *py.Object - -// Find the k largest (or smallest) eigenvalues and the corresponding -// -// eigenvectors of a symmetric positive definite generalized -// eigenvalue problem using matrix-free LOBPCG methods. -// -// This function is a front-end to the following LOBPCG algorithms -// selectable via `method` argument: -// -// `method="basic"` - the LOBPCG method introduced by Andrew -// Knyazev, see [Knyazev2001]. A less robust method, may fail when -// Cholesky is applied to singular input. -// -// `method="ortho"` - the LOBPCG method with orthogonal basis -// selection [StathopoulosEtal2002]. A robust method. -// -// Supported inputs are dense, sparse, and batches of dense matrices. -// -// .. note:: In general, the basic method spends least time per -// iteration. However, the robust methods converge much faster and -// are more stable. So, the usage of the basic method is generally -// not recommended but there exist cases where the usage of the -// basic method may be preferred. -// -// .. warning:: The backward method does not support sparse and complex inputs. -// It works only when `B` is not provided (i.e. `B == None`). -// We are actively working on extensions, and the details of -// the algorithms are going to be published promptly. -// -// .. warning:: While it is assumed that `A` is symmetric, `A.grad` is not. -// To make sure that `A.grad` is symmetric, so that `A - t * A.grad` is symmetric -// in first-order optimization routines, prior to running `lobpcg` -// we do the following symmetrization map: `A -> (A + A.t()) / 2`. -// The map is performed only when the `A` requires gradients. -// -// Args: -// -// A (Tensor): the input tensor of size :math:`(*, m, m)` -// -// B (Tensor, optional): the input tensor of size :math:`(*, m, -// m)`. When not specified, `B` is interpreted as -// identity matrix. -// -// X (tensor, optional): the input tensor of size :math:`(*, m, n)` -// where `k <= n <= m`. When specified, it is used as -// initial approximation of eigenvectors. X must be a -// dense tensor. -// -// iK (tensor, optional): the input tensor of size :math:`(*, m, -// m)`. When specified, it will be used as preconditioner. -// -// k (integer, optional): the number of requested -// eigenpairs. Default is the number of :math:`X` -// columns (when specified) or `1`. -// -// n (integer, optional): if :math:`X` is not specified then `n` -// specifies the size of the generated random -// approximation of eigenvectors. Default value for `n` -// is `k`. If :math:`X` is specified, the value of `n` -// (when specified) must be the number of :math:`X` -// columns. -// -// tol (float, optional): residual tolerance for stopping -// criterion. Default is `feps ** 0.5` where `feps` is -// smallest non-zero floating-point number of the given -// input tensor `A` data type. -// -// largest (bool, optional): when True, solve the eigenproblem for -// the largest eigenvalues. Otherwise, solve the -// eigenproblem for smallest eigenvalues. Default is -// `True`. -// -// method (str, optional): select LOBPCG method. See the -// description of the function above. Default is -// "ortho". -// -// niter (int, optional): maximum number of iterations. When -// reached, the iteration process is hard-stopped and -// the current approximation of eigenpairs is returned. -// For infinite iteration but until convergence criteria -// is met, use `-1`. -// -// tracker (callable, optional) : a function for tracing the -// iteration process. When specified, it is called at -// each iteration step with LOBPCG instance as an -// argument. The LOBPCG instance holds the full state of -// the iteration process in the following attributes: -// -// `iparams`, `fparams`, `bparams` - dictionaries of -// integer, float, and boolean valued input -// parameters, respectively -// -// `ivars`, `fvars`, `bvars`, `tvars` - dictionaries -// of integer, float, boolean, and Tensor valued -// iteration variables, respectively. -// -// `A`, `B`, `iK` - input Tensor arguments. -// -// `E`, `X`, `S`, `R` - iteration Tensor variables. -// -// For instance: -// -// `ivars["istep"]` - the current iteration step -// `X` - the current approximation of eigenvectors -// `E` - the current approximation of eigenvalues -// `R` - the current residual -// `ivars["converged_count"]` - the current number of converged eigenpairs -// `tvars["rerr"]` - the current state of convergence criteria -// -// Note that when `tracker` stores Tensor objects from -// the LOBPCG instance, it must make copies of these. -// -// If `tracker` sets `bvars["force_stop"] = True`, the -// iteration process will be hard-stopped. -// -// ortho_iparams, ortho_fparams, ortho_bparams (dict, optional): -// various parameters to LOBPCG algorithm when using -// `method="ortho"`. -// -// Returns: -// -// E (Tensor): tensor of eigenvalues of size :math:`(*, k)` -// -// X (Tensor): tensor of eigenvectors of size :math:`(*, m, k)` -// -// References: -// -// [Knyazev2001] Andrew V. Knyazev. (2001) Toward the Optimal -// Preconditioned Eigensolver: Locally Optimal Block Preconditioned -// Conjugate Gradient Method. SIAM J. Sci. Comput., 23(2), -// 517-541. (25 pages) -// https://epubs.siam.org/doi/abs/10.1137/S1064827500366124 -// -// [StathopoulosEtal2002] Andreas Stathopoulos and Kesheng -// Wu. (2002) A Block Orthogonalization Procedure with Constant -// Synchronization Requirements. SIAM J. Sci. Comput., 23(6), -// 2165-2182. (18 pages) -// https://epubs.siam.org/doi/10.1137/S1064827500370883 -// -// [DuerschEtal2018] Jed A. Duersch, Meiyue Shao, Chao Yang, Ming -// Gu. (2018) A Robust and Efficient Implementation of LOBPCG. -// SIAM J. Sci. Comput., 40(5), C655-C676. (22 pages) -// https://epubs.siam.org/doi/abs/10.1137/17M1129830 -// -//go:linkname Lobpcg py.lobpcg -func Lobpcg(A *py.Object, k *py.Object, B *py.Object, X *py.Object, n *py.Object, iK *py.Object, niter *py.Object, tol *py.Object, largest *py.Object, method *py.Object, tracker *py.Object, orthoIparams *py.Object, orthoFparams *py.Object, orthoBparams *py.Object) *py.Object - -// from_dlpack(ext_tensor) -> Tensor -// -// Converts a tensor from an external library into a ``torch.Tensor``. -// -// The returned PyTorch tensor will share the memory with the input tensor -// (which may have come from another library). Note that in-place operations -// will therefore also affect the data of the input tensor. This may lead to -// unexpected issues (e.g., other libraries may have read-only flags or -// immutable data structures), so the user should only do this if they know -// for sure that this is fine. -// -// Args: -// ext_tensor (object with ``__dlpack__`` attribute, or a DLPack capsule): -// The tensor or DLPack capsule to convert. -// -// If ``ext_tensor`` is a tensor (or ndarray) object, it must support -// the ``__dlpack__`` protocol (i.e., have a ``ext_tensor.__dlpack__`` -// method). Otherwise ``ext_tensor`` may be a DLPack capsule, which is -// an opaque ``PyCapsule`` instance, typically produced by a -// ``to_dlpack`` function or method. -// -// Examples:: -// -// >>> import torch.utils.dlpack -// >>> t = torch.arange(4) -// -// # Convert a tensor directly (supported in PyTorch >= 1.10) -// >>> t2 = torch.from_dlpack(t) -// >>> t2[:2] = -1 # show that memory is shared -// >>> t2 -// tensor([-1, -1, 2, 3]) -// >>> t -// tensor([-1, -1, 2, 3]) -// -// # The old-style DLPack usage, with an intermediate capsule object -// >>> capsule = torch.utils.dlpack.to_dlpack(t) -// >>> capsule -// -// >>> t3 = torch.from_dlpack(capsule) -// >>> t3 -// tensor([-1, -1, 2, 3]) -// >>> t3[0] = -9 # now we're sharing memory between 3 tensors -// >>> t3 -// tensor([-9, -1, 2, 3]) -// >>> t2 -// tensor([-9, -1, 2, 3]) -// >>> t -// tensor([-9, -1, 2, 3]) -// -//go:linkname FromDlpack py.from_dlpack -func FromDlpack(extTensor *py.Object) *py.Object - -// Optimizes given model/function using TorchDynamo and specified backend. -// -// Concretely, for every frame executed within the compiled region, we will attempt -// to compile it and cache the compiled result on the code object for future -// use. A single frame may be compiled multiple times if previous compiled -// results are not applicable for subsequent calls (this is called a "guard -// failure), you can use TORCH_LOGS=guards to debug these situations. -// Multiple compiled results can be associated with a frame up to -// “torch._dynamo.config.cache_size_limit“, which defaults to 64; at which -// point we will fall back to eager. Note that compile caches are per -// *code object*, not frame; if you dynamically create multiple copies of a -// function, they will all share the same code cache. -// -// Args: -// -// model (Callable): Module/function to optimize -// fullgraph (bool): If False (default), torch.compile attempts to discover compileable regions -// in the function that it will optimize. If True, then we require that the entire function be -// capturable into a single graph. If this is not possible (that is, if there are graph breaks), -// then this will raise an error. -// dynamic (bool or None): Use dynamic shape tracing. When this is True, we will up-front attempt -// to generate a kernel that is as dynamic as possible to avoid recompilations when -// sizes change. This may not always work as some operations/optimizations will -// force specialization; use TORCH_LOGS=dynamic to debug overspecialization. -// When this is False, we will NEVER generate dynamic kernels, we will always specialize. -// By default (None), we automatically detect if dynamism has occurred and compile a more -// dynamic kernel upon recompile. -// backend (str or Callable): backend to be used -// -// - "inductor" is the default backend, which is a good balance between performance and overhead -// -// - Non experimental in-tree backends can be seen with `torch._dynamo.list_backends()` -// -// - Experimental or debug in-tree backends can be seen with `torch._dynamo.list_backends(None)` -// -// - To register an out-of-tree custom backend: https://pytorch.org/docs/main/compile/custom-backends.html -// mode (str): Can be either "default", "reduce-overhead", "max-autotune" or "max-autotune-no-cudagraphs" -// -// - "default" is the default mode, which is a good balance between performance and overhead -// -// - "reduce-overhead" is a mode that reduces the overhead of python with CUDA graphs, -// useful for small batches. Reduction of overhead can come at the cost of more memory -// usage, as we will cache the workspace memory required for the invocation so that we -// do not have to reallocate it on subsequent runs. Reduction of overhead is not guaranteed -// to work; today, we only reduce overhead for CUDA only graphs which do not mutate inputs. -// There are other circumstances where CUDA graphs are not applicable; use TORCH_LOG=perf_hints -// to debug. -// -// - "max-autotune" is a mode that leverages Triton based matrix multiplications and convolutions -// It enables CUDA graphs by default. -// -// - "max-autotune-no-cudagraphs" is a mode similar to "max-autotune" but without CUDA graphs -// -// - To see the exact configs that each mode sets you can call `torch._inductor.list_mode_options()` -// -// options (dict): A dictionary of options to pass to the backend. Some notable ones to try out are -// -// - `epilogue_fusion` which fuses pointwise ops into templates. Requires `max_autotune` to also be set -// -// - `max_autotune` which will profile to pick the best matmul configuration -// -// - `fallback_random` which is useful when debugging accuracy issues -// -// - `shape_padding` which pads matrix shapes to better align loads on GPUs especially for tensor cores -// -// - `triton.cudagraphs` which will reduce the overhead of python with CUDA graphs -// -// - `trace.enabled` which is the most useful debugging flag to turn on -// -// - `trace.graph_diagram` which will show you a picture of your graph after fusion -// -// - For inductor you can see the full list of configs that it supports by calling `torch._inductor.list_options()` -// disable (bool): Turn torch.compile() into a no-op for testing -// -// Example:: -// -// @torch.compile(options={"triton.cudagraphs": True}, fullgraph=True) -// def foo(x): -// return torch.sin(x) + torch.cos(x) -// -//go:linkname Compile py.compile -func Compile(model *py.Object) *py.Object - -// Conditionally applies `true_fn` or `false_fn`. -// -// .. warning:: -// -// `torch.cond` is a prototype feature in PyTorch. It has limited support for input and output types and -// doesn't support training currently. Please look forward to a more stable implementation in a future version of PyTorch. -// Read more about feature classification at: https://pytorch.org/blog/pytorch-feature-classification-changes/#prototype -// -// `cond` is structured control flow operator. That is, it is like a Python if-statement, -// but has restrictions on `true_fn`, `false_fn`, and `operands` that enable it to be -// capturable using torch.compile and torch.export. -// -// Assuming the constraints on `cond`'s arguments are met, `cond` is equivalent to the following:: -// -// def cond(pred, true_branch, false_branch, operands): -// if pred: -// return true_branch(*operands) -// else: -// return false_branch(*operands) -// -// Args: -// -// pred (Union[bool, torch.Tensor]): A boolean expression or a tensor with one element, -// indicating which branch function to apply. -// -// true_fn (Callable): A callable function (a -> b) that is within the -// scope that is being traced. -// -// false_fn (Callable): A callable function (a -> b) that is within the -// scope that is being traced. The true branch and false branch must -// have consistent input and outputs, meaning the inputs have to be -// the same, and the outputs have to be the same type and shape. -// -// operands (Tuple of possibly nested dict/list/tuple of torch.Tensor): A tuple of inputs to the true/false functions. -// -// Example:: -// -// def true_fn(x: torch.Tensor): -// return x.cos() -// def false_fn(x: torch.Tensor): -// return x.sin() -// return cond(x.shape[0] > 4, true_fn, false_fn, (x,)) -// -// Restrictions: -// -// - The conditional statement (aka `pred`) must meet one of the following constraints: -// -// - It's a `torch.Tensor` with only one element, and torch.bool dtype -// -// - It's a boolean expression, e.g. `x.shape[0] > 10` or `x.dim() > 1 and x.shape[1] > 10` -// -// - The branch function (aka `true_fn`/`false_fn`) must meet all of the following constraints: -// -// - The function signature must match with operands. -// -// - The function must return a tensor with the same metadata, e.g. shape, -// dtype, etc. -// -// - The function cannot have in-place mutations on inputs or global variables. -// (Note: in-place tensor operations such as `add_` for intermediate results -// are allowed in a branch) -// -// .. warning:: -// -// Temporal Limitations: -// -// - `cond` only supports **inference** right now. Autograd will be supported in the future. -// -// - The **output** of branches must be a **single Tensor**. Pytree of tensors will be supported in the future. -// -//go:linkname Cond py.cond -func Cond(pred *py.Object, trueFn *py.Object, falseFn *py.Object, operands *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.get_num_threads.html -// -//go:linkname GetNumThreads py.get_num_threads -func GetNumThreads() *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.set_num_threads.html -// -//go:linkname SetNumThreads py.set_num_threads -func SetNumThreads(int *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.get_num_interop_threads.html -// -//go:linkname GetNumInteropThreads py.get_num_interop_threads -func GetNumInteropThreads() *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.set_num_interop_threads.html -// -//go:linkname SetNumInteropThreads py.set_num_interop_threads -func SetNumInteropThreads(int *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.set_flush_denormal.html -// -//go:linkname SetFlushDenormal py.set_flush_denormal -func SetFlushDenormal(mode *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.get_default_dtype.html -// -//go:linkname GetDefaultDtype py.get_default_dtype -func GetDefaultDtype() *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.is_grad_enabled.html -// -//go:linkname IsGradEnabled py.is_grad_enabled -func IsGradEnabled() *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.is_inference_mode_enabled.html -// -//go:linkname IsInferenceModeEnabled py.is_inference_mode_enabled -func IsInferenceModeEnabled() *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sym_ite.html -// -//go:linkname SymIte py.sym_ite -func SymIte(b *py.Object, t *py.Object, f *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.abs.html -// -//go:linkname Abs py.abs -func Abs(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.absolute.html -// -//go:linkname Absolute py.absolute -func Absolute(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.acos.html -// -//go:linkname Acos py.acos -func Acos(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.acosh.html -// -//go:linkname Acosh py.acosh -func Acosh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.add.html -// -//go:linkname Add py.add -func Add(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.addbmm.html -// -//go:linkname Addbmm py.addbmm -func Addbmm(input *py.Object, batch1 *py.Object, batch2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.addcdiv.html -// -//go:linkname Addcdiv py.addcdiv -func Addcdiv(input *py.Object, tensor1 *py.Object, tensor2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.addcmul.html -// -//go:linkname Addcmul py.addcmul -func Addcmul(input *py.Object, tensor1 *py.Object, tensor2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.addmm.html -// -//go:linkname Addmm py.addmm -func Addmm(input *py.Object, mat1 *py.Object, mat2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.addmv.html -// -//go:linkname Addmv py.addmv -func Addmv(input *py.Object, mat *py.Object, vec *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.addr.html -// -//go:linkname Addr py.addr -func Addr(input *py.Object, vec1 *py.Object, vec2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.adjoint.html -// -//go:linkname Adjoint py.adjoint -func Adjoint(Tensor *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.all.html -// -//go:linkname All py.all -func All(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.allclose.html -// -//go:linkname Allclose py.allclose -func Allclose(input *py.Object, other *py.Object, rtol *py.Object, atol *py.Object, equalNan *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.amax.html -// -//go:linkname Amax py.amax -func Amax(input *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.amin.html -// -//go:linkname Amin py.amin -func Amin(input *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.aminmax.html -// -//go:linkname Aminmax py.aminmax -func Aminmax(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.angle.html -// -//go:linkname Angle py.angle -func Angle(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.any.html -// -//go:linkname Any py.any -func Any(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arange.html -// -//go:linkname Arange py.arange -func Arange(start *py.Object, end *py.Object, step *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arccos.html -// -//go:linkname Arccos py.arccos -func Arccos(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arccosh.html -// -//go:linkname Arccosh py.arccosh -func Arccosh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arcsin.html -// -//go:linkname Arcsin py.arcsin -func Arcsin(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arcsinh.html -// -//go:linkname Arcsinh py.arcsinh -func Arcsinh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arctan.html -// -//go:linkname Arctan py.arctan -func Arctan(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arctan2.html -// -//go:linkname Arctan2 py.arctan2 -func Arctan2(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.arctanh.html -// -//go:linkname Arctanh py.arctanh -func Arctanh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.argmax.html -// -//go:linkname Argmax py.argmax -func Argmax(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.argmin.html -// -//go:linkname Argmin py.argmin -func Argmin(input *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.argsort.html -// -//go:linkname Argsort py.argsort -func Argsort(input *py.Object, dim *py.Object, descending *py.Object, stable *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.argwhere.html -// -//go:linkname Argwhere py.argwhere -func Argwhere(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.as_strided.html -// -//go:linkname AsStrided py.as_strided -func AsStrided(input *py.Object, size *py.Object, stride *py.Object, storageOffset *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.as_tensor.html -// -//go:linkname AsTensor py.as_tensor -func AsTensor(data *py.Object, dtype *py.Object, device *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.asarray.html -// -//go:linkname Asarray py.asarray -func Asarray(obj *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.asin.html -// -//go:linkname Asin py.asin -func Asin(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.asinh.html -// -//go:linkname Asinh py.asinh -func Asinh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.atan.html -// -//go:linkname Atan py.atan -func Atan(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.atan2.html -// -//go:linkname Atan2 py.atan2 -func Atan2(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.atanh.html -// -//go:linkname Atanh py.atanh -func Atanh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.baddbmm.html -// -//go:linkname Baddbmm py.baddbmm -func Baddbmm(input *py.Object, batch1 *py.Object, batch2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bartlett_window.html -// -//go:linkname BartlettWindow py.bartlett_window -func BartlettWindow(windowLength *py.Object, periodic *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bernoulli.html -// -//go:linkname Bernoulli py.bernoulli -func Bernoulli(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bincount.html -// -//go:linkname Bincount py.bincount -func Bincount(input *py.Object, weights *py.Object, minlength *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bitwise_and.html -// -//go:linkname BitwiseAnd py.bitwise_and -func BitwiseAnd(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bitwise_left_shift.html -// -//go:linkname BitwiseLeftShift py.bitwise_left_shift -func BitwiseLeftShift(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bitwise_not.html -// -//go:linkname BitwiseNot py.bitwise_not -func BitwiseNot(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bitwise_or.html -// -//go:linkname BitwiseOr py.bitwise_or -func BitwiseOr(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bitwise_right_shift.html -// -//go:linkname BitwiseRightShift py.bitwise_right_shift -func BitwiseRightShift(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bitwise_xor.html -// -//go:linkname BitwiseXor py.bitwise_xor -func BitwiseXor(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.blackman_window.html -// -//go:linkname BlackmanWindow py.blackman_window -func BlackmanWindow(windowLength *py.Object, periodic *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bmm.html -// -//go:linkname Bmm py.bmm -func Bmm(input *py.Object, mat2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.broadcast_to.html -// -//go:linkname BroadcastTo py.broadcast_to -func BroadcastTo(input *py.Object, shape *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.bucketize.html -// -//go:linkname Bucketize py.bucketize -func Bucketize(input *py.Object, boundaries *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.can_cast.html -// -//go:linkname CanCast py.can_cast -func CanCast(from *py.Object, to *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cat.html -// -//go:linkname Cat py.cat -func Cat(tensors *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ceil.html -// -//go:linkname Ceil py.ceil -func Ceil(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cholesky.html -// -//go:linkname Cholesky py.cholesky -func Cholesky(input *py.Object, upper *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cholesky_inverse.html -// -//go:linkname CholeskyInverse py.cholesky_inverse -func CholeskyInverse(L *py.Object, upper *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cholesky_solve.html -// -//go:linkname CholeskySolve py.cholesky_solve -func CholeskySolve(B *py.Object, L *py.Object, upper *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.chunk.html -// -//go:linkname Chunk py.chunk -func Chunk(input *py.Object, chunks *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.clamp.html -// -//go:linkname Clamp py.clamp -func Clamp(input *py.Object, min *py.Object, max *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.clip.html -// -//go:linkname Clip py.clip -func Clip(input *py.Object, min *py.Object, max *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.clone.html -// -//go:linkname Clone py.clone -func Clone(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.column_stack.html -// -//go:linkname ColumnStack py.column_stack -func ColumnStack(tensors *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.combinations.html -// -//go:linkname Combinations py.combinations -func Combinations(input *py.Object, r *py.Object, withReplacement *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.complex.html -// -//go:linkname Complex py.complex -func Complex(real *py.Object, imag *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.concat.html -// -//go:linkname Concat py.concat -func Concat(tensors *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.concatenate.html -// -//go:linkname Concatenate py.concatenate -func Concatenate(tensors *py.Object, axis *py.Object, out *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.conj.html -// -//go:linkname Conj py.conj -func Conj(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.conj_physical.html -// -//go:linkname ConjPhysical py.conj_physical -func ConjPhysical(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.copysign.html -// -//go:linkname Copysign py.copysign -func Copysign(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.corrcoef.html -// -//go:linkname Corrcoef py.corrcoef -func Corrcoef(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cos.html -// -//go:linkname Cos py.cos -func Cos(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cosh.html -// -//go:linkname Cosh py.cosh -func Cosh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.count_nonzero.html -// -//go:linkname CountNonzero py.count_nonzero -func CountNonzero(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cov.html -// -//go:linkname Cov py.cov -func Cov(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cross.html -// -//go:linkname Cross py.cross -func Cross(input *py.Object, other *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cummax.html -// -//go:linkname Cummax py.cummax -func Cummax(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cummin.html -// -//go:linkname Cummin py.cummin -func Cummin(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cumprod.html -// -//go:linkname Cumprod py.cumprod -func Cumprod(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cumsum.html -// -//go:linkname Cumsum py.cumsum -func Cumsum(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.cumulative_trapezoid.html -// -//go:linkname CumulativeTrapezoid py.cumulative_trapezoid -func CumulativeTrapezoid(y *py.Object, x *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.deg2rad.html -// -//go:linkname Deg2rad py.deg2rad -func Deg2rad(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.dequantize.html -// -//go:linkname Dequantize py.dequantize -func Dequantize(tensor *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.det.html -// -//go:linkname Det py.det -func Det(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.diag.html -// -//go:linkname Diag py.diag -func Diag(input *py.Object, diagonal *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.diag_embed.html -// -//go:linkname DiagEmbed py.diag_embed -func DiagEmbed(input *py.Object, offset *py.Object, dim1 *py.Object, dim2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.diagflat.html -// -//go:linkname Diagflat py.diagflat -func Diagflat(input *py.Object, offset *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.diagonal.html -// -//go:linkname Diagonal py.diagonal -func Diagonal(input *py.Object, offset *py.Object, dim1 *py.Object, dim2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.diagonal_scatter.html -// -//go:linkname DiagonalScatter py.diagonal_scatter -func DiagonalScatter(input *py.Object, src *py.Object, offset *py.Object, dim1 *py.Object, dim2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.diff.html -// -//go:linkname Diff py.diff -func Diff(input *py.Object, n *py.Object, dim *py.Object, prepend *py.Object, append *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.digamma.html -// -//go:linkname Digamma py.digamma -func Digamma(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.dist.html -// -//go:linkname Dist py.dist -func Dist(input *py.Object, other *py.Object, p *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.div.html -// -//go:linkname Div py.div -func Div(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.divide.html -// -//go:linkname Divide py.divide -func Divide(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.dot.html -// -//go:linkname Dot py.dot -func Dot(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.dsplit.html -// -//go:linkname Dsplit py.dsplit -func Dsplit(input *py.Object, indicesOrSections *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.dstack.html -// -//go:linkname Dstack py.dstack -func Dstack(tensors *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.empty.html -// -//go:linkname Empty py.empty -func Empty(__llgo_va_list ...interface{}) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.empty_like.html -// -//go:linkname EmptyLike py.empty_like -func EmptyLike(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.empty_strided.html -// -//go:linkname EmptyStrided py.empty_strided -func EmptyStrided(size *py.Object, stride *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.eq.html -// -//go:linkname Eq py.eq -func Eq(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.equal.html -// -//go:linkname Equal py.equal -func Equal(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.erf.html -// -//go:linkname Erf py.erf -func Erf(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.erfc.html -// -//go:linkname Erfc py.erfc -func Erfc(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.erfinv.html -// -//go:linkname Erfinv py.erfinv -func Erfinv(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.exp.html -// -//go:linkname Exp py.exp -func Exp(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.exp2.html -// -//go:linkname Exp2 py.exp2 -func Exp2(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.expm1.html -// -//go:linkname Expm1 py.expm1 -func Expm1(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.eye.html -// -//go:linkname Eye py.eye -func Eye(n *py.Object, m *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fake_quantize_per_channel_affine.html -// -//go:linkname FakeQuantizePerChannelAffine py.fake_quantize_per_channel_affine -func FakeQuantizePerChannelAffine(input *py.Object, scale *py.Object, zeroPoint *py.Object, axis *py.Object, quantMin *py.Object, quantMax *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fake_quantize_per_tensor_affine.html -// -//go:linkname FakeQuantizePerTensorAffine py.fake_quantize_per_tensor_affine -func FakeQuantizePerTensorAffine(input *py.Object, scale *py.Object, zeroPoint *py.Object, quantMin *py.Object, quantMax *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fix.html -// -//go:linkname Fix py.fix -func Fix(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.flatten.html -// -//go:linkname Flatten py.flatten -func Flatten(input *py.Object, startDim *py.Object, endDim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.flip.html -// -//go:linkname Flip py.flip -func Flip(input *py.Object, dims *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fliplr.html -// -//go:linkname Fliplr py.fliplr -func Fliplr(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.flipud.html -// -//go:linkname Flipud py.flipud -func Flipud(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.float_power.html -// -//go:linkname FloatPower py.float_power -func FloatPower(input *py.Object, exponent *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.floor.html -// -//go:linkname Floor py.floor -func Floor(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.floor_divide.html -// -//go:linkname FloorDivide py.floor_divide -func FloorDivide(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fmax.html -// -//go:linkname Fmax py.fmax -func Fmax(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fmin.html -// -//go:linkname Fmin py.fmin -func Fmin(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.fmod.html -// -//go:linkname Fmod py.fmod -func Fmod(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.frac.html -// -//go:linkname Frac py.frac -func Frac(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.frexp.html -// -//go:linkname Frexp py.frexp -func Frexp(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.from_file.html -// -//go:linkname FromFile py.from_file -func FromFile(filename *py.Object, shared *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.from_numpy.html -// -//go:linkname FromNumpy py.from_numpy -func FromNumpy(ndarray *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.frombuffer.html -// -//go:linkname Frombuffer py.frombuffer -func Frombuffer(buffer *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.full.html -// -//go:linkname Full py.full -func Full(size *py.Object, fillValue *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.full_like.html -// -//go:linkname FullLike py.full_like -func FullLike(input *py.Object, fillValue *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.gather.html -// -//go:linkname Gather py.gather -func Gather(input *py.Object, dim *py.Object, index *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.gcd.html -// -//go:linkname Gcd py.gcd -func Gcd(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ge.html -// -//go:linkname Ge py.ge -func Ge(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.geqrf.html -// -//go:linkname Geqrf py.geqrf -func Geqrf(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ger.html -// -//go:linkname Ger py.ger -func Ger(input *py.Object, vec2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.gradient.html -// -//go:linkname Gradient py.gradient -func Gradient(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.greater.html -// -//go:linkname Greater py.greater -func Greater(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.greater_equal.html -// -//go:linkname GreaterEqual py.greater_equal -func GreaterEqual(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.gt.html -// -//go:linkname Gt py.gt -func Gt(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.hamming_window.html -// -//go:linkname HammingWindow py.hamming_window -func HammingWindow(windowLength *py.Object, periodic *py.Object, alpha *py.Object, beta *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.hann_window.html -// -//go:linkname HannWindow py.hann_window -func HannWindow(windowLength *py.Object, periodic *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.heaviside.html -// -//go:linkname Heaviside py.heaviside -func Heaviside(input *py.Object, values *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.histc.html -// -//go:linkname Histc py.histc -func Histc(input *py.Object, bins *py.Object, min *py.Object, max *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.histogram.html -// -//go:linkname Histogram py.histogram -func Histogram(input *py.Object, bins *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.histogramdd.html -// -//go:linkname Histogramdd py.histogramdd -func Histogramdd(input *py.Object, bins *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.hsplit.html -// -//go:linkname Hsplit py.hsplit -func Hsplit(input *py.Object, indicesOrSections *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.hspmm.html -// -//go:linkname Hspmm py.hspmm -func Hspmm(mat1 *py.Object, mat2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.hstack.html -// -//go:linkname Hstack py.hstack -func Hstack(tensors *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.hypot.html -// -//go:linkname Hypot py.hypot -func Hypot(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.i0.html -// -//go:linkname I0 py.i0 -func I0(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.igamma.html -// -//go:linkname Igamma py.igamma -func Igamma(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.igammac.html -// -//go:linkname Igammac py.igammac -func Igammac(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.imag.html -// -//go:linkname Imag py.imag -func Imag(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.index_add.html -// -//go:linkname IndexAdd py.index_add -func IndexAdd(input *py.Object, dim *py.Object, index *py.Object, source *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.index_copy.html -// -//go:linkname IndexCopy py.index_copy -func IndexCopy(input *py.Object, dim *py.Object, index *py.Object, source *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.index_reduce.html -// -//go:linkname IndexReduce py.index_reduce -func IndexReduce(input *py.Object, dim *py.Object, index *py.Object, source *py.Object, reduce *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.index_select.html -// -//go:linkname IndexSelect py.index_select -func IndexSelect(input *py.Object, dim *py.Object, index *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.inner.html -// -//go:linkname Inner py.inner -func Inner(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.inverse.html -// -//go:linkname Inverse py.inverse -func Inverse(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.is_complex.html -// -//go:linkname IsComplex py.is_complex -func IsComplex(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.is_conj.html -// -//go:linkname IsConj py.is_conj -func IsConj(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.is_floating_point.html -// -//go:linkname IsFloatingPoint py.is_floating_point -func IsFloatingPoint(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.is_nonzero.html -// -//go:linkname IsNonzero py.is_nonzero -func IsNonzero(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isclose.html -// -//go:linkname Isclose py.isclose -func Isclose(input *py.Object, other *py.Object, rtol *py.Object, atol *py.Object, equalNan *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isfinite.html -// -//go:linkname Isfinite py.isfinite -func Isfinite(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isin.html -// -//go:linkname Isin py.isin -func Isin(elements *py.Object, testElements *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isinf.html -// -//go:linkname Isinf py.isinf -func Isinf(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isnan.html -// -//go:linkname Isnan py.isnan -func Isnan(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isneginf.html -// -//go:linkname Isneginf py.isneginf -func Isneginf(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isposinf.html -// -//go:linkname Isposinf py.isposinf -func Isposinf(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.isreal.html -// -//go:linkname Isreal py.isreal -func Isreal(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.istft.html -// -//go:linkname Istft py.istft -func Istft(input *py.Object, nFft *py.Object, hopLength *py.Object, winLength *py.Object, window *py.Object, center *py.Object, normalized *py.Object, onesided *py.Object, length *py.Object, returnComplex *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.kaiser_window.html -// -//go:linkname KaiserWindow py.kaiser_window -func KaiserWindow(windowLength *py.Object, periodic *py.Object, beta *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.kron.html -// -//go:linkname Kron py.kron -func Kron(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.kthvalue.html -// -//go:linkname Kthvalue py.kthvalue -func Kthvalue(input *py.Object, k *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.lcm.html -// -//go:linkname Lcm py.lcm -func Lcm(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ldexp.html -// -//go:linkname Ldexp py.ldexp -func Ldexp(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.le.html -// -//go:linkname Le py.le -func Le(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.lerp.html -// -//go:linkname Lerp py.lerp -func Lerp(input *py.Object, end *py.Object, weight *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.less.html -// -//go:linkname Less py.less -func Less(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.less_equal.html -// -//go:linkname LessEqual py.less_equal -func LessEqual(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.lgamma.html -// -//go:linkname Lgamma py.lgamma -func Lgamma(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.linspace.html -// -//go:linkname Linspace py.linspace -func Linspace(start *py.Object, end *py.Object, steps *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.log.html -// -//go:linkname Log py.log -func Log(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.log10.html -// -//go:linkname Log10 py.log10 -func Log10(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.log1p.html -// -//go:linkname Log1p py.log1p -func Log1p(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.log2.html -// -//go:linkname Log2 py.log2 -func Log2(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logaddexp.html -// -//go:linkname Logaddexp py.logaddexp -func Logaddexp(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logaddexp2.html -// -//go:linkname Logaddexp2 py.logaddexp2 -func Logaddexp2(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logcumsumexp.html -// -//go:linkname Logcumsumexp py.logcumsumexp -func Logcumsumexp(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logdet.html -// -//go:linkname Logdet py.logdet -func Logdet(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logical_and.html -// -//go:linkname LogicalAnd py.logical_and -func LogicalAnd(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logical_not.html -// -//go:linkname LogicalNot py.logical_not -func LogicalNot(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logical_or.html -// -//go:linkname LogicalOr py.logical_or -func LogicalOr(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logical_xor.html -// -//go:linkname LogicalXor py.logical_xor -func LogicalXor(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logit.html -// -//go:linkname Logit py.logit -func Logit(input *py.Object, eps *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logspace.html -// -//go:linkname Logspace py.logspace -func Logspace(start *py.Object, end *py.Object, steps *py.Object, base *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.logsumexp.html -// -//go:linkname Logsumexp py.logsumexp -func Logsumexp(input *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.lt.html -// -//go:linkname Lt py.lt -func Lt(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.lu_solve.html -// -//go:linkname LuSolve py.lu_solve -func LuSolve(b *py.Object, LUData *py.Object, LUPivots *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.lu_unpack.html -// -//go:linkname LuUnpack py.lu_unpack -func LuUnpack(LUData *py.Object, LUPivots *py.Object, unpackData *py.Object, unpackPivots *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.masked_select.html -// -//go:linkname MaskedSelect py.masked_select -func MaskedSelect(input *py.Object, mask *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.matmul.html -// -//go:linkname Matmul py.matmul -func Matmul(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.matrix_exp.html -// -//go:linkname MatrixExp py.matrix_exp -func MatrixExp(A *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.matrix_power.html -// -//go:linkname MatrixPower py.matrix_power -func MatrixPower(input *py.Object, n *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.max.html -// -//go:linkname Max py.max -func Max(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.maximum.html -// -//go:linkname Maximum py.maximum -func Maximum(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.mean.html -// -//go:linkname Mean py.mean -func Mean(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.median.html -// -//go:linkname Median py.median -func Median(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.min.html -// -//go:linkname Min py.min -func Min(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.minimum.html -// -//go:linkname Minimum py.minimum -func Minimum(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.mm.html -// -//go:linkname Mm py.mm -func Mm(input *py.Object, mat2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.mode.html -// -//go:linkname Mode py.mode -func Mode(input *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.moveaxis.html -// -//go:linkname Moveaxis py.moveaxis -func Moveaxis(input *py.Object, source *py.Object, destination *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.movedim.html -// -//go:linkname Movedim py.movedim -func Movedim(input *py.Object, source *py.Object, destination *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.msort.html -// -//go:linkname Msort py.msort -func Msort(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.mul.html -// -//go:linkname Mul py.mul -func Mul(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.multinomial.html -// -//go:linkname Multinomial py.multinomial -func Multinomial(input *py.Object, numSamples *py.Object, replacement *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.multiply.html -// -//go:linkname Multiply py.multiply -func Multiply(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.mv.html -// -//go:linkname Mv py.mv -func Mv(input *py.Object, vec *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.mvlgamma.html -// -//go:linkname Mvlgamma py.mvlgamma -func Mvlgamma(input *py.Object, p *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nan_to_num.html -// -//go:linkname NanToNum py.nan_to_num -func NanToNum(input *py.Object, nan *py.Object, posinf *py.Object, neginf *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nanmean.html -// -//go:linkname Nanmean py.nanmean -func Nanmean(input *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nanmedian.html -// -//go:linkname Nanmedian py.nanmedian -func Nanmedian(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nanquantile.html -// -//go:linkname Nanquantile py.nanquantile -func Nanquantile(input *py.Object, q *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nansum.html -// -//go:linkname Nansum py.nansum -func Nansum(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.narrow.html -// -//go:linkname Narrow py.narrow -func Narrow(input *py.Object, dim *py.Object, start *py.Object, length *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.narrow_copy.html -// -//go:linkname NarrowCopy py.narrow_copy -func NarrowCopy(input *py.Object, dim *py.Object, start *py.Object, length *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ne.html -// -//go:linkname Ne py.ne -func Ne(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.neg.html -// -//go:linkname Neg py.neg -func Neg(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.negative.html -// -//go:linkname Negative py.negative -func Negative(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nextafter.html -// -//go:linkname Nextafter py.nextafter -func Nextafter(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.nonzero.html -// -//go:linkname Nonzero py.nonzero -func Nonzero(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.normal.html -// -//go:linkname Normal py.normal -func Normal(mean *py.Object, std *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.not_equal.html -// -//go:linkname NotEqual py.not_equal -func NotEqual(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.numel.html -// -//go:linkname Numel py.numel -func Numel(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ones.html -// -//go:linkname Ones py.ones -func Ones(__llgo_va_list ...interface{}) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ones_like.html -// -//go:linkname OnesLike py.ones_like -func OnesLike(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.orgqr.html -// -//go:linkname Orgqr py.orgqr -func Orgqr(input *py.Object, tau *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ormqr.html -// -//go:linkname Ormqr py.ormqr -func Ormqr(input *py.Object, tau *py.Object, other *py.Object, left *py.Object, transpose *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.outer.html -// -//go:linkname Outer py.outer -func Outer(input *py.Object, vec2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.permute.html -// -//go:linkname Permute py.permute -func Permute(input *py.Object, dims *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.pinverse.html -// -//go:linkname Pinverse py.pinverse -func Pinverse(input *py.Object, rcond *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.poisson.html -// -//go:linkname Poisson py.poisson -func Poisson(input *py.Object, generator *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.polar.html -// -//go:linkname Polar py.polar -func Polar(abs *py.Object, angle *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.polygamma.html -// -//go:linkname Polygamma py.polygamma -func Polygamma(n *py.Object, input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.positive.html -// -//go:linkname Positive py.positive -func Positive(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.pow.html -// -//go:linkname Pow py.pow -func Pow(input *py.Object, exponent *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.prod.html -// -//go:linkname Prod py.prod -func Prod(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.promote_types.html -// -//go:linkname PromoteTypes py.promote_types -func PromoteTypes(type1 *py.Object, type2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.qr.html -// -//go:linkname Qr py.qr -func Qr(input *py.Object, some *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.quantile.html -// -//go:linkname Quantile py.quantile -func Quantile(input *py.Object, q *py.Object, dim *py.Object, keepdim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.quantize_per_channel.html -// -//go:linkname QuantizePerChannel py.quantize_per_channel -func QuantizePerChannel(input *py.Object, scales *py.Object, zeroPoints *py.Object, axis *py.Object, dtype *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.quantize_per_tensor.html -// -//go:linkname QuantizePerTensor py.quantize_per_tensor -func QuantizePerTensor(input *py.Object, scale *py.Object, zeroPoint *py.Object, dtype *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.quantized_batch_norm.html -// -//go:linkname QuantizedBatchNorm py.quantized_batch_norm -func QuantizedBatchNorm(input *py.Object, weight *py.Object, bias *py.Object, mean *py.Object, var_ *py.Object, eps *py.Object, outputScale *py.Object, outputZeroPoint *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.quantized_max_pool1d.html -// -//go:linkname QuantizedMaxPool1d py.quantized_max_pool1d -func QuantizedMaxPool1d(input *py.Object, kernelSize *py.Object, stride *py.Object, padding *py.Object, dilation *py.Object, ceilMode *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.quantized_max_pool2d.html -// -//go:linkname QuantizedMaxPool2d py.quantized_max_pool2d -func QuantizedMaxPool2d(input *py.Object, kernelSize *py.Object, stride *py.Object, padding *py.Object, dilation *py.Object, ceilMode *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.rad2deg.html -// -//go:linkname Rad2deg py.rad2deg -func Rad2deg(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.rand.html -// -//go:linkname Rand py.rand -func Rand(__llgo_va_list ...interface{}) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.rand_like.html -// -//go:linkname RandLike py.rand_like -func RandLike(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.randint.html -// -//go:linkname Randint py.randint -func Randint(low *py.Object, high *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.randint_like.html -// -//go:linkname RandintLike py.randint_like -func RandintLike(input *py.Object, low *py.Object, high *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.randn.html -// -//go:linkname Randn py.randn -func Randn(__llgo_va_list ...interface{}) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.randn_like.html -// -//go:linkname RandnLike py.randn_like -func RandnLike(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.randperm.html -// -//go:linkname Randperm py.randperm -func Randperm(n *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.range.html -// -//go:linkname Range py.range -func Range(start *py.Object, end *py.Object, step *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.ravel.html -// -//go:linkname Ravel py.ravel -func Ravel(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.real.html -// -//go:linkname Real py.real -func Real(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.reciprocal.html -// -//go:linkname Reciprocal py.reciprocal -func Reciprocal(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.remainder.html -// -//go:linkname Remainder py.remainder -func Remainder(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.renorm.html -// -//go:linkname Renorm py.renorm -func Renorm(input *py.Object, p *py.Object, dim *py.Object, maxnorm *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.repeat_interleave.html -// -//go:linkname RepeatInterleave py.repeat_interleave -func RepeatInterleave(input *py.Object, repeats *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.reshape.html -// -//go:linkname Reshape py.reshape -func Reshape(input *py.Object, shape *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.resolve_conj.html -// -//go:linkname ResolveConj py.resolve_conj -func ResolveConj(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.resolve_neg.html -// -//go:linkname ResolveNeg py.resolve_neg -func ResolveNeg(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.result_type.html -// -//go:linkname ResultType py.result_type -func ResultType(tensor1 *py.Object, tensor2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.roll.html -// -//go:linkname Roll py.roll -func Roll(input *py.Object, shifts *py.Object, dims *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.rot90.html -// -//go:linkname Rot90 py.rot90 -func Rot90(input *py.Object, k *py.Object, dims *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.round.html -// -//go:linkname Round py.round -func Round(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.row_stack.html -// -//go:linkname RowStack py.row_stack -func RowStack(tensors *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.rsqrt.html -// -//go:linkname Rsqrt py.rsqrt -func Rsqrt(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.scatter.html -// -//go:linkname Scatter py.scatter -func Scatter(input *py.Object, dim *py.Object, index *py.Object, src *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.scatter_add.html -// -//go:linkname ScatterAdd py.scatter_add -func ScatterAdd(input *py.Object, dim *py.Object, index *py.Object, src *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.scatter_reduce.html -// -//go:linkname ScatterReduce py.scatter_reduce -func ScatterReduce(input *py.Object, dim *py.Object, index *py.Object, src *py.Object, reduce *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.searchsorted.html -// -//go:linkname Searchsorted py.searchsorted -func Searchsorted(sortedSequence *py.Object, values *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.select.html -// -//go:linkname Select py.select -func Select(input *py.Object, dim *py.Object, index *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.select_scatter.html -// -//go:linkname SelectScatter py.select_scatter -func SelectScatter(input *py.Object, src *py.Object, dim *py.Object, index *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sgn.html -// -//go:linkname Sgn py.sgn -func Sgn(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sigmoid.html -// -//go:linkname Sigmoid py.sigmoid -func Sigmoid(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sign.html -// -//go:linkname Sign py.sign -func Sign(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.signbit.html -// -//go:linkname Signbit py.signbit -func Signbit(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sin.html -// -//go:linkname Sin py.sin -func Sin(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sinc.html -// -//go:linkname Sinc py.sinc -func Sinc(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sinh.html -// -//go:linkname Sinh py.sinh -func Sinh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.slice_scatter.html -// -//go:linkname SliceScatter py.slice_scatter -func SliceScatter(input *py.Object, src *py.Object, dim *py.Object, start *py.Object, end *py.Object, step *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.slogdet.html -// -//go:linkname Slogdet py.slogdet -func Slogdet(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.smm.html -// -//go:linkname Smm py.smm -func Smm(input *py.Object, mat *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.softmax.html -// -//go:linkname Softmax py.softmax -func Softmax(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sort.html -// -//go:linkname Sort py.sort -func Sort(input *py.Object, dim *py.Object, descending *py.Object, stable *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sparse_bsc_tensor.html -// -//go:linkname SparseBscTensor py.sparse_bsc_tensor -func SparseBscTensor(ccolIndices *py.Object, rowIndices *py.Object, values *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sparse_bsr_tensor.html -// -//go:linkname SparseBsrTensor py.sparse_bsr_tensor -func SparseBsrTensor(crowIndices *py.Object, colIndices *py.Object, values *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sparse_compressed_tensor.html -// -//go:linkname SparseCompressedTensor py.sparse_compressed_tensor -func SparseCompressedTensor(compressedIndices *py.Object, plainIndices *py.Object, values *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sparse_coo_tensor.html -// -//go:linkname SparseCooTensor py.sparse_coo_tensor -func SparseCooTensor(indices *py.Object, values *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sparse_csc_tensor.html -// -//go:linkname SparseCscTensor py.sparse_csc_tensor -func SparseCscTensor(ccolIndices *py.Object, rowIndices *py.Object, values *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sparse_csr_tensor.html -// -//go:linkname SparseCsrTensor py.sparse_csr_tensor -func SparseCsrTensor(crowIndices *py.Object, colIndices *py.Object, values *py.Object, size *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sqrt.html -// -//go:linkname Sqrt py.sqrt -func Sqrt(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.square.html -// -//go:linkname Square py.square -func Square(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.squeeze.html -// -//go:linkname Squeeze py.squeeze -func Squeeze(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sspaddmm.html -// -//go:linkname Sspaddmm py.sspaddmm -func Sspaddmm(input *py.Object, mat1 *py.Object, mat2 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.stack.html -// -//go:linkname Stack py.stack -func Stack(tensors *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.std.html -// -//go:linkname Std py.std -func Std(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.std_mean.html -// -//go:linkname StdMean py.std_mean -func StdMean(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sub.html -// -//go:linkname Sub py.sub -func Sub(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.subtract.html -// -//go:linkname Subtract py.subtract -func Subtract(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.sum.html -// -//go:linkname Sum py.sum -func Sum(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.svd.html -// -//go:linkname Svd py.svd -func Svd(input *py.Object, some *py.Object, computeUv *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.swapaxes.html -// -//go:linkname Swapaxes py.swapaxes -func Swapaxes(input *py.Object, axis0 *py.Object, axis1 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.swapdims.html -// -//go:linkname Swapdims py.swapdims -func Swapdims(input *py.Object, dim0 *py.Object, dim1 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.t.html -// -//go:linkname T py.t -func T(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.take.html -// -//go:linkname Take py.take -func Take(input *py.Object, index *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.take_along_dim.html -// -//go:linkname TakeAlongDim py.take_along_dim -func TakeAlongDim(input *py.Object, indices *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tan.html -// -//go:linkname Tan py.tan -func Tan(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tanh.html -// -//go:linkname Tanh py.tanh -func Tanh(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tensor.html -// -//go:linkname Tensor py.tensor -func Tensor(data *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tensor_split.html -// -//go:linkname TensorSplit py.tensor_split -func TensorSplit(input *py.Object, indicesOrSections *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tile.html -// -//go:linkname Tile py.tile -func Tile(input *py.Object, dims *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.topk.html -// -//go:linkname Topk py.topk -func Topk(input *py.Object, k *py.Object, dim *py.Object, largest *py.Object, sorted *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.trace.html -// -//go:linkname Trace py.trace -func Trace(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.transpose.html -// -//go:linkname Transpose py.transpose -func Transpose(input *py.Object, dim0 *py.Object, dim1 *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.trapezoid.html -// -//go:linkname Trapezoid py.trapezoid -func Trapezoid(y *py.Object, x *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.trapz.html -// -//go:linkname Trapz py.trapz -func Trapz(y *py.Object, x *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.triangular_solve.html -// -//go:linkname TriangularSolve py.triangular_solve -func TriangularSolve(b *py.Object, A *py.Object, upper *py.Object, transpose *py.Object, unitriangular *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tril.html -// -//go:linkname Tril py.tril -func Tril(input *py.Object, diagonal *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.tril_indices.html -// -//go:linkname TrilIndices py.tril_indices -func TrilIndices(row *py.Object, col *py.Object, offset *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.triu.html -// -//go:linkname Triu py.triu -func Triu(input *py.Object, diagonal *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.triu_indices.html -// -//go:linkname TriuIndices py.triu_indices -func TriuIndices(row *py.Object, col *py.Object, offset *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.true_divide.html -// -//go:linkname TrueDivide py.true_divide -func TrueDivide(dividend *py.Object, divisor *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.trunc.html -// -//go:linkname Trunc py.trunc -func Trunc(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.unbind.html -// -//go:linkname Unbind py.unbind -func Unbind(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.unflatten.html -// -//go:linkname Unflatten py.unflatten -func Unflatten(input *py.Object, dim *py.Object, sizes *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.unsqueeze.html -// -//go:linkname Unsqueeze py.unsqueeze -func Unsqueeze(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.vander.html -// -//go:linkname Vander py.vander -func Vander(x *py.Object, N *py.Object, increasing *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.var.html -// -//go:linkname Var py.var -func Var(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.var_mean.html -// -//go:linkname VarMean py.var_mean -func VarMean(input *py.Object, dim *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.vdot.html -// -//go:linkname Vdot py.vdot -func Vdot(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.view_as_complex.html -// -//go:linkname ViewAsComplex py.view_as_complex -func ViewAsComplex(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.view_as_real.html -// -//go:linkname ViewAsReal py.view_as_real -func ViewAsReal(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.vsplit.html -// -//go:linkname Vsplit py.vsplit -func Vsplit(input *py.Object, indicesOrSections *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.vstack.html -// -//go:linkname Vstack py.vstack -func Vstack(tensors *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.where.html -// -//go:linkname Where py.where -func Where(condition *py.Object, input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.xlogy.html -// -//go:linkname Xlogy py.xlogy -func Xlogy(input *py.Object, other *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.zeros.html -// -//go:linkname Zeros py.zeros -func Zeros(__llgo_va_list ...interface{}) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.zeros_like.html -// -//go:linkname ZerosLike py.zeros_like -func ZerosLike(input *py.Object) *py.Object - -// See https://pytorch.org/docs/stable/generated/torch.vmap.html -// -//go:linkname Vmap py.vmap -func Vmap(func_ *py.Object, inDims *py.Object, outDims *py.Object, randomness *py.Object) *py.Object diff --git a/py/tuple.go b/py/tuple.go deleted file mode 100644 index d94b00f4..00000000 --- a/py/tuple.go +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/tuple.html - -//go:linkname Tuple llgo.pyTuple -func Tuple(__llgo_va_list ...any) *Object - -// Return a new tuple object of size len, or nil on failure. -// -//go:linkname NewTuple C.PyTuple_New -func NewTuple(len int) *Object - -// Take a pointer to a tuple object, and return the size of that tuple. -// -// llgo:link (*Object).TupleLen C.PyTuple_Size -func (t *Object) TupleLen() int { return 0 } - -// Return the object at position pos in the tuple pointed to t. If pos is -// negative or out of bounds, return nil and set an IndexError exception. -// -// llgo:link (*Object).TupleItem C.PyTuple_GetItem -func (t *Object) TupleItem(index int) *Object { return nil } - -// Insert a reference to object o at position pos of the tuple pointed to by t. -// Return 0 on success. If pos is out of bounds, return -1 and set an -// IndexError exception. -// -// llgo:link (*Object).TupleSetItem C.PyTuple_SetItem -func (t *Object) TupleSetItem(index int, o *Object) int { return 0 } - -// Return the slice of the tuple pointed to by t between low and high, -// or NULL on failure. This is the equivalent of the Python expression -// p[low:high]. Indexing from the end of the tuple is not supported. -// -// llgo:link (*Object).TupleSlice C.PyTuple_GetSlice -func (l *Object) TupleSlice(low, high int) *Object { return nil } diff --git a/py/type.go b/py/type.go deleted file mode 100644 index 9697806d..00000000 --- a/py/type.go +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" -) - -// https://docs.python.org/3/c-api/type.html - -// Return the type’s name. Equivalent to getting the type’s __name__ attribute. -// -// llgo:link (*Object).TypeName C.PyType_GetName -func (t *Object) TypeName() *Object { return nil } - -// Return the tp_flags member of type. This function is primarily meant for use -// with Py_LIMITED_API; the individual flag bits are guaranteed to be stable across -// Python releases, but access to tp_flags itself is not part of the limited API. -// -// llgo:link (*Object).TypeFlags C.PyType_GetFlags -func (t *Object) TypeFlags() uint32 { return 0 } - -// Return the module object associated with the given type when the type was created -// using PyType_FromModuleAndSpec(). -// -// If no module is associated with the given type, sets TypeError and returns nil. -// -// This function is usually used to get the module in which a method is defined. Note -// that in such a method, Py_TYPE(self).Module() may not return the intended result. -// Py_TYPE(self) may be a subclass of the intended class, and subclasses are not -// necessarily defined in the same module as their superclass. See PyCMethod to get -// the class that defines the method. See ModuleByDef() for cases when PyCMethod -// cannot be used. -// -// llgo:link (*Object).TypeModule C.PyType_GetModule -func (t *Object) TypeModule() *Object { return nil } - -// -llgo:link (*Object).TypeModuleByDef C.PyType_GetModuleByDef -// func (t *Object) TypeModuleByDef(def *ModuleDef) *Object { return nil } diff --git a/py/unicode.go b/py/unicode.go deleted file mode 100644 index e865df03..00000000 --- a/py/unicode.go +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package py - -import ( - _ "unsafe" - - "github.com/goplus/llgo/c" -) - -// https://docs.python.org/3/c-api/unicode.html - -//go:linkname Str llgo.pystr -func Str(s string) *Object - -//go:linkname FromCStr C.PyUnicode_FromString -func FromCStr(str *c.Char) *Object - -//go:linkname FromCStrAndLen C.PyUnicode_FromStringAndSize -func FromCStrAndLen(str *c.Char, n int) *Object - -// FromGoString returns a new Unicode object from a Go string. -func FromGoString(s string) *Object { - return FromCStrAndLen(c.GoStringData(s), len(s)) -} - -// Return a pointer to the UTF-8 encoding of the Unicode object, and store the -// size of the encoded representation (in bytes) in size. The size argument can -// be nil; in this case no size will be stored. The returned buffer always has -// an extra null byte appended (not included in size), regardless of whether -// there are any other null code points. -// -// In the case of an error, nil is returned with an exception set and no size is -// stored. -// -// This caches the UTF-8 representation of the string in the Unicode object, and -// subsequent calls will return a pointer to the same buffer. The caller is not -// responsible for deallocating the buffer. The buffer is deallocated and pointers -// to it become invalid when the Unicode object is garbage collected. -// -// llgo:link (*Object).CStrAndLen C.PyUnicode_AsUTF8AndSize -func (u *Object) CStrAndLen() (*c.Char, uintptr) { return nil, 0 } - -// As CStrAndLen, but does not store the len. -// -// llgo:link (*Object).CStr C.PyUnicode_AsUTF8 -func (u *Object) CStr() *c.Char { return nil } - -// Same as CStr. Provided for Go+. -// -// llgo:link (*Object).Cstr C.PyUnicode_AsUTF8 -func (u *Object) Cstr() *c.Char { return nil } diff --git a/runtime/internal/clite/libuv/_demo/async/async.go b/runtime/internal/clite/libuv/_demo/async/async.go index eb97ba0d..978b4acb 100644 --- a/runtime/internal/clite/libuv/_demo/async/async.go +++ b/runtime/internal/clite/libuv/_demo/async/async.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/libuv" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/libuv" ) func ensure(b bool, msg string) { diff --git a/runtime/internal/clite/libuv/_demo/async_fs/async_fs.go b/runtime/internal/clite/libuv/_demo/async_fs/async_fs.go index 36acff75..5c41ee4d 100644 --- a/runtime/internal/clite/libuv/_demo/async_fs/async_fs.go +++ b/runtime/internal/clite/libuv/_demo/async_fs/async_fs.go @@ -3,9 +3,9 @@ package main import ( "unsafe" - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/libuv" - "github.com/goplus/llgo/c/os" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/libuv" + "github.com/goplus/lib/c/os" ) const BUFFER_SIZE = 1024 diff --git a/runtime/internal/clite/libuv/_demo/echo_server/echo_server.go b/runtime/internal/clite/libuv/_demo/echo_server/echo_server.go index 9a208a76..1265ebf1 100644 --- a/runtime/internal/clite/libuv/_demo/echo_server/echo_server.go +++ b/runtime/internal/clite/libuv/_demo/echo_server/echo_server.go @@ -1,9 +1,9 @@ package main import ( - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/libuv" - "github.com/goplus/llgo/c/net" + "github.com/goplus/lib/c" + "github.com/goplus/lib/c/libuv" + "github.com/goplus/lib/c/net" ) var DEFAULT_PORT c.Int = 8080 diff --git a/compiler/ssa/abi/abi.go b/ssa/abi/abi.go similarity index 99% rename from compiler/ssa/abi/abi.go rename to ssa/abi/abi.go index 014aa6b7..6d38fb38 100644 --- a/compiler/ssa/abi/abi.go +++ b/ssa/abi/abi.go @@ -25,7 +25,7 @@ import ( "log" "strings" - "github.com/goplus/llgo/compiler/internal/env" + "github.com/goplus/llgo/internal/env" "github.com/goplus/llgo/runtime/abi" ) diff --git a/compiler/ssa/abi/map.go b/ssa/abi/map.go similarity index 100% rename from compiler/ssa/abi/map.go rename to ssa/abi/map.go diff --git a/compiler/ssa/abitype.go b/ssa/abitype.go similarity index 99% rename from compiler/ssa/abitype.go rename to ssa/abitype.go index 8ba59188..8b61608b 100644 --- a/compiler/ssa/abitype.go +++ b/ssa/abitype.go @@ -21,7 +21,7 @@ import ( "go/types" "unsafe" - "github.com/goplus/llgo/compiler/ssa/abi" + "github.com/goplus/llgo/ssa/abi" "github.com/goplus/llvm" "golang.org/x/tools/go/types/typeutil" ) diff --git a/compiler/ssa/cl_test.go b/ssa/cl_test.go similarity index 95% rename from compiler/ssa/cl_test.go rename to ssa/cl_test.go index 649d92cf..7294cc34 100644 --- a/compiler/ssa/cl_test.go +++ b/ssa/cl_test.go @@ -26,9 +26,9 @@ import ( "log" "testing" - "github.com/goplus/llgo/compiler/cl/cltest" - "github.com/goplus/llgo/compiler/ssa" - "github.com/goplus/llgo/compiler/ssa/ssatest" + "github.com/goplus/llgo/cl/cltest" + "github.com/goplus/llgo/ssa" + "github.com/goplus/llgo/ssa/ssatest" ) func TestMain(m *testing.M) { diff --git a/compiler/ssa/datastruct.go b/ssa/datastruct.go similarity index 100% rename from compiler/ssa/datastruct.go rename to ssa/datastruct.go diff --git a/compiler/ssa/decl.go b/ssa/decl.go similarity index 100% rename from compiler/ssa/decl.go rename to ssa/decl.go diff --git a/compiler/ssa/di.go b/ssa/di.go similarity index 100% rename from compiler/ssa/di.go rename to ssa/di.go diff --git a/compiler/ssa/eh.go b/ssa/eh.go similarity index 100% rename from compiler/ssa/eh.go rename to ssa/eh.go diff --git a/compiler/ssa/expr.go b/ssa/expr.go similarity index 100% rename from compiler/ssa/expr.go rename to ssa/expr.go diff --git a/compiler/ssa/goroutine.go b/ssa/goroutine.go similarity index 100% rename from compiler/ssa/goroutine.go rename to ssa/goroutine.go diff --git a/compiler/ssa/interface.go b/ssa/interface.go similarity index 99% rename from compiler/ssa/interface.go rename to ssa/interface.go index 603597dc..6f3e0d98 100644 --- a/compiler/ssa/interface.go +++ b/ssa/interface.go @@ -22,7 +22,7 @@ import ( "go/types" "log" - "github.com/goplus/llgo/compiler/ssa/abi" + "github.com/goplus/llgo/ssa/abi" "github.com/goplus/llvm" ) diff --git a/compiler/ssa/memory.go b/ssa/memory.go similarity index 100% rename from compiler/ssa/memory.go rename to ssa/memory.go diff --git a/compiler/ssa/package.go b/ssa/package.go similarity index 99% rename from compiler/ssa/package.go rename to ssa/package.go index 7edac049..8c23515e 100644 --- a/compiler/ssa/package.go +++ b/ssa/package.go @@ -24,14 +24,14 @@ import ( "strconv" "unsafe" - "github.com/goplus/llgo/compiler/internal/env" - "github.com/goplus/llgo/compiler/ssa/abi" + "github.com/goplus/llgo/internal/env" + "github.com/goplus/llgo/ssa/abi" "github.com/goplus/llvm" "golang.org/x/tools/go/types/typeutil" ) const ( - PkgPython = "github.com/goplus/llgo/py" + PkgPython = "github.com/goplus/lib/py" PkgRuntime = env.LLGoRuntimePkg + "/internal/runtime" ) diff --git a/compiler/ssa/python.go b/ssa/python.go similarity index 100% rename from compiler/ssa/python.go rename to ssa/python.go diff --git a/compiler/ssa/ssa_test.go b/ssa/ssa_test.go similarity index 100% rename from compiler/ssa/ssa_test.go rename to ssa/ssa_test.go diff --git a/compiler/ssa/ssatest/ssautil.go b/ssa/ssatest/ssautil.go similarity index 97% rename from compiler/ssa/ssatest/ssautil.go rename to ssa/ssatest/ssautil.go index 1d1c96dc..bbb8ae9a 100644 --- a/compiler/ssa/ssatest/ssautil.go +++ b/ssa/ssatest/ssautil.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/goplus/gogen/packages" - "github.com/goplus/llgo/compiler/ssa" + "github.com/goplus/llgo/ssa" ) func NewProgram(t *testing.T, target *ssa.Target) ssa.Program { diff --git a/compiler/ssa/ssatest/ssautil_test.go b/ssa/ssatest/ssautil_test.go similarity index 98% rename from compiler/ssa/ssatest/ssautil_test.go rename to ssa/ssatest/ssautil_test.go index 34913c15..ad66092a 100644 --- a/compiler/ssa/ssatest/ssautil_test.go +++ b/ssa/ssatest/ssautil_test.go @@ -7,7 +7,7 @@ import ( "go/types" "testing" - "github.com/goplus/llgo/compiler/ssa" + "github.com/goplus/llgo/ssa" "github.com/goplus/llvm" ) diff --git a/compiler/ssa/stmt_builder.go b/ssa/stmt_builder.go similarity index 100% rename from compiler/ssa/stmt_builder.go rename to ssa/stmt_builder.go diff --git a/compiler/ssa/target.go b/ssa/target.go similarity index 100% rename from compiler/ssa/target.go rename to ssa/target.go diff --git a/compiler/ssa/type.go b/ssa/type.go similarity index 99% rename from compiler/ssa/type.go rename to ssa/type.go index c7a99ac1..693343ef 100644 --- a/compiler/ssa/type.go +++ b/ssa/type.go @@ -21,7 +21,7 @@ import ( "go/types" "unsafe" - "github.com/goplus/llgo/compiler/ssa/abi" + "github.com/goplus/llgo/ssa/abi" "github.com/goplus/llvm" ) diff --git a/compiler/ssa/type_cvt.go b/ssa/type_cvt.go similarity index 100% rename from compiler/ssa/type_cvt.go rename to ssa/type_cvt.go diff --git a/test/c_test.go b/test/c_test.go index 4802d6d1..6a66036d 100644 --- a/test/c_test.go +++ b/test/c_test.go @@ -6,7 +6,7 @@ package test import ( "testing" - "github.com/goplus/llgo/c" + "github.com/goplus/lib/c" ) // Can't put it in c/ package because it is marked as 'decl' diff --git a/x/ffi/_demo/_wrap/wrap.c b/x/ffi/_demo/_wrap/wrap.c deleted file mode 100644 index 07f31c0a..00000000 --- a/x/ffi/_demo/_wrap/wrap.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -struct array -{ - int x; - int y; - int z; - int k; -}; - -int demo1(struct array a) -{ - printf("c.demo1: %d %d %d %d\n",a.x,a.y,a.z,a.k); - return a.x+a.y+a.z+a.k; -} - -int demo2( int (*fn)(struct array)) { - printf("c.demo2: %p\n",fn); - struct array a; - a.x = 1; - a.y = 2; - a.z = 3; - a.k = 4; - return (*fn)(a); -} diff --git a/x/ffi/_demo/cfunc/main.go b/x/ffi/_demo/cfunc/main.go deleted file mode 100644 index f2111dce..00000000 --- a/x/ffi/_demo/cfunc/main.go +++ /dev/null @@ -1,57 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/x/ffi" -) - -const ( - LLGoPackage = "link" - LLGoFiles = "../_wrap/wrap.c" -) - -//llgo:type C -type Callback func(array) c.Int - -//go:linkname demo1 C.demo1 -func demo1(array) c.Int - -//go:linkname demo2 C.demo2 -func demo2(fn Callback) c.Int - -//llgo:type C -type array struct { - x c.Int - y c.Int - z c.Int - k c.Int -} - -func main() { - cdemo1() - cdemo2() -} - -func cdemo1() { - sig, err := ffi.NewSignature(ffi.TypeInt32, ffi.StructOf(ffi.TypeInt32, ffi.TypeInt32, ffi.TypeInt32, ffi.TypeInt32)) - if err != nil { - panic(err) - } - ar := array{1, 2, 3, 4} - var ret int32 - ffi.Call(sig, c.Func(demo1), unsafe.Pointer(&ret), unsafe.Pointer(&ar)) - c.Printf(c.Str("ret: %d\n"), ret) -} - -func cdemo2() { - sig, err := ffi.NewSignature(ffi.TypeInt32, ffi.TypePointer) - if err != nil { - panic(err) - } - var ret int32 - fn := c.Func(demo1) - ffi.Call(sig, c.Func(demo2), unsafe.Pointer(&ret), unsafe.Pointer(&fn)) - c.Printf(c.Str("ret: %d\n"), ret) -} diff --git a/x/ffi/_demo/closure/main.go b/x/ffi/_demo/closure/main.go deleted file mode 100644 index f50f1879..00000000 --- a/x/ffi/_demo/closure/main.go +++ /dev/null @@ -1,78 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/x/ffi" -) - -const ( - LLGoPackage = "link" - LLGoFiles = "../_wrap/wrap.c" -) - -//llgo:type C -type Callback func(array) c.Int - -//go:linkname demo1 C.demo1 -func demo1(array) c.Int - -//go:linkname demo2 C.demo2 -func demo2(fn Callback) c.Int - -//llgo:type C -type array struct { - x c.Int - y c.Int - z c.Int - k c.Int -} - -func demo(a array) c.Int { - c.Printf(c.Str("go.demo %d %d %d %d\n"), a.x, a.y, a.z, a.k) - return a.x + a.y + a.z + a.k -} - -func main() { - gofn() - c.Printf(c.Str("\n")) - goclosure() -} - -func gofn() { - sig, err := ffi.NewSignature(ffi.TypeInt32, ffi.TypePointer) - if err != nil { - panic(err) - } - closure := ffi.NewClosure() - defer closure.Free() - err = closure.Bind(sig, func(cif *ffi.Signature, ret unsafe.Pointer, args *unsafe.Pointer, userdata unsafe.Pointer) { - ar := *(*array)(ffi.Index(args, 0)) - *(*c.Int)(ret) = demo(ar) - }, nil) - var ret int32 - ffi.Call(sig, c.Func(demo2), unsafe.Pointer(&ret), unsafe.Pointer(&closure.Fn)) - c.Printf(c.Str("ret: %d\n"), ret) -} - -func goclosure() { - sig, err := ffi.NewSignature(ffi.TypeInt32, ffi.TypePointer) - if err != nil { - panic(err) - } - fn := func(ar array) c.Int { - c.Printf(c.Str("call closure %d\n"), sig.NArgs) - return demo(ar) - } - closure := ffi.NewClosure() - defer closure.Free() - err = closure.Bind(sig, func(cif *ffi.Signature, ret unsafe.Pointer, args *unsafe.Pointer, userdata unsafe.Pointer) { - ar := *(*array)(ffi.Index(args, 0)) - fn := *(*func(array) c.Int)(userdata) - *(*c.Int)(ret) = fn(ar) - }, unsafe.Pointer(&fn)) - var ret int32 - ffi.Call(sig, c.Func(demo2), unsafe.Pointer(&ret), unsafe.Pointer(&closure.Fn)) - c.Printf(c.Str("ret: %d\n"), ret) -} diff --git a/x/ffi/_demo/gofunc/main.go b/x/ffi/_demo/gofunc/main.go deleted file mode 100644 index b6bb486e..00000000 --- a/x/ffi/_demo/gofunc/main.go +++ /dev/null @@ -1,62 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/x/ffi" -) - -type array struct { - x int - y int - z int - k int -} - -type Func func(ar array, i interface{}, s string, slice []int) (int, float64) - -func demo(p1 array, p2 interface{}, p3 string, p4 []int) (int, float64) { - println(p1.x, p1.y, p1.z, p1.k) - println(p2) - println(p3) - println(p4) - for _, v := range p4 { - println(v) - } - return 200, 3.14 -} - -func main() { - sig, err := ffi.NewSignature(ffi.StructOf(ffi.TypeInt, ffi.TypeFloat64), - ffi.StructOf(ffi.TypeInt, ffi.TypeInt, ffi.TypeInt, ffi.TypeInt), - ffi.TypeInterface, ffi.TypeString, ffi.TypeSlice) - if err != nil { - panic(err) - } - fn := demo - closure := ffi.NewClosure() - defer closure.Free() - err = closure.Bind(sig, func(cif *ffi.Signature, ret unsafe.Pointer, args *unsafe.Pointer, userdata unsafe.Pointer) { - p1 := *(*array)(ffi.Index(args, 0)) - p2 := *(*any)(ffi.Index(args, 1)) - p3 := *(*string)(ffi.Index(args, 2)) - p4 := *(*[]int)(ffi.Index(args, 3)) - fn := *(*Func)(userdata) - p := (*struct { - i int - f float64 - })(ret) - p.i, p.f = fn(p1, p2, p3, p4) - }, unsafe.Pointer(&fn)) - var ret struct { - i int - f float64 - } - p1 := array{1, 2, 3, 4} - var p2 any = 100 - p3 := "hello world" - p4 := []int{100, 200, 300} - ffi.Call(sig, closure.Fn, unsafe.Pointer(&ret), - unsafe.Pointer(&p1), unsafe.Pointer(&p2), unsafe.Pointer(&p3), unsafe.Pointer(&p4)) - println("ret:", ret.i, ret.f) -} diff --git a/x/ffi/_demo/printf/main.go b/x/ffi/_demo/printf/main.go deleted file mode 100644 index 6fca035e..00000000 --- a/x/ffi/_demo/printf/main.go +++ /dev/null @@ -1,20 +0,0 @@ -package main - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/x/ffi" -) - -func main() { - sig, err := ffi.NewSignatureVar(ffi.TypeInt32, 1, ffi.TypePointer, ffi.TypeInt32) - if err != nil { - panic(err) - } - var ret int32 - text := c.Str("hello world: %d\n") - var n int32 = 100 - ffi.Call(sig, c.Func(c.Printf), unsafe.Pointer(&ret), unsafe.Pointer(&text), unsafe.Pointer(&n)) - c.Printf(c.Str("ret: %d\n"), ret) -} diff --git a/x/ffi/ffi.go b/x/ffi/ffi.go deleted file mode 100644 index b0860085..00000000 --- a/x/ffi/ffi.go +++ /dev/null @@ -1,92 +0,0 @@ -package ffi - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/ffi" -) - -type Type = ffi.Type - -type Signature = ffi.Cif - -type Error int - -func (s Error) Error() string { - switch s { - case ffi.OK: - return "ok" - case ffi.BAD_TYPEDEF: - return "bad type def" - case ffi.BAD_ABI: - return "bad ABI" - case ffi.BAD_ARGTYPE: - return "bad argument type" - } - return "invalid status" -} - -func NewSignature(ret *Type, args ...*Type) (*Signature, error) { - var cif Signature - var atype **Type - if len(args) > 0 { - atype = &args[0] - } - status := ffi.PrepCif(&cif, ffi.DefaultAbi, c.Uint(len(args)), ret, atype) - if status == 0 { - return &cif, nil - } - return nil, Error(status) -} - -func NewSignatureVar(ret *Type, fixed int, args ...*Type) (*Signature, error) { - var cif Signature - var atype **Type - if len(args) > 0 { - atype = &args[0] - } - status := ffi.PrepCifVar(&cif, ffi.DefaultAbi, c.Uint(fixed), c.Uint(len(args)), ret, atype) - if status == ffi.OK { - return &cif, nil - } - return nil, Error(status) -} - -func Call(cif *Signature, fn unsafe.Pointer, ret unsafe.Pointer, args ...unsafe.Pointer) { - var avalues *unsafe.Pointer - if len(args) > 0 { - avalues = &args[0] - } - ffi.Call(cif, fn, ret, avalues) -} - -type Closure struct { - ptr unsafe.Pointer - Fn unsafe.Pointer -} - -func NewClosure() *Closure { - c := &Closure{} - c.ptr = ffi.ClosureAlloc(&c.Fn) - return c -} - -func (c *Closure) Free() { - if c != nil && c.ptr != nil { - ffi.ClosureFree(c.ptr) - c.ptr = nil - } -} - -func (c *Closure) Bind(cif *Signature, fn ffi.ClosureFunc, userdata unsafe.Pointer) error { - status := ffi.PreClosureLoc(c.ptr, cif, fn, userdata, c.Fn) - if status == ffi.OK { - return nil - } - return Error(status) -} - -func Index(args *unsafe.Pointer, i uintptr) unsafe.Pointer { - return ffi.Index(args, i) -} diff --git a/x/ffi/type.go b/x/ffi/type.go deleted file mode 100644 index e43a806c..00000000 --- a/x/ffi/type.go +++ /dev/null @@ -1,124 +0,0 @@ -package ffi - -import ( - "unsafe" - - "github.com/goplus/llgo/c" - "github.com/goplus/llgo/c/ffi" -) - -type BasicKind int - -const ( - Void BasicKind = iota // type is invalid - - // predeclared types - Bool - Int - Int8 - Int16 - Int32 - Int64 - Uint - Uint8 - Uint16 - Uint32 - Uint64 - Uintptr - Float32 - Float64 - Complex64 - Complex128 - String - UnsafePointer - Interface - Slice - - // aliases - Byte = Uint8 - Rune = Int32 -) - -const ( - _64bit = 1 << (^uintptr(0) >> 63) / 2 - _Int = _64bit*ffi.Sint64 + (1-_64bit)*ffi.Sint32 - _Uint = _64bit*ffi.Uint64 + (1-_64bit)*ffi.Uint32 - _sizei = unsafe.Sizeof(0) - _aligni = uint16(unsafe.Alignof(0)) - _sizeci = unsafe.Sizeof(c.Int(0)) - _alignci = uint16(unsafe.Alignof(c.Int(0))) - _sizes = unsafe.Sizeof("") - _aligns = uint16(unsafe.Alignof("")) -) - -var ( - TypeVoid = &Type{1, 1, ffi.Void, nil} - TypeBool = &Type{1, 1, ffi.Uint8, nil} - TypeInt8 = &Type{1, 1, ffi.Sint8, nil} - TypeInt16 = &Type{2, 2, ffi.Sint16, nil} - TypeInt32 = &Type{4, 4, ffi.Sint32, nil} - TypeInt64 = &Type{8, 8, ffi.Sint64, nil} - TypeUint8 = &Type{1, 1, ffi.Uint8, nil} - TypeUint16 = &Type{2, 2, ffi.Uint16, nil} - TypeUint32 = &Type{4, 4, ffi.Uint32, nil} - TypeUint64 = &Type{8, 8, ffi.Uint64, nil} - TypeFloat32 = &Type{4, 4, ffi.Float, nil} - TypeFloat64 = &Type{8, 8, ffi.Double, nil} - TypeComplex64 = &Type{8, 4, ffi.Complex, &[]*Type{TypeFloat32, nil}[0]} - TypeComplex128 = &Type{16, 8, ffi.Complex, &[]*Type{TypeFloat64, nil}[0]} - TypeInt = &Type{_sizei, _aligni, _Int, nil} - TypeUint = &Type{_sizei, _aligni, _Uint, nil} - TypeUintptr = &Type{_sizei, _aligni, _Uint, nil} - TypePointer = &Type{_sizei, _aligni, ffi.Pointer, nil} - TypeString = StructOf(TypePointer, TypeInt) - TypeInterface = StructOf(TypePointer, TypePointer) - TypeSlice = StructOf(TypePointer, TypeInt, TypeInt) -) - -var Typ = []*Type{ - Void: TypeVoid, - Bool: TypeBool, - Int: TypeInt, - Int8: TypeInt8, - Int16: TypeInt16, - Int32: TypeInt32, - Int64: TypeInt64, - Uint: TypeUint, - Uint8: TypeUint8, - Uint16: TypeUint16, - Uint32: TypeUint32, - Uint64: TypeUint64, - Uintptr: TypeUintptr, - Float32: TypeFloat32, - Float64: TypeFloat64, - Complex64: TypeComplex64, - Complex128: TypeComplex128, - String: TypeString, - UnsafePointer: TypePointer, - Interface: TypeInterface, - Slice: TypeSlice, -} - -func ArrayOf(elem *Type, N int) *Type { - fs := make([]*Type, N+1) - for i := 0; i < N; i++ { - fs[i] = elem - } - return &Type{ - 0, - 0, - ffi.Struct, - &fs[0], - } -} - -func StructOf(fields ...*Type) *Type { - fs := make([]*Type, len(fields)+1) - copy(fs, fields) - return &Type{ - 0, - 0, - ffi.Struct, - &fs[0], - } -} diff --git a/x/io/README.md b/x/io/README.md deleted file mode 100644 index 9681b3ab..00000000 --- a/x/io/README.md +++ /dev/null @@ -1,464 +0,0 @@ -# Async I/O Design - -## Async functions in different languages - -### JavaScript - -- [Async/Await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) - -Prototype: - -```javascript -async function name(param0) { - statements; -} -async function name(param0, param1) { - statements; -} -async function name(param0, param1, /* …, */ paramN) { - statements; -} -``` - -Example: - -```typescript -async function resolveAfter1Second(): Promise { - return new Promise((resolve) => { - setTimeout(() => { - resolve("Resolved after 1 second"); - }, 1000); - }); -} - -async function asyncCall(): Promise { - const result = await resolveAfter1Second(); - return `AsyncCall: ${result}`; -} - -function asyncCall2(): Promise { - return resolveAfter1Second(); -} - -function asyncCall3(): void { - resolveAfter1Second().then((result) => { - console.log(`AsyncCall3: ${result}`); - }); -} - -async function main() { - console.log("Starting AsyncCall"); - const result1 = await asyncCall(); - console.log(result1); - - console.log("Starting AsyncCall2"); - const result2 = await asyncCall2(); - console.log(result2); - - console.log("Starting AsyncCall3"); - asyncCall3(); - - // Wait for AsyncCall3 to complete - await new Promise((resolve) => setTimeout(resolve, 1000)); - - console.log("Main function completed"); -} - -main().catch(console.error); -``` - -### Python - -- [async def](https://docs.python.org/3/library/asyncio-task.html#coroutines) - -Prototype: - -```python -async def name(param0): - statements -``` - -Example: - -```python -import asyncio - -async def resolve_after_1_second() -> str: - await asyncio.sleep(1) - return "Resolved after 1 second" - -async def async_call() -> str: - result = await resolve_after_1_second() - return f"AsyncCall: {result}" - -def async_call2() -> asyncio.Task: - return resolve_after_1_second() - -def async_call3() -> None: - asyncio.create_task(print_after_1_second()) - -async def print_after_1_second() -> None: - result = await resolve_after_1_second() - print(f"AsyncCall3: {result}") - -async def main(): - print("Starting AsyncCall") - result1 = await async_call() - print(result1) - - print("Starting AsyncCall2") - result2 = await async_call2() - print(result2) - - print("Starting AsyncCall3") - async_call3() - - # Wait for AsyncCall3 to complete - await asyncio.sleep(1) - - print("Main function completed") - -# Run the main coroutine -asyncio.run(main()) -``` - -### Rust - -- [async fn](https://doc.rust-lang.org/std/keyword.async.html) - -Prototype: - -```rust -async fn name(param0: Type) -> ReturnType { - statements -} -``` - -Example: - -```rust -use std::time::Duration; -use tokio::time::sleep; -use std::future::Future; - -async fn resolve_after_1_second() -> String { - sleep(Duration::from_secs(1)).await; - "Resolved after 1 second".to_string() -} - -async fn async_call() -> String { - let result = resolve_after_1_second().await; - format!("AsyncCall: {}", result) -} - -fn async_call2() -> impl Future { - resolve_after_1_second() -} - -fn async_call3() { - tokio::spawn(async { - let result = resolve_after_1_second().await; - println!("AsyncCall3: {}", result); - }); -} - -#[tokio::main] -async fn main() { - println!("Starting AsyncCall"); - let result1 = async_call().await; - println!("{}", result1); - - println!("Starting AsyncCall2"); - let result2 = async_call2().await; - println!("{}", result2); - - println!("Starting AsyncCall3"); - async_call3(); - - // Wait for AsyncCall3 to complete - sleep(Duration::from_secs(2)).await; - - println!("Main function completed"); -} -``` - -### C# - -- [async](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/) - -Prototype: - -```csharp -async Task NameAsync(Type param0) -{ - statements; -} -``` - -Example: - -```csharp -using System; -using System.Threading.Tasks; - -class Program -{ - static async Task ResolveAfter1Second() - { - await Task.Delay(1000); - return "Resolved after 1 second"; - } - - static async Task AsyncCall() - { - string result = await ResolveAfter1Second(); - return $"AsyncCall: {result}"; - } - - static Task AsyncCall2() - { - return ResolveAfter1Second(); - } - - static void AsyncCall3() - { - _ = Task.Run(async () => - { - string result = await ResolveAfter1Second(); - Console.WriteLine($"AsyncCall3: {result}"); - }); - } - - static async Task Main() - { - Console.WriteLine("Starting AsyncCall"); - string result1 = await AsyncCall(); - Console.WriteLine(result1); - - Console.WriteLine("Starting AsyncCall2"); - string result2 = await AsyncCall2(); - Console.WriteLine(result2); - - Console.WriteLine("Starting AsyncCall3"); - AsyncCall3(); - - // Wait for AsyncCall3 to complete - await Task.Delay(1000); - - Console.WriteLine("Main method completed"); - } -} -``` - -### C++ 20 Coroutines - -- [co_await](https://en.cppreference.com/w/cpp/language/coroutines) - -Prototype: - -```cpp -TaskReturnType NameAsync(Type param0) -{ - co_return co_await expression; -} -``` - -Example: - -```cpp -#include -#include -#include -#include -#include -#include - -cppcoro::task resolveAfter1Second() { - co_await std::chrono::seconds(1); - co_return "Resolved after 1 second"; -} - -cppcoro::task asyncCall() { - auto result = co_await resolveAfter1Second(); - co_return "AsyncCall: " + result; -} - -cppcoro::task asyncCall2() { - return resolveAfter1Second(); -} - -cppcoro::task asyncCall3() { - auto result = co_await resolveAfter1Second(); - std::cout << "AsyncCall3: " << result << std::endl; -} - -cppcoro::task main() { - std::cout << "Starting AsyncCall" << std::endl; - auto result1 = co_await asyncCall(); - std::cout << result1 << std::endl; - - std::cout << "Starting AsyncCall2" << std::endl; - auto result2 = co_await asyncCall2(); - std::cout << result2 << std::endl; - - std::cout << "Starting AsyncCall3" << std::endl; - auto asyncCall3Task = asyncCall3(); - - // Wait for AsyncCall3 to complete - co_await asyncCall3Task; - - std::cout << "Main function completed" << std::endl; -} - -int main() { - try { - cppcoro::sync_wait(::main()); - } catch (const std::exception& e) { - std::cerr << "Error: " << e.what() << std::endl; - return 1; - } - return 0; -} -``` - -## Common concepts - -### Promise, Future, Task, and Coroutine - -- **Promise**: An object that represents the eventual completion (or failure) of an asynchronous operation and its resulting value. It is used to produce a value that will be consumed by a `Future`. - -- **Future**: An object that represents the result of an asynchronous operation. It is used to obtain the value produced by a `Promise`. - -- **Task**: A unit of work that can be scheduled and executed asynchronously. It is a higher-level abstraction that combines a `Promise` and a `Future`. - -- **Coroutine**: A special type of function that can suspend its execution and return control to the caller without losing its state. It can be resumed later, allowing for asynchronous programming. - -### `async`, `await` and similar keywords - -- **`async`**: A keyword used to define a function that returns a `Promise` or `Task`. It allows the function to pause its execution and resume later. - -- **`await`**: A keyword used to pause the execution of an `async` function until a `Promise` or `Task` is resolved. It unwraps the value of the `Promise` or `Task` and allows the function to continue. - -- **`co_return`**: A keyword used in C++ coroutines to return a value from a coroutine. It is similar to `return` but is used in coroutines to indicate that the coroutine has completed. It's similar to `return` in `async` functions in other languages that boxes the value into a `Promise` or `Task`. - -`async/await` and similar constructs provide a more readable and synchronous-like way of writing asynchronous code, it hides the type of `Promise`/`Future`/`Task` from the user and allows them to focus on the logic of the code. - -### Executing Multiple Async Operations Concurrently - -To run multiple promises concurrently, JavaScript provides `Promise.all`, `Promise.allSettled` and `Promise.any`, Python provides `asyncio.gather`, Rust provides `tokio::try_join`, C# provides `Task.WhenAll`, and C++ provides `cppcoro::when_all`. - -In some situations, you may want to get the first result of multiple async operations. JavaScript provides `Promise.race` to get the first result of multiple promises. Python provides `asyncio.wait` to get the first result of multiple coroutines. Rust provides `tokio::select!` to get the first result of multiple futures. C# provides `Task.WhenAny` to get the first result of multiple tasks. C++ provides `cppcoro::when_any` to get the first result of multiple tasks. Those functions are very simular to `select` in Go. - -### Error Handling - -`await` commonly unwraps the value of a `Promise` or `Task`, but it also propagates errors. If the `Promise` or `Task` is rejected or throws an error, the error will be thrown in the `async` function by the `await` keyword. You can use `try/catch` blocks to handle errors in `async` functions. - -## Common patterns - -- `async` keyword hides the types of `Promise`/`Future`/`Task` in the function signature in Python and Rust, but not in JavaScript, C#, and C++. -- `await` keyword unwraps the value of a `Promise`/`Future`/`Task`. -- `return` keyword boxes the value into a `Promise`/`Future`/`Task` if it's not already. - -## Design considerations in LLGo - -- Don't introduce `async`/`await` keywords to compatible with Go compiler (just compiling) -- For performance reason don't implement async functions with goroutines -- Avoid implementing `Promise` by using `chan` to avoid blocking the thread, but it can be wrapped as a `chan` to make it compatible `select` statement - -## Design - -Introduce `Promise` type to represent an asynchronous operation and its resulting value. `Promise` can be resolved with a value with an error. `Promise` can be awaited to get the value and error. - -`Promise` just a type indicating the asynchronous operation, it can't be created and assigned directly. It be replaced to `PromiseImpl` by the LLGo compiler. - -```go -// Some native async functions -func timeoutAsync(d time.Duration, cb func()) { - go func() { - time.Sleep(d) - cb() - }() -} - -// Wrap callback-based async function into Promise -func resolveAfter1Second() (resolve Promise[string]) { - timeoutAsync(1 * time.Second, func() { - resolve("Resolved after 1 second", nil) - }) -} - -// Compiled to: -func resolveAfter1Second() (resolve PromiseImpl[string]) { - promise := io.NewPromiseImpl[string](resolve func(value string, err error) { - resolve: func(value string, err error) { - for true { - switch (promise.prev = promise.next) { - case 0: - timeoutAsync(1 * time.Second, func() { - resolve("Resolved after 1 second", nil) - }) - } - } - }, - } - return promise -} - -func asyncCall() (resolve Promise[string]) { - str, err := resolveAfter1Second().Await() - resolve("AsyncCall: " + str, err) -} - -// Compiled to: -func asyncCall() (resolve PromiseImpl[string]) { - promise := io.NewPromiseImpl[string](resolve func(value string, err error) { - for true { - switch (promise.prev = promise.next) { - case 0: - resolveAfter1Second() - return - case 1: - str, err := promise.value, promise.err - resolve("AsyncCall: " + str, err) - return - } - } - }) - return promise -} - -// Directly return Promise -func asyncCall2() Promise[string] { - return resolveAfter1Second() -} - -// Compiled to: -func asyncCall2() PromiseImpl[string] { - return resolveAfter1Second() -} - -// Don't wait for Promise to complete -func asyncCall3() { - resolveAfter1Second().Then(func(result string) { - fmt.Println("AsyncCall3: " + result) - }) -} - -func asyncMain() { - fmt.Println("Starting AsyncCall") - result1 := asyncCall().Await() - fmt.Println(result1) - - fmt.Println("Starting AsyncCall2") - result2 := asyncCall2().Await() - fmt.Println(result2) - - fmt.Println("Starting AsyncCall3") - asyncCall3() - - // Wait for AsyncCall3 to complete - time.Sleep(2 * time.Second) - - fmt.Println("Main function completed") -} -``` diff --git a/x/io/_demo/asyncdemo/async.go b/x/io/_demo/asyncdemo/async.go deleted file mode 100644 index 02b4475a..00000000 --- a/x/io/_demo/asyncdemo/async.go +++ /dev/null @@ -1,290 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "log" - "time" - - "github.com/goplus/llgo/x/io" -) - -// ----------------------------------------------------------------------------- - -type Response struct { - StatusCode int - - mockBody string -} - -func (r *Response) mock(body string) { - r.mockBody = body -} - -func (r *Response) Text() (resolve io.Promise[string]) { - resolve(r.mockBody, nil) - return -} - -func (r *Response) TextCompiled() *io.PromiseImpl[string] { - P := &io.PromiseImpl[string]{} - P.Func = func(resolve func(string, error)) { - for { - switch P.Prev = P.Next; P.Prev { - case 0: - resolve(r.mockBody, nil) - P.Next = -1 - return - default: - panic("Promise already done") - } - } - } - return P -} - -func HttpGet(url string, callback func(resp *Response, err error)) { - resp := &Response{StatusCode: 200} - callback(resp, nil) -} - -func AsyncHttpGet(url string) (resolve io.Promise[*Response]) { - HttpGet(url, resolve) - return -} - -func AsyncHttpGetCompiled(url string) *io.PromiseImpl[*Response] { - P := &io.PromiseImpl[*Response]{} - P.Func = func(resolve func(*Response, error)) { - for { - switch P.Prev = P.Next; P.Prev { - case 0: - HttpGet(url, resolve) - P.Next = -1 - return - default: - panic("Promise already done") - } - } - } - return P -} - -// ----------------------------------------------------------------------------- - -type User struct { - Name string -} - -func GetUser(uid string) (resolve io.Promise[User]) { - resp, err := AsyncHttpGet("http://example.com/user/" + uid).Await() - if err != nil { - resolve(User{}, err) - return - } - - if resp.StatusCode != 200 { - resolve(User{}, fmt.Errorf("http status code: %d", resp.StatusCode)) - return - } - - resp.mock(`{"name":"Alice"}`) - - body, err := resp.Text().Await() - if err != nil { - resolve(User{}, err) - return - } - user := User{} - if err := json.Unmarshal([]byte(body), &user); err != nil { - resolve(User{}, err) - return - } - - resolve(user, nil) - return -} - -func GetUserCompiled(uid string) *io.PromiseImpl[User] { - var state1 *io.PromiseImpl[*Response] - var state2 *io.PromiseImpl[string] - - P := &io.PromiseImpl[User]{} - P.Func = func(resolve func(User, error)) { - for { - switch P.Prev = P.Next; P.Prev { - case 0: - state1 = AsyncHttpGetCompiled("http://example.com/user/" + uid) - P.Next = 1 - return - case 1: - state1.EnsureDone() - resp, err := state1.Value, state1.Err - if err != nil { - resolve(User{}, err) - return - } - - if resp.StatusCode != 200 { - resolve(User{}, fmt.Errorf("http status code: %d", resp.StatusCode)) - return - } - - resp.mock(`{"name":"Alice"}`) - - state2 = resp.TextCompiled() - P.Next = 2 - return - case 2: - state2.EnsureDone() - body, err := state2.Value, state2.Err - if err != nil { - resolve(User{}, err) - return - } - user := User{} - if err := json.Unmarshal([]byte(body), &user); err != nil { - resolve(User{}, err) - return - } - - resolve(user, nil) - P.Next = -1 - return - default: - panic("Promise already done") - } - } - } - return P -} - -func GetScore() *io.Promise[float64] { - panic("todo: GetScore") -} - -func GetScoreCompiled() *io.PromiseImpl[float64] { - P := &io.PromiseImpl[float64]{} - P.Func = func(resolve func(float64, error)) { - for { - switch P.Prev = P.Next; P.Prev { - case 0: - panic("todo: GetScore") - default: - panic("Promise already done") - } - } - } - return P -} - -func DoUpdate(op string) *io.Promise[io.Void] { - panic("todo: DoUpdate") -} - -func DoUpdateCompiled(op string) *io.PromiseImpl[io.Void] { - P := &io.PromiseImpl[io.Void]{} - P.Func = func(resolve func(io.Void, error)) { - for { - switch P.Prev = P.Next; P.Prev { - case 0: - panic("todo: DoUpdate") - default: - panic("Promise already done") - } - } - } - return P -} - -func Demo() (resolve io.Promise[io.Void]) { - user, err := GetUser("123").Await() - log.Println(user, err) - - user, err = io.Race[User](GetUser("123"), GetUser("456"), GetUser("789")).Await() - log.Println(user, err) - - users, err := io.All[User]([]io.AsyncCall[User]{GetUser("123"), GetUser("456"), GetUser("789")}).Await() - log.Println(users, err) - - user, score, _, err := io.Await3[User, float64, io.Void](GetUser("123"), GetScore(), DoUpdate("update sth.")) - log.Println(user, score, err) - - // TODO(lijie): select from multiple promises without channel - select { - case user := <-GetUser("123").Chan(): - log.Println("user:", user) - case score := <-GetScore().Chan(): - log.Println("score:", score) - case <-io.Timeout(5 * time.Second).Chan(): - log.Println("timeout") - } - return -} - -func DemoCompiled() *io.PromiseImpl[io.Void] { - var state1 *io.PromiseImpl[User] - var state2 *io.PromiseImpl[User] - var state3 *io.PromiseImpl[[]User] - var state4 *io.PromiseImpl[io.Await3Result[User, float64, io.Void]] - - P := &io.PromiseImpl[io.Void]{} - P.Func = func(resolve func(io.Void, error)) { - for { - switch P.Prev = P.Next; P.Prev { - case 0: - state1 = GetUserCompiled("123") - P.Next = 1 - return - case 1: - state1.EnsureDone() - user, err := state1.Value, state1.Err - log.Printf("user: %v, err: %v\n", user, err) - - state2 = io.Race[User](GetUserCompiled("123"), GetUserCompiled("456"), GetUserCompiled("789")) - P.Next = 2 - return - case 2: - state2.EnsureDone() - user, err := state2.Value, state2.Err - log.Println(user, err) - - state3 = io.All[User]([]io.AsyncCall[User]{GetUserCompiled("123"), GetUserCompiled("456"), GetUserCompiled("789")}) - P.Next = 3 - return - case 3: - state3.EnsureDone() - users, err := state3.Value, state3.Err - log.Println(users, err) - - state4 = io.Await3Compiled[User, float64, io.Void](GetUserCompiled("123"), GetScoreCompiled(), DoUpdateCompiled("update sth.")) - P.Next = 4 - return - case 4: - state4.EnsureDone() - user, score, _, err := state4.Value.V1, state4.Value.V2, state4.Value.V3, state4.Value.Err - log.Println(user, score, err) - - select { - case user := <-GetUserCompiled("123").Chan(): - log.Println("user:", user) - case score := <-GetScoreCompiled().Chan(): - log.Println("score:", score) - case <-io.TimeoutCompiled(5 * time.Second).Chan(): - log.Println("timeout") - } - P.Next = -1 - return - default: - panic("Promise already done") - } - } - } - return P -} - -func main() { - log.SetFlags(log.Lshortfile | log.LstdFlags) - // io.Run(Demo()) - io.Run(DemoCompiled()) -} diff --git a/x/io/io.go b/x/io/io.go deleted file mode 100644 index f4b4c18b..00000000 --- a/x/io/io.go +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io - -import ( - _ "unsafe" - - "time" -) - -const ( - LLGoPackage = "decl" -) - -type Void = [0]byte - -// ----------------------------------------------------------------------------- - -type AsyncCall[OutT any] interface { - Await(timeout ...time.Duration) (ret OutT, err error) - Chan() <-chan OutT - EnsureDone() -} - -// llgo:link AsyncCall.Await llgo.await -func Await[OutT any](call AsyncCall[OutT], timeout ...time.Duration) (ret OutT, err error) { - return -} - -//go:linkname Timeout llgo.timeout -func Timeout(time.Duration) (ret AsyncCall[Void]) - -func TimeoutCompiled(d time.Duration) *PromiseImpl[Void] { - P := &PromiseImpl[Void]{} - P.Func = func(resolve func(Void, error)) { - go func() { - time.Sleep(d) - resolve(Void{}, nil) - }() - } - return P -} - -// llgo:link Race llgo.race -func Race[OutT any](acs ...AsyncCall[OutT]) (ret *PromiseImpl[OutT]) { - return -} - -func All[OutT any](acs []AsyncCall[OutT]) (ret *PromiseImpl[[]OutT]) { - return nil -} - -// llgo:link Await2 llgo.await -func Await2[OutT1, OutT2 any]( - ac1 AsyncCall[OutT1], ac2 AsyncCall[OutT2], - timeout ...time.Duration) (ret1 OutT1, ret2 OutT2, err error) { - return -} - -type Await2Result[T1 any, T2 any] struct { - V1 T1 - V2 T2 - Err error -} - -func Await2Compiled[OutT1, OutT2 any]( - ac1 AsyncCall[OutT1], ac2 AsyncCall[OutT2], - timeout ...time.Duration) (ret *PromiseImpl[Await2Result[OutT1, OutT2]]) { - return -} - -// llgo:link Await3 llgo.await -func Await3[OutT1, OutT2, OutT3 any]( - ac1 AsyncCall[OutT1], ac2 AsyncCall[OutT2], ac3 AsyncCall[OutT3], - timeout ...time.Duration) (ret1 OutT1, ret2 OutT2, ret3 OutT3, err error) { - return -} - -type Await3Result[T1 any, T2 any, T3 any] struct { - V1 T1 - V2 T2 - V3 T3 - Err error -} - -func Await3Compiled[OutT1, OutT2, OutT3 any]( - ac1 AsyncCall[OutT1], ac2 AsyncCall[OutT2], ac3 AsyncCall[OutT3], - timeout ...time.Duration) (ret *PromiseImpl[Await3Result[OutT1, OutT2, OutT3]]) { - return -} - -func Run(ac AsyncCall[Void]) { - p := ac.(*PromiseImpl[Void]) - p.Resume() - <-ac.Chan() -} - -// ----------------------------------------------------------------------------- - -type Promise[OutT any] func(OutT, error) - -// llgo:link Promise.Await llgo.await -func (p Promise[OutT]) Await(timeout ...time.Duration) (ret OutT, err error) { - return -} - -func (p Promise[OutT]) Chan() <-chan OutT { - return nil -} - -func (p Promise[OutT]) EnsureDone() { - -} - -// ----------------------------------------------------------------------------- - -type PromiseImpl[TOut any] struct { - Func func(resolve func(TOut, error)) - Value TOut - Err error - Prev int - Next int - - c chan TOut -} - -func (p *PromiseImpl[TOut]) Resume() { - p.Func(func(v TOut, err error) { - p.Value = v - p.Err = err - }) -} - -func (p *PromiseImpl[TOut]) EnsureDone() { - if p.Next == -1 { - panic("Promise already done") - } -} - -func (p *PromiseImpl[TOut]) Chan() <-chan TOut { - if p.c == nil { - p.c = make(chan TOut, 1) - p.Func(func(v TOut, err error) { - p.Value = v - p.Err = err - p.c <- v - }) - } - return p.c -} - -func (p *PromiseImpl[TOut]) Await(timeout ...time.Duration) (ret TOut, err error) { - panic("should not called") -} - -// -----------------------------------------------------------------------------